Bug#911616: emacs-common: copyright file missing after upgrade of emacs-nox from stretch
Followup-For: Bug #911616 Control: tag -1 pending Control: tag 875430 pending Control: tag 910925 pending Control: tag 690771 pending Control: tag 918646 pending Hi Rob, this issue is cuasing a lot of upgrade failures in piuparts. I've prepared a NMU of the emacs package fixing this and some more issues and uploaded to DELAYED/5. Please let me know if I should delay it longer. It fixes all the RC issues and some more trivial ones, I also did some further packaging cleanup to reduce the amount of issues reported by lintian. I'll probably followup with another upload adding some more transitional packages (#916758). You can find all the changes in the master branch of https://salsa.debian.org/anbe/deb-emacs (I'll push the tag once the package has been accepted into unstable). Note that your repository does not contain any branches for emacs 26.1, there are only the tags, so I started my work from the latest tag. Once you settled the branch issue, the Vcs-Git URL should get a " -b some/branch" appended. Andreas
Bug#911616: emacs-common: copyright file missing after upgrade of emacs-nox from stretch
Followup-For: Bug #911616 Control: tag -1 patch Control: found -1 1:26.1+1-3 Hi, attached you can find a patch that should properly handle the dir_to_symlink conversion manually. I tested this on the stretch->buster upgrade path of two previously failing packages in my piuparts engine. Andreas >From d205f2459ad0f7be2f4f37b37a095c86b904f5eb Mon Sep 17 00:00:00 2001 From: Andreas Beckmann Date: Wed, 16 Jan 2019 03:37:44 +0100 Subject: [PATCH] Really handle the emacs-{gtk,lucid,nox} doc dir transition manually reimplementing the guts of dir_to_symlink is quite easy: in the postinst replace the empty directory with the intended symlink caveats compared to dpkg-maintscript-helper: * fails during postinst (not preinst) if the directory is not empty * absolutely no rollback or downgrade support --- debian/emacsVAR.postinst | 14 ++ debian/emacsVAR.preinst | 23 --- debian/rules | 3 --- 3 files changed, 14 insertions(+), 26 deletions(-) delete mode 100644 debian/emacsVAR.preinst diff --git a/debian/emacsVAR.postinst b/debian/emacsVAR.postinst index 8dadd23a896..fcadb1c4540 100644 --- a/debian/emacsVAR.postinst +++ b/debian/emacsVAR.postinst @@ -2,6 +2,20 @@ set -e +# Manual dir_to_symlink conversion since dpkg-maintscript-helper does not +# handle this in combination with arch:all to arch:any switches (#813455). +# Keep this code for buster and bullseye to ease backports. +if [ "$1" = "configure" ] && dpkg --compare-versions "$2" lt-nl "1:26.1+1-4~" +then + test -n '@PKG_NAME@' + if [ -d /usr/share/doc/@PKG_NAME@ ] && [ ! -h /usr/share/doc/@PKG_NAME@ ] + then + # This will intentionally fail if the directory is not empty. + rmdir /usr/share/doc/@PKG_NAME@ + ln -sv emacs-common /usr/share/doc/@PKG_NAME@ + fi +fi + update-alternatives \ --install /usr/bin/emacs emacs \ /usr/bin/emacs-@X_SUPPORT@ @BIN_PRIORITY@ \ diff --git a/debian/emacsVAR.preinst b/debian/emacsVAR.preinst deleted file mode 100644 index 26aac393c65..000 --- a/debian/emacsVAR.preinst +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/sh - -set -e - -doc_dir=/usr/share/doc/@PKG_NAME@ - -test '@PKG_NAME@' - -case "$1" in -install|upgrade) -# Before the unversioning, emacs-{gtk,lucid,nox} packages were -# in a different source package (emacs-defaults) and were arch -# all, and dpkg can't handle dir to symlink transitions. -rm -rf "$doc_dir" -;; -abort-upgrade) -;; -*) -echo "unexpected $(basename "$0") argument" -;; -esac - -#DEBHELPER# diff --git a/debian/rules b/debian/rules index 6a3c40a2833..b2bd4931fcc 100755 --- a/debian/rules +++ b/debian/rules @@ -129,12 +129,9 @@ nonpersistent_autogen_install_files := \ debian/emacs-common.postinst \ debian/emacs-common.prerm \ debian/emacs-nox.postinst \ - debian/emacs-nox.preinst \ debian/emacs-nox.prerm \ debian/emacs-lucid.postinst \ - debian/emacs-lucid.preinst \ debian/emacs-lucid.prerm \ - debian/emacs-gtk.preinst \ debian/emacs-gtk.postinst \ debian/emacs-gtk.prerm -- 2.11.0
Bug#911616: emacs-common: copyright file missing after upgrade of emacs-nox from stretch
Andreas Beckmann writes: > You most likely want to drop the .preinst and create > emacs-nox.maintscript instead with this content (one line): > > < 8< debian/emacs-nox.maintscript > > dir_to_symlink /usr/share/doc/emacs-nox emacs-common 1:25.2+1-12~ > < >8 > > > and do the same for -gtk and -lucid with adjusted paths. Hmm, so we actually had that, and then intentionally switched to a manual approach here: https://salsa.debian.org/rlb/deb-emacs/commit/c60e9080df0d924d6a45e77725c11959926f24a7 commit c60e9080df0d924d6a45e77725c11959926f24a7 Author: Rob Browning Date: Sun Aug 12 11:52:59 2018 -0500 Handle the emacs-{gtk,lucid,nox} doc dir transition manually Before the unversioning, these packages were in a different source package (emacs-defaults) and were arch all. Since dpkg-mainscript-helper can't hande "all to any" transitions (https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=813455), clean up manually in the preinsts. Thanks to Sven Joachim for reporting the problem and indentifying the underlying cause. Closes: 90 Assuming I understand the situation correctly, it doesn't look like the original issue has been resolved -- if not, then perhaps we need to improve the manual handling instead? Thanks for the help -- Rob Browning rlb @defaultvalue.org and @debian.org GPG as of 2011-07-10 E6A9 DA3C C9FD 1FF8 C676 D2C4 C0F0 39E9 ED1B 597A GPG as of 2002-11-03 14DD 432F AE39 534D B592 F9A0 25C8 D377 8C7E 73A4
Bug#911616: emacs-common: copyright file missing after upgrade of emacs-nox from stretch
On Mon, 22 Oct 2018 17:49:39 +0200 Andreas Beckmann wrote: > This does not seem to be the typical dir_to_symlink problem. It is. Just badly handled so that it became hard to recognize. from emacs-nox.preinst: doc_dir=/usr/share/doc/emacs-nox case "$1" in install|upgrade) # Before the unversioning, emacs-{gtk,lucid,nox} packages were # in a different source package (emacs-defaults) and were arch # all, and dpkg can't handle dir to symlink transitions. rm -rf "$doc_dir" ;; There is dpkg-maintscript-helper for this task. You most likely want to drop the .preinst and create emacs-nox.maintscript instead with this content (one line): < 8< debian/emacs-nox.maintscript > dir_to_symlink /usr/share/doc/emacs-nox emacs-common 1:25.2+1-12~ < >8 > and do the same for -gtk and -lucid with adjusted paths. Andreas
Bug#911616: emacs-common: copyright file missing after upgrade of emacs-nox from stretch
Followup-For: Bug #911616 Control: affects -1 + emacs-nox and the logfile ... Andreas emacs-nox_1:25.2+1-11.log.gz Description: application/gzip
Bug#911616: emacs-common: copyright file missing after upgrade of emacs-nox from stretch
Package: emacs-common Version: 1:25.2+1-11 Severity: serious User: debian...@lists.debian.org Usertags: piuparts Hi, a test with piuparts revealed that your package misses the copyright file after an upgrade, which is a violation of Policy 12.5: https://www.debian.org/doc/debian-policy/ch-docs.html#copyright-information This was observed on the following upgrade paths: stretch -> buster >From the attached log (scroll to the bottom...): 0m37.6s ERROR: FAIL: debsums reports modifications inside the chroot: debsums: missing file /usr/share/doc/emacs-common/copyright (from emacs-common package) This does not seem to be the typical dir_to_symlink problem. cheers, Andreas