For any deb packages that do not contain a file named conffiles inside the control.tar.gz archive, the busybox dpkg applet fails to populate the /var/lib/dpkg/info/package.list file with the files provided by the new package. This means when the package is removed or purged, all the original files remain in place on the filesystem, but the dpkg database is updated to indicate they've been removed. The root of this problem seems to be the fact that the get_header_tar() function in archival/libunarchive/get_header_tar.c populates the "archive_handle->passed" list only if an archive_handle->accept or archive_handle->reject list exists. For deb packages that contain a conffiles file, unpack_package() in archival/dpkg.c successfully creates the archive_handle->accept list. For deb packages without conffiles, archive_handle->accept is not required, and is never created, therefore get_header_tar() never creates the archive_handle->passed list. The archive_handle->passed list is later used to populate the package.list file. If anyone who knows what they're doing can make a fix, it'd be appreciated, otherwise I'll just mash something together and submit a patch on Monday.
Created attachment 3812 [details] Proposed dpkg fix This has been tested and fixes the problem. My compiler gives 1 warning. I can't figure out where/if the list item memory is correctly freed though, but it's no worse than previous.