Package: dpkg Version: 1.16.3 Severity: wishlist Currently, if a package provides or generates files in addition to those shipped in the .deb data.tar.gz, the package prerm/postrm needs to take care to ensure that these files are correctly cleaned up. However, given that the logic to generate the files may change between package versions, and that the cleanup logic needs to be kept in sync with the generation logic, there is a great potential for bugs here: either failing to cleanup files correctly, or deleting files owned by other packages or created by the admin.
It would be a great improvement if dpkg provided a mechanism to associate other files/dirs with the package, so that these would be automatically get removed when the package is removed. This would prevent the need to keep two or more scripts up-to-date with each other, and also avoid the mistakes in all the corner case scenarios which can lead to leaving a mess behind, or causing dataloss. It would also be useful if additional conffiles could be registered or deregistered so that these would additionally gain from correct --purge behaviour. It may also provide a useful mechanism for preserving a record of conffiles which are currently "forgotten" if the package drops them on upgrade. I would think such a mechanism would be required not to allow alteration of the packaged files in package.list. This would have the potential to cause random conflicts and break upgrades in unpredictable ways. Registration in a separate supplementary list would prevent this, and perhaps also allow for these extra files to be taken over by other packages. But it would permit supplementary files and conffiles to be added and removed during the lifetime of the package being installed, and give robust and consistent behaviour when it came to removal and purging. Maybe these could in /var/lib/dpkg/info/package.supplist and /var/lib/dpkg/info/suppconffiles (for example; I'm sure there are better naming schemes). I think such a change would greatly improve the quality and complexity of our maintainer scripts. Regards, Roger -- System Information: Debian Release: wheezy/sid APT prefers unstable APT policy: (550, 'unstable'), (500, 'testing'), (400, 'experimental') Architecture: amd64 (x86_64) Kernel: Linux 3.2.0-2-amd64 (SMP w/4 CPU cores) Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Versions of packages dpkg depends on: ii libbz2-1.0 1.0.6-1 ii libc6 2.13-32 ii libselinux1 2.1.9-4 ii tar 1.26-4 ii xz-utils 5.1.1alpha+20110809-3 ii zlib1g 1:1.2.7.dfsg-1 dpkg recommends no packages. Versions of packages dpkg suggests: ii apt 0.9.3 -- no debconf information -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org