Your message dated Tue, 30 May 2006 22:17:06 -0700 with message-id <[EMAIL PROTECTED]> and subject line Bug#174180: fixed in dpkg 1.13.20 has caused the attached Bug report to be marked as done.
This means that you claim that the problem has been dealt with. If this is not the case it is now your responsibility to reopen the Bug report if necessary, and/or fix the problem forthwith. (NB: If you are a system administrator and have no idea what I am talking about this indicates a serious mail system misconfiguration somewhere. Please contact me immediately.) Debian bug tracking system administrator (administrator, Debian Bugs database)
--- Begin Message ---Package: dpkg Version: 1.10.28 Severity: normal Tags: patch Hi, sometimes dpkg warns about directories not being empty when purging packages while it shouldn't. The reason for this is that dpkg removes directories from package.list even though the package has still files (always conffiles?) in that directory (if the directory is also used by another package). The directory then only belongs to that other package (pkg2) and when pkg2 is purged it warns about the directory not being empty. Example: [EMAIL PROTECTED]:~$ dpkg -S /etc/defoma ttf-bitstream-vera, defoma: /etc/defoma [EMAIL PROTECTED]:~$ sudo dpkg --remove defoma ttf-bitstream-vera (Reading database ... 10232 files and directories currently installed.) Removing ttf-bitstream-vera ... Removing defoma ... [EMAIL PROTECTED]:~$ dpkg -S /etc/defoma defoma: /etc/defoma [EMAIL PROTECTED]:~$ cat /var/lib/dpkg/info/ttf-bitstream-vera.list /etc/defoma/hints /etc/defoma/hints/ttf-bitstream-vera.hints ^^^ Notice how /etc and /etc/defoma are missing now. [EMAIL PROTECTED]:~$ sudo dpkg --purge defoma ttf-bitstream-vera (Reading database ... 10125 files and directories currently installed.) Removing defoma ... Purging configuration files for defoma ... dpkg - warning: while removing defoma, directory `/etc/defoma' not empty so not removed. Removing ttf-bitstream-vera ... Purging configuration files for ttf-bitstream-vera ... ^^^ when ttf-bitstream-vera the directory actualy becomes empty but since ttf-bitstream-vera does not own that directory it is not removed. The patch is quite simple. Before writing the reduced file list after removal listclosure(&leftover) is called. This function generates the closure of the list by recursively adding all parent directories of all entries that don't already exist in the list. It doesn't re-add an entry for the root dir (/. entry) though. Lets hope / is never going to be removed. :) MfG Goswin -- System Information: Debian Release: 3.1 Architecture: amd64 (x86_64) Kernel: Linux 2.6.8-frosties-1 Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968) Versions of packages dpkg depends on: ii dselect 1.10.28 a user tool to manage Debian packa ii libc6 2.3.2.ds1-22 GNU C Library: Shared libraries an -- no debconf informationdiff -Nru /tmp/I6mUpNOPoU/dpkg-1.13.9/debian/changelog /tmp/2Ksog51tfC/dpkg-1.13.9/debian/changelog --- /tmp/I6mUpNOPoU/dpkg-1.13.9/debian/changelog 2005-06-12 17:16:59.000000000 +0200 +++ /tmp/2Ksog51tfC/dpkg-1.13.9/debian/changelog 2005-07-18 00:15:08.000000000 +0200 @@ -1,3 +1,11 @@ +dpkg (1.13.9-0.0.0.1.mrvn) unstable; urgency=low + + The "Fix dir removal!" Release. + + * Don't remove dirs with files from package left from the package.list + + -- Scott James Remnant <[EMAIL PROTECTED]> Mon, 18 Jul 2005 00:14:10 +0200 + dpkg (1.13.9) unstable; urgency=low The "On like Donkey Kong" Release. diff -Nru /tmp/I6mUpNOPoU/dpkg-1.13.9/src/remove.c /tmp/2Ksog51tfC/dpkg-1.13.9/src/remove.c --- /tmp/I6mUpNOPoU/dpkg-1.13.9/src/remove.c 2005-06-06 06:07:12.000000000 +0200 +++ /tmp/2Ksog51tfC/dpkg-1.13.9/src/remove.c 2005-07-18 01:04:29.000000000 +0200 @@ -188,6 +188,41 @@ *leftoverp= newentry; } +/* Generate closure of list by recursively adding all parent directories that + * don't already exist + */ +void listclosure(struct fileinlist **list) { + struct fileinlist *tmp1= *list; + struct filenamenode *namenode; + while(tmp1) { + char *dirname= m_malloc(strlen(tmp1->namenode->name)+1); + char *p = dirname + strlen(tmp1->namenode->name); + strcpy(dirname,tmp1->namenode->name); + while(p > dirname) { + struct fileinlist *tmp2= *list; + debug(dbg_eachfiledetail, "removal_bulk reinclude test `%s'", dirname); + while(p > dirname && *p != '/') { // get dirname + *p = 0; + --p; + } + *p = 0; + while(tmp2) { + debug(dbg_eachfiledetail, "removal_bulk reinclude cmp `%s'", tmp2->namenode->name); + if (strcmp(dirname, tmp2->namenode->name) == 0) + break; + tmp2= tmp2->next; + } + if (!tmp2) { + debug(dbg_eachfiledetail, "removal_bulk reinclude add `%s'", dirname); + namenode= findnamenode(dirname,0); + push_leftover(&list,namenode); + } + } + free(dirname); + tmp1= tmp1->next; + } +} + static void removal_bulk_remove_files( struct pkginfo *pkg, int *out_foundpostrm) @@ -275,6 +310,7 @@ } if (unlink(fnvb.buf)) ohshite(_("cannot remove file `%.250s'"),fnvb.buf); } + listclosure(&leftover); write_filelist_except(pkg,leftover,0); maintainer_script_installed(pkg, POSTRMFILE, "post-removal", "remove", (char*)0); @@ -373,6 +409,7 @@ push_leftover(&leftover,namenode); continue; } + listclosure(&leftover); write_filelist_except(pkg,leftover,0); modstatdb_note(pkg);
--- End Message ---
--- Begin Message ---Source: dpkg Source-Version: 1.13.20 We believe that the bug you reported is fixed in the latest version of dpkg, which is due to be installed in the Debian FTP archive: dpkg-dev_1.13.20_all.deb to pool/main/d/dpkg/dpkg-dev_1.13.20_all.deb dpkg_1.13.20.dsc to pool/main/d/dpkg/dpkg_1.13.20.dsc dpkg_1.13.20.tar.gz to pool/main/d/dpkg/dpkg_1.13.20.tar.gz dpkg_1.13.20_i386.deb to pool/main/d/dpkg/dpkg_1.13.20_i386.deb dselect_1.13.20_i386.deb to pool/main/d/dpkg/dselect_1.13.20_i386.deb A summary of the changes between this version and the previous one is attached. Thank you for reporting the bug, which will now be closed. If you have further comments please address them to [EMAIL PROTECTED], and the maintainer will reopen the bug report if appropriate. Debian distribution maintenance software pp. Guillem Jover <[EMAIL PROTECTED]> (supplier of updated dpkg package) (This message was generated automatically at their request; if you believe that there is a problem with it please contact the archive administrators by mailing [EMAIL PROTECTED]) -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Format: 1.7 Date: Wed, 31 May 2006 07:43:16 +0300 Source: dpkg Binary: dpkg dselect dpkg-dev Architecture: source i386 all Version: 1.13.20 Distribution: unstable Urgency: low Maintainer: Dpkg Developers <[EMAIL PROTECTED]> Changed-By: Guillem Jover <[EMAIL PROTECTED]> Description: dpkg - package maintenance system for Debian dpkg-dev - package building tools for Debian dselect - user tool to manage Debian packages Closes: 35573 36586 54529 57104 58106 65839 81171 165843 169125 174180 198128 198522 208532 230610 237622 237626 281562 313605 315784 316551 318825 349120 349442 361171 361671 364726 366178 366185 366187 366351 366353 366587 366659 366985 367329 368874 368875 369177 369205 Changes: dpkg (1.13.20) unstable; urgency=low . [ Frank Lichtenheld ] * Add gettext support for the Perl scripts. Based on a patch by Nicolas François. Closes: #165843 * Only print usage information of dpkg-scanpackages on stdout if requested explicetly. Use stderr in case of error. Closes: #366659 * Add remarks to dpkg-scansources and dpkg-scanpackages man pages about the need to compress the generated files to be able to access them via apt. Closes: #65839 * Allow '+' and '.' in distribution names in Debian changelogs. Based on a patch by John Wright. Closes: #361171 * Use the Debian keyring in dpkg-source when checking signatures of .dsc files, if available. Closes: #364726 * Let dpkg-buildpackage pass through all remotely sensible -sX options to dpkg-source (-s[nsAkurKUR] currently). Closes: #36586 * Improve the description of --showformat in dpkg-deb man page and add a pointer to the complete description of the option in dpkg-query. * Don't spew out garbage from dpkg-deb, if the second argument to -I is a absolute filename. Based on a patch by Ian Eure. Closes: #35573 * Fix --ignore-depends argument value parsing. Closes: #169125 * Completely remove md5sum diversion madness. Instead, we Pre-Depend on a version of textutils which provides /usr/bin/md5sum. We rely on the logic in coreutils to remove our diversions. Patch by Ian Jackson. Closes: #315784, #313605 * Try harder to detect dependency cycles that contain Provides links. Closes: #349120, #349442 * Update archtable to reflect current archive: Add amd64 and remove sh. Closes: #367329 * Don't claim in dpkg man page that we set DPKG_OLD_CONFFILE and DPKG_NEW_CONFFILE on sub shells since we actually don't. * Fix printing of user defined fields with --showformat and document the existance of this feature in dpkg-query man page. * Make --forget-old-unavail more reliable by deleting architecture information of removed packages. Patch by Piotr Engelking. Closes: #208532 * When building packages with dpkg-deb give a more useful error message in case a conffile entry has leading whitespace. Patch by David Lopez Moreno. Closes: #281562 * Don't drop directories that contain our conffiles too early from our file listing. Otherwise we might leave them behind on purge if we share them with other packages. Closes: #174180, #198128, #198522, #318825, #366178 . [ Nicolas François ] * Fix typos in the Russian man pages. Thanks to Stepan Golosunov. Closes: #366587 * Honour tabbing requested via --showformat even if the field to be printed is empty. Closes: #361671 * Flush the terminal's input before prompting what to do with a configuration file. Closes: #316551 * Fix the --force-depends-version option. Closes: #57104 . [ Guillem Jover ] * Standarize scripts usage output format and at the same time make the strings easier for the translators. Add '--help' and '--version' for most of the scripts. Print the usage and version to stdout. * Do not strip the epoch from the source:Upstream-Version substvar. Closes: #366351 * Properly check and report lock file existence in install-info. Based on patch by Ben Pfaff. Closes: #368874 * Correct default info directory for '--infodir' in intall-info man page (Ben Pfaff). Closes: #368875 * Print the bogus version and prefix the error message with 'dpkg: ' when using '--compare-versions'. Closes: #369177 * Remove duplicated string " , at changelog " in dpkg-parsechangelog's debian style parser (Julian Gilbey). Closes: #369205 * Update the Section and Priority fields in the status file from the new packages. We assume that the information from the binary package is correct, otherwise it should be fixed there to match the archive override file (Koblinger Egmont). Closes: #54529, #58106, #81171, #230610, #237622, #237626 * Bump Standards-Version to 3.7.2 (no changes needed). * Add lintian overrides for dpkg, dpkg-dev, dselect and sources. * Replace logrotate installation logic with dh_installlogrotate. . [ Updated dpkg Translations ] * Portuguese (Miguel Figueiredo). * Polish (Robert Luberda). * Hungarian (SZERVÃC Attila). * Romanian (Eddy PetriÅor). * Russian (Yuri Kozlov). Closes: #366353 * Czech (Miroslav Kure). * Simplified Chinese (Kov Tchai). Closes: #366985 * Swedish (Peter Karlsson). * Galician (Jacobo Tarrio). * Slovak (Peter Mann). * Dutch (Bart Cornelis). * Basque (Piarres Beobide). Closes: #366185 . [ Updated dselect Translations ] * Polish (Robert Luberda). * Basque (Piarres Beobide). Closes: #366187 * Czech (Miroslav Kure). * Romanian (Eddy PetriÅor). . [ Updated man pages translations ] * Polish (Robert Luberda). Files: 71c2be87a21a612812143a16fa5346a0 843 admin required dpkg_1.13.20.dsc c61937d53f11c61b5fc67684d2e9423a 3033590 admin required dpkg_1.13.20.tar.gz 89231c55f6b09d775f058e0beb5c1f47 1543222 admin required dpkg_1.13.20_i386.deb 0e371fd950e1516b8c082547528203ac 504082 admin required dselect_1.13.20_i386.deb 0fb2886989b0e2a0c0dd58a8bcefe4be 109180 utils standard dpkg-dev_1.13.20_all.deb -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.3 (GNU/Linux) iD8DBQFEfSB9uW9ciZ2SjJsRArGvAJ9sAQyygl4I/OpJ6Pms0e5O9hMhVACfZtqH /57qVOrzOPGc0tNs8tDbPpI= =pQKz -----END PGP SIGNATURE-----
--- End Message ---

