这是indexloc提供的服务,不要输入任何密码

Debian Bug report logs - #625241
dpkg: Incomplete cleanup of empty directories

version graph

Package: dpkg; Maintainer for dpkg is Dpkg Developers <debian-dpkg@lists.debian.org>; Source for dpkg is src:dpkg (PTS, buildd, popcon).

Reported by: Ondřej Surý <ondrej@debian.org>

Date: Mon, 2 May 2011 18:06:02 UTC

Severity: normal

Merged with 57518, 316521, 348133, 538429, 664822

Found in versions dpkg/1.10.28, dpkg/1.15.8.10, dpkg/1.15.3.1, dpkg/1.13.11.0.1, dpkg/1.13.13, dpkg/1.13.16, dpkg/1.10.9

Blocking fix for 684126: debian-policy: clarification needed for handling of directories used by maintainer scripts, 851531: dpkg: warning: unable to delete old directory '/etc/piuparts/scripts-debug-prerm': Directory not empty

Reply or subscribe to this bug.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, Dpkg Developers <debian-dpkg@lists.debian.org>:
Bug#625241; Package dpkg. (Mon, 02 May 2011 18:06:05 GMT) (full text, mbox, link).


Acknowledgement sent to Ondřej Surý <ondrej@debian.org>:
New Bug report received and forwarded. Copy sent to Dpkg Developers <debian-dpkg@lists.debian.org>. (Mon, 02 May 2011 18:06:05 GMT) (full text, mbox, link).


Message #5 received at submit@bugs.debian.org (full text, mbox, reply):

From: Ondřej Surý <ondrej@debian.org>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: dpkg: stale directories when packages install conffiles to subsubdirectories of /etc
Date: Mon, 02 May 2011 19:58:37 +0200
Package: dpkg
Version: 1.15.8.10
Severity: minor

Hi,

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 php5-cli
dpkg --remove php5-common
dpkg --purge php5-common
dpkg --purge php5-cli

the /etc/php5 is left in place because it was removed from
/var/lib/dpkg/info/php5-cli.list (I guess on basis that another
package - the php5-common still "owns" the directory).

The php5-cli.list files looks like (after dpkg --remove php5-cli):

# cat php5-cli.list  
/etc/php5/cli

I guess this is something not a php5 specific and could happen in more
packages which put more config files into subsubdirectories in /etc/.

I think the correct behaviour of dpkg should be to leave all
directories leading to all left conffiles after removing but not
purging, so after issuing:

dpkg --remove php5-cli

the php5-cli.list file should contain 

# cat php5-cli.list
/.  
/etc
/etc/php5
/etc/php5/cli

instead of

/etc/php5/cli

I have tested that and edited the php5-cli.list to include all
directories up-to-the-root and it works as it should.

In other words I don't think there's a piuparts bug in src:php5
(however I am probably willing to create workaround and just do
"rmdir --ignore-fail-on-non-empty /etc/php5" in postrm script purge
target for all php5 SAPIs).

I have checked stable and unstable distributions and both have same
behaviour.

O.

-- System Information:
Debian Release: 6.0.1
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.32-5-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages dpkg depends on:
ii  coreutils               8.5-1            GNU core utilities
ii  libbz2-1.0              1.0.5-6          high-quality block-sorting file co
ii  libc6                   2.11.2-10        Embedded GNU C Library: Shared lib
ii  libselinux1             2.0.96-1         SELinux runtime shared libraries
ii  xz-utils                5.0.0-2          XZ-format compression utilities
ii  zlib1g                  1:1.2.3.4.dfsg-3 compression library - runtime

dpkg recommends no packages.

Versions of packages dpkg suggests:
ii  apt                           0.8.10.3   Advanced front-end for dpkg

-- no debconf information




Forcibly Merged 316521 348133 454694 538429 625241. Request was from Jonathan Nieder <jrnieder@gmail.com> to control@bugs.debian.org. (Mon, 02 May 2011 23:09:09 GMT) (full text, mbox, link).


Disconnected #454694 from all other report(s). Request was from Guillem Jover <guillem@debian.org> to control@bugs.debian.org. (Mon, 16 May 2011 03:21:06 GMT) (full text, mbox, link).


Removed indication that bug 625241 blocks 566853 Request was from Guillem Jover <guillem@debian.org> to control@bugs.debian.org. (Mon, 30 Apr 2012 04:57:05 GMT) (full text, mbox, link).


Added tag(s) patch. Request was from Guillem Jover <guillem@debian.org> to control@bugs.debian.org. (Mon, 30 Apr 2012 04:57:13 GMT) (full text, mbox, link).


Removed tag(s) patch. Request was from Guillem Jover <guillem@debian.org> to control@bugs.debian.org. (Mon, 30 Apr 2012 05:18:04 GMT) (full text, mbox, link).


No longer marked as found in versions 1.10.9. Request was from Guillem Jover <guillem@debian.org> to control@bugs.debian.org. (Mon, 30 Apr 2012 05:18:07 GMT) (full text, mbox, link).


No longer marked as found in versions 1.10.28 and dpkg/1.10.28. Request was from Guillem Jover <guillem@debian.org> to control@bugs.debian.org. (Mon, 30 Apr 2012 05:18:09 GMT) (full text, mbox, link).


Marked as found in versions dpkg/1.10.9. Request was from Guillem Jover <guillem@debian.org> to control@bugs.debian.org. (Mon, 30 Apr 2012 05:18:10 GMT) (full text, mbox, link).


Marked as found in versions dpkg/1.10.28. Request was from Guillem Jover <guillem@debian.org> to control@bugs.debian.org. (Mon, 30 Apr 2012 05:18:11 GMT) (full text, mbox, link).


Merged 316521 348133 538429 625241 664822 Request was from Guillem Jover <guillem@debian.org> to control@bugs.debian.org. (Mon, 30 Apr 2012 05:18:13 GMT) (full text, mbox, link).


Added indication that bug 625241 blocks 851531 Request was from Andreas Beckmann <anbe@debian.org> to 851531-submit@bugs.debian.org. (Sun, 15 Jan 2017 23:39:11 GMT) (full text, mbox, link).


Added indication that bug 625241 blocks 684126 Request was from Sean Whitton <spwhitton@spwhitton.name> to control@bugs.debian.org. (Sun, 06 Aug 2017 18:39:10 GMT) (full text, mbox, link).


Merged 57518 316521 348133 538429 625241 664822 Request was from Guillem Jover <guillem@debian.org> to control@bugs.debian.org. (Sat, 02 Mar 2019 21:15:05 GMT) (full text, mbox, link).


Changed Bug title to 'dpkg: Incomplete cleanup of empty directories' from 'dpkg: stale directories when packages install conffiles to subsubdirectories of /etc'. Request was from Guillem Jover <guillem@debian.org> to control@bugs.debian.org. (Sun, 03 Mar 2019 00:45:06 GMT) (full text, mbox, link).


Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Tue Jul 29 05:13:27 2025; Machine Name: berlioz

Debian Bug tracking system

Debbugs is free software and licensed under the terms of the GNU General Public License version 2. The current version can be obtained from https://bugs.debian.org/debbugs-source/.

Copyright © 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson, 2005-2017 Don Armstrong, and many other contributors.