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 confusion on my part.

Ah, ok.

> 2011/5/12 Guillem Jover <guil...@debian.org>:
> > and I'll be applying my revised patch to fix the -parents case.
> 
> I hope I can convince you that your patch as-is causes a regression.
> 
> Here's the log of dpkg --purge php5-common (after removing php5-cli,
> php5-common):

[...]

> And the /etc/php5/conf.d is left on the system.
> 
> 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
conffiles from the package files list when it unlinks them, and they
linger around when we are removing the leftover directories on purge.
On entry removal_bulk_remove_leftover_dirs() should really only
contain directories (or symlinks to directories) nothing else. I'll
fix that up.

> > For a fix for t-dir-leftover-deadlock then
> > it's not as straight forward as it might seem and I'd recommend reading
> > Raphaël's summary in:
> >
> >  <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=316521#39>
> 
> I see, you're right. After reading the summary and the original bug
> reports I see only two solutions to this problem:
> 
> a) teach dpkg to remove parent directories not used by other packages
> on purge (slight modification of Raphael's case one)

> b) write some logic to dpkg-maintscript-helper which would allow the
> maintainers to either specify directories to purge in postrm, or
> directories to keep in the list on remove.
> 
> I don't think it's feasible to search the directories for files not
> used by other packages, this would make dpkg very slow in corner cases
> (many files in many directories).

While I don't think it might cause a huge degradation, I agree though
it's not really the correct solution.

> ( c) would be the simplest solution - just keep directories used by
> more packages in the list and remove them on purge, but that's very
> ugly)

The correct solution is to teach dpkg about external files.

> BTW it's not only "configuration files", but "logfiles" as well, as
> all other files not in the packages and created either by maintainer
> scripts or by package itself.

Sure, I explicitly wrote something along those lines for the
test-case. :)

> > On Wed, 2011-05-11 at 11:28:20 +0200, Ondřej Surý wrote:
> >> 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.
> >
> > That's not correct, it behaves as it should be, but that's not changed
> > by my patch, that's the current behaviour already. If a directory
> > contains conffiles then they need to be tracked so that they can be
> > removed on purge.
> 
> See above. The problem is that the directory is not removed on purge.
> The 0002 patch applied on top of yours fixes the test case.

You are absolutely right, sorry I din't see it before.

regards,
guillem




--
To UNSUBSCRIBE, email to debian-dpkg-bugs-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to