Package: dpkg-repack
Version: 1.46
Severity: normal

Hi,

the localepurge package can be used to automatically remove unneeded locale
files (and thereby conserve disk space as well as inodes).

dpkg-repack used to just print warnings for non-existent files, but
currently it fails on such packages and only prints a vague warning, e.g.:

dpkg-repack: warning: problems found processing kde-style-breeze, the package 
may be broken

In fact, no actual .deb is generated at all; the dpkg build directory is
missing DEBIAN/control.

Please do one or more of the following:

1. turn this error into a warning again (in line 248, replace 'error("cannot 
find file '$fn'")' with 'warning("cannot find file '$fn'")').

2. make sure the actual error message is printed, in addition to the vague 
warning; also, make it clear that no .deb was generated and that dpkg-repack 
exits unsuccessfully.

3. make this behaviour depend on a command line option; e.g. 
--ignore-missing-files, or --ignore-missing-locale, or --fail-on-missing-files 
or whatever.

I would argue that if files are missing, the generated .deb should just not
contain them. After all, dpkg-repack's description says "dpkg-repack creates
a .deb file out of a package that has already been installed. If any changes
have been made to the package while it was unpacked (i.e. files in /etc were
modified), the new package will inherit the changes.

This utility can make it easy to copy packages from one computer to another,
or to recreate packages that are installed on your system, but no longer
available elsewhere, or to store the current state of a package before you
upgrade it."

Removing files represents "changes made to the package" that dpkg-repack
should preserve.

Whether the .list file should include the missing files or not is an
interesting question, but irrelevant for my use case (backup before
upgrade); I think it would be better to include them if possible, because
then if you install the generated .deb, it's still obvious that those files
are missing from it.

Best regards,

AndrĂ¡s

-- System Information:
Debian Release: 10.0
  APT prefers stable
  APT policy: (350, 'stable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.4.207-vs2.3.9.8 (SMP w/8 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=hu_HU.UTF-8 (charmap=UTF-8), 
LANGUAGE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash
Init: runit (via /run/runit.stopit)

Versions of packages dpkg-repack depends on:
ii  libdpkg-perl  1.19.7
ii  perl          5.30.0-9

dpkg-repack recommends no packages.

Versions of packages dpkg-repack suggests:
ii  fakeroot  1.24-1

-- no debconf information

-- 
 The important thing is that we are moving forward - never mind the direction.

Reply via email to