Bug#316521: dpkg: stale directories when packages install conffiles to subsubdirectories of /etc

2011-07-21 Thread Raphael Hertzog
Hi Ondrej, On Wed, 18 May 2011, Ondřej Surý wrote: > > I'm just not sure what the correct solution is. Instead of purge_dir maybe > > the right answer is "manage-manual-conffile" and/or > > "manage-manual-file". And it would drop the file on removal/purge and try > > to remove the parent directori

Bug#316521: dpkg: stale directories when packages install conffiles to subsubdirectories of /etc

2011-05-18 Thread Ondřej Surý
Hi, 2011/5/16 Raphael Hertzog : > Hi, > > On Mon, 16 May 2011, Ondřej Surý wrote: >> (small) ping with question... >> >> Are you going to consider implementing purge_dir to >> dpkg-maintscript-helper or should I do it directly in >> php5-.postinst scripts? (Both options are OK for me.) > > I'm def

Bug#316521: dpkg: stale directories when packages install conffiles to subsubdirectories of /etc

2011-05-17 Thread Raphael Hertzog
Hi, On Mon, 16 May 2011, Ondřej Surý wrote: > (small) ping with question... > > Are you going to consider implementing purge_dir to > dpkg-maintscript-helper or should I do it directly in > php5-.postinst scripts? (Both options are OK for me.) I'm definitely interested into providing a standardi

Bug#316521: dpkg: stale directories when packages install conffiles to subsubdirectories of /etc

2011-05-16 Thread Ondřej Surý
(small) ping with question... Are you going to consider implementing purge_dir to dpkg-maintscript-helper or should I do it directly in php5-.postinst scripts? (Both options are OK for me.) O. -- Ondřej Surý http://blog.rfc1925.org/ -- To UNSUBSCRIBE, email to debian-dpkg-bugs-requ...@list

Bug#316521: dpkg: stale directories when packages install conffiles to subsubdirectories of /etc

2011-05-12 Thread Ondřej Surý
Hi, 2011/5/12 Guillem Jover : >> You can find the test case attached which works OK with current >> unstable dpkg and fails with git version+your patch. > > Ah! Now I see, and indeed it does. So the problem here is that > removal_bulk_remove_configfiles() is buggy as it does not remove the > conff

Bug#316521: dpkg: stale directories when packages install conffiles to subsubdirectories of /etc

2011-05-12 Thread Guillem Jover
Hi! On Thu, 2011-05-12 at 10:57:25 +0200, Ondřej Surý wrote: > sorry I wasn't clear in my previous mail. I'll attach test cases and > logs this time. Thanks, that makes it more clear yes. :) > Well, it seems to me that the php5-common/php5-cli problem is > combination of both issues, hence the c

Bug#316521: dpkg: stale directories when packages install conffiles to subsubdirectories of /etc

2011-05-12 Thread Ondřej Surý
Hi, sorry I wasn't clear in my previous mail. I'll attach test cases and logs this time. 2011/5/12 Guillem Jover : > Hi! > > Thanks for the test-case, I've commited it as t-dir-leftover-deadlock, > and added a new t-dir-leftover-parents which is what I thought you > were trying to solve initially

Bug#316521: dpkg: stale directories when packages install conffiles to subsubdirectories of /etc

2011-05-11 Thread Guillem Jover
Hi! Thanks for the test-case, I've commited it as t-dir-leftover-deadlock, and added a new t-dir-leftover-parents which is what I thought you were trying to solve initially, given your bug report. So I think these two issues should be detangled, and I'll be applying my revised patch to fix the -pa

Bug#316521: dpkg: stale directories when packages install conffiles to subsubdirectories of /etc

2011-05-11 Thread Ondřej Surý
Hi Guillem, your patch doesn't fix the problem, and even introduces more problems, because as it is written it leaves all directories which have conffiles on the disk. This section: static void removal_bulk_remove_files(struct pkginfo *pkg) { [...] if (namenode->flags & fnnf_old_conff) {

Bug#316521: dpkg: stale directories when packages install conffiles to subsubdirectories of /etc

2011-05-06 Thread Ondřej Surý
2011/5/6 Raphael Hertzog : > On Fri, 06 May 2011, Ondřej Surý wrote: >> >> If you want this fixed, just ping me, it's easy to add something like >> >> "&& (->name[namelen] == \0 or ...->name[namelen] == '/')", and >> >> I'll fix it at both places. >> > >> > Ah nice catch! I've pushed a fix for

Bug#316521: dpkg: stale directories when packages install conffiles to subsubdirectories of /etc

2011-05-06 Thread Ondřej Surý
On 6.5.2011, at 6:28, Guillem Jover wrote: > Hi! > > On Wed, 2011-05-04 at 11:11:10 +0200, Ondřej Surý wrote: >> The attached patch keeps the directory in the .list (aka add it >> to the leftover) if the children directory is found on the leftover >> list. > > The problem is that the check is n

Bug#316521: dpkg: stale directories when packages install conffiles to subsubdirectories of /etc

2011-05-05 Thread Raphael Hertzog
On Fri, 06 May 2011, Ondřej Surý wrote: > >> If you want this fixed, just ping me, it's easy to add something like > >> "&& (->name[namelen] == \0 or ...->name[namelen] == '/')", and > >> I'll fix it at both places. > > > > Ah nice catch! I've pushed a fix for this (commit > > 2c9a342dc4e1ad3e

Bug#316521: dpkg: stale directories when packages install conffiles to subsubdirectories of /etc

2011-05-05 Thread Guillem Jover
Hi! On Wed, 2011-05-04 at 11:11:10 +0200, Ondřej Surý wrote: > The attached patch keeps the directory in the .list (aka add it > to the leftover) if the children directory is found on the leftover > list. The problem is that the check is not correct, isdirectoryinuse (now dir_is_used_by_others) c

Bug#316521: dpkg: stale directories when packages install conffiles to subsubdirectories of /etc

2011-05-04 Thread Ondřej Surý
Ok, so I have found the culprit. The php5-cli uses ucf and hence the /etc/php5/cli/php.ini is not marked as conffile and so, the hasdirectoryconffiles check fails. The attached patch keeps the directory in the .list (aka add it to the leftover) if the children directory is found on the leftover li

Bug#316521: dpkg: stale directories when packages install conffiles to subsubdirectories of /etc

2011-05-03 Thread Jonathan Nieder
Ondřej Surý wrote: > At the moment the only solution I see is what I have suggested - keep > ownership of whole tree up-to-the root for directories holding > conffiles and try to remove them at purge time... > > dpkg --remove php5-cli > # ownership kept for /., /etc, /etc/php5, /etc/php5/cli Yes,

Bug#316521: dpkg: stale directories when packages install conffiles to subsubdirectories of /etc

2011-05-02 Thread Ondřej Surý
Hi, On Tue, May 3, 2011 at 01:05, Jonathan Nieder wrote: > forcemerge 316521 625241 > quit And I thought I have checked the existing bugs ... probably used wrong keywords :(. Sorry for duplicate. > Hi, > > Ondřej Surý wrote: > >> I don't know whether it is real dpkg bug or not, but that's somet

Bug#316521: dpkg: stale directories when packages install conffiles to subsubdirectories of /etc

2011-05-02 Thread Jonathan Nieder
forcemerge 316521 625241 quit Hi, Ondřej Surý wrote: > I don't know whether it is real dpkg bug or not, but that's something > I have found in php5 piuparts testing. > > Both php5-common and php5-cli (and other SAPIs) "owns" /etc/php5 > (/var/lib/dpkg/info/*.list), now after > > dpkg --remove ph