Package: deborphan Version: 1.7.31 Severity: normal Trying to use `deborphan --add-keep` with an empty or absent keep file fails:
deborphan: fseek on /var/lib/deborphan/keep: Invalid argument strace says the failing seek is: openat(AT_FDCWD, "/var/lib/deborphan/keep", O_RDWR|O_CREAT|O_APPEND, 0666) = 3 fstat(3, {st_mode=S_IFREG|0644, st_size=0, ...}) = 0 fstat(3, {st_mode=S_IFREG|0644, st_size=0, ...}) = 0 lseek(3, -4096, SEEK_SET) = -1 EINVAL (Invalid argument) Checking the source, this code in keep.c looks suspect: // ... check if the final newline is missing ... if (fseek(fp, -1L, SEEK_END) < 0) { error(EXIT_FAILURE, errno, "fseek on %s", kfile); } That's not going to work on an empty file. Editing the keep file by hand to put an entry, or just a blank line, in it makes it work, but the default installation state of the package is non-functional. -- System Information: Debian Release: 10.0 APT prefers testing APT policy: (990, 'testing'), (500, 'stable-updates'), (500, 'stable'), (490, 'unstable') Architecture: amd64 (x86_64) Foreign Architectures: i386 Kernel: Linux 4.19.0-4-amd64 (SMP w/8 CPU cores) Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE=en_US.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Init: systemd (via /run/systemd/system) LSM: AppArmor: enabled Versions of packages deborphan depends on: ii libc6 2.28-10 Versions of packages deborphan recommends: ii apt 1.8.1 ii dialog 1.3-20190211-1 ii gettext-base 0.19.8.1-9 deborphan suggests no packages. -- no debconf information