Hi pabs, Thanks for your bugreport.
在 2021/12/8 上午8:45, Paul Wise 写道:
Package: ftp Version: 20210827-3 Severity: normal Usertags: warnings When I upgraded the ftp binary package from 0.17-35 to 20210827-3, the tnftp invocation of update-alternatives gave a warning about the netkit-ftp alternative being missing.
The warnings is trigger by tnftp.postinst when user never install tnftp before when upgrade.
First tnftp was unpacked, then the old ftp package files removed, the new ftp transitional package files unpacked, then the tnftp postinst was run and then the ftp transitional package postinst was run. https://www.debian.org/doc/debian-policy/ap-flowcharts.html I think the correct solution is for the new ftp preinst to remove the netkit-ftp alternative before the old ftp files are removed.
Yes, it's a good way to fix this bug. I'd git commit in salsa and tested in my local: 1. apt purge ftp tnftp -y;apt -y install ftp/stable [...] 2. dpkg --debug=2 -i ./ftp_20210827-4_all.deb ./tnftp_20210827-4_amd64.deb (Reading database ... 270326 files and directories currently installed.) Preparing to unpack ./ftp_20210827-4_all.deb ... D000002: fork/exec /var/lib/dpkg/info/ftp.prerm ( upgrade 20210827-4 )D000002: fork/exec /var/lib/dpkg/tmp.ci/preinst ( upgrade 0.17-34.1.1 20210827-4 )
Unpacking ftp (20210827-4) over (0.17-34.1.1) ...D000002: maintscript_fallback nonexistent postrm '/var/lib/dpkg/info/ftp.postrm'
D000002: process_archive info unlinked /var/lib/dpkg/info/ftp.postinstD000002: process_archive info installed /var/lib/dpkg/tmp.ci/md5sums as /var/lib/dpkg/info/ftp.md5sums
D000002: process_archive info unlinked /var/lib/dpkg/info/ftp.prermD000002: process_archive tmp.ci script/file '/var/lib/dpkg/tmp.ci/preinst' installed as '/var/lib/dpkg/info/ftp.preinst'
D000002: process_archive tmp.ci script/file '..' contains dotD000002: process_archive tmp.ci script/file '/var/lib/dpkg/tmp.ci/control' is control
D000002: process_archive tmp.ci script/file '.' contains dot Selecting previously unselected package tnftp. Preparing to unpack ./tnftp_20210827-4_amd64.deb ... D000002: maintscript_new nonexistent preinst '/var/lib/dpkg/tmp.ci/preinst' Unpacking tnftp (20210827-4) ... D000002: process_archive tmp.ci script/file '..' contains dotD000002: process_archive tmp.ci script/file '/var/lib/dpkg/tmp.ci/postinst' installed as '/var/lib/dpkg/info/tnftp.postinst' D000002: process_archive tmp.ci script/file '/var/lib/dpkg/tmp.ci/prerm' installed as '/var/lib/dpkg/info/tnftp.prerm' D000002: process_archive tmp.ci script/file '/var/lib/dpkg/tmp.ci/control' is control
D000002: process_archive tmp.ci script/file '.' contains dotD000002: process_archive tmp.ci script/file '/var/lib/dpkg/tmp.ci/md5sums' installed as '/var/lib/dpkg/info/tnftp.md5sums'
Setting up tnftp (20210827-4) ... D000002: fork/exec /var/lib/dpkg/info/tnftp.postinst ( configure )update-alternatives: using /usr/bin/tnftp to provide /usr/bin/ftp (ftp) in auto mode
Setting up ftp (20210827-4) ... D000002: vmaintscript_installed nonexistent postinst Processing triggers for man-db (2.9.4-2) ...D000002: fork/exec /var/lib/dpkg/info/man-db.postinst ( triggered /usr/share/man )
There is not warnings now. I just upload the new version to mentors.d.n [1], welcome to help to review. [1] https://mentors.debian.net/package/tnftp/
Another solution might be for the tnftp postinst to remove the netkit-ftp alternative before adding the tnftp alternative. I didn't test either of the potential solutions though. Package installation log: Log started: 2021-12-08 06:16:28 apt-listchanges: Reading changelogs... apt-listchanges: Mailing root: apt-listchanges: changelogs for chianamo apt-listchanges: Reading changelogs... Selecting previously unselected package tnftp. Preparing to unpack .../tnftp_20210827-2_amd64.deb ... Unpacking tnftp (20210827-2) ... Preparing to unpack .../ftp_20210827-3_all.deb ... Unpacking ftp (20210827-3) over (0.17-35) ... Setting up tnftp (20210827-2) ... update-alternatives: warning: alternative /usr/bin/netkit-ftp (part of link group ftp) doesn't exist; removing from list of alternatives update-alternatives: warning: /etc/alternatives/ftp is dangling; it will be updated with best choice update-alternatives: using /usr/bin/tnftp to provide /usr/bin/ftp (ftp) in auto mode Setting up ftp (20210827-3) ... Processing triggers for man-db (2.9.4-2) ... [master 4edb9812] committing changes in /etc made by "/usr/bin/python3 /usr/bin/unattended-upgrade" 5 files changed, 2 insertions(+), 5 deletions(-) delete mode 120000 alternatives/netrc.5.gz delete mode 120000 alternatives/pftp delete mode 120000 alternatives/pftp.1.gz Log ended: 2021-12-08 06:16:55
Regards, -- 肖盛文 xiao sheng wen Faris Xiao 微信(wechat):atzlinux 《铜豌豆 Linux》https://www.atzlinux.com 基于 Debian 的 Linux 中文 桌面 操作系统 Debian QA page: https://qa.debian.org/developer.php?login=atzlinux%40sina.com GnuPG Public Key: 0x00186602339240CB
OpenPGP_0x00186602339240CB.asc
Description: OpenPGP public key
OpenPGP_signature
Description: OpenPGP digital signature