Your message dated Sun, 3 Mar 2019 00:02:48 +0100 with message-id <[email protected]> and subject line Re: Bug#351573: dpkg: "trying script from the new package instead" actually runs old script again has caused the Debian Bug report #351573, regarding dpkg: "trying script from the new package instead" actually runs old script again to be marked as done.
This means that you claim that the problem has been dealt with. If this is not the case it is now your responsibility to reopen the Bug report if necessary, and/or fix the problem forthwith. (NB: If you are a system administrator and have no idea what this message is talking about, this may indicate a serious mail system misconfiguration somewhere. Please contact [email protected] immediately.) -- 351573: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=351573 Debian Bug Tracking System Contact [email protected] with problems
--- Begin Message ---Package: dpkg Version: 1.13.11.0.1 Severity: normal I made a syntax error in an emacs remove script, which caused the next package installation to fail. The dpkg message said it would try the smae script in the new package instead. However, fixing the error there didn't help: /usr/lib/emacsen-common/packages/remove/emacspeak-ss: line 9: accent: command not found sudo debi (Reading database ... 191714 files and directories currently installed.) Preparing to replace emacspeak-ss 1.9.1-2 (using emacspeak-ss_1.9.1-2_i386.deb) ... /usr/lib/emacsen-common/packages/remove/emacspeak-ss: line 9: accent: command not found emacs-package-remove: /usr/lib/emacsen-common/packages/remove/emacspeak-ss emacs emacs20 emacs21 xemacs21 failed at /usr/lib/emacsen-common/emacs-package-remove line 30. dpkg: warning - old pre-removal script returned error exit status 9 dpkg - trying script from the new package instead ... /usr/lib/emacsen-common/packages/remove/emacspeak-ss: line 9: accent: command not found emacs-package-remove: /usr/lib/emacsen-common/packages/remove/emacspeak-ss emacs emacs20 emacs21 xemacs21 failed at /usr/lib/emacsen-common/emacs-package-remove line 30. dpkg: error processing emacspeak-ss_1.9.1-2_i386.deb (--install): subprocess new pre-removal script returned error exit status 9 Errors were encountered while processing: emacspeak-ss_1.9.1-2_i386.deb Apparently it just re-ran the old script again. I manually installed the repaired script so dpkg could replace the package. Maybe dpkg's script substitution mechanism fails for emacsen removal scripts? - Jim Van Zandt -- System Information: Debian Release: testing/unstable APT prefers unstable APT policy: (990, 'unstable'), (500, 'oldstable'), (500, 'testing') Architecture: i386 (i686) Shell: /bin/sh linked to /bin/bash Kernel: Linux 2.6.14 Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968) Versions of packages dpkg depends on: ii coreutils [textutils] 5.2.1-2.1 The GNU core utilities ii libc6 2.3.5-6 GNU C Library: Shared libraries an ii textutils 5.2.1-2.1 The GNU text file processing utili dpkg recommends no packages. -- no debconf information
--- End Message ---
--- Begin Message ---Hi! On Mon, 2006-04-10 at 22:04:55 +0200, Nicolas François wrote: > On Sun, Feb 05, 2006 at 02:57:32PM -0500, James R. Van Zandt wrote: > > I made a syntax error in an emacs remove script, which caused the next > > package installation to fail. The dpkg message said it would try the > > smae script in the new package instead. However, fixing the error > > there didn't help: > > > > /usr/lib/emacsen-common/packages/remove/emacspeak-ss: line 9: accent: > > command not found > > sudo debi > > (Reading database ... 191714 files and directories currently installed.) > > Preparing to replace emacspeak-ss 1.9.1-2 (using > > emacspeak-ss_1.9.1-2_i386.deb) ... > > /usr/lib/emacsen-common/packages/remove/emacspeak-ss: line 9: accent: > > command not found > > emacs-package-remove: /usr/lib/emacsen-common/packages/remove/emacspeak-ss > > emacs emacs20 emacs21 xemacs21 failed at > > /usr/lib/emacsen-common/emacs-package-remove line 30. > > dpkg: warning - old pre-removal script returned error exit status 9 > > dpkg - trying script from the new package instead ... > > /usr/lib/emacsen-common/packages/remove/emacspeak-ss: line 9: accent: > > command not found > > emacs-package-remove: /usr/lib/emacsen-common/packages/remove/emacspeak-ss > > emacs emacs20 emacs21 xemacs21 failed at > > /usr/lib/emacsen-common/emacs-package-remove line 30. > > dpkg: error processing emacspeak-ss_1.9.1-2_i386.deb (--install): > > subprocess new pre-removal script returned error exit status 9 > > Errors were encountered while processing: > > emacspeak-ss_1.9.1-2_i386.deb > > > > Apparently it just re-ran the old script again. I manually installed > > the repaired script so dpkg could replace the package. > > > > Maybe dpkg's script substitution mechanism fails for emacsen removal > > scripts? > > > In the above log, dpkg did execute the prerm script of the second package, > but this second prerm uses the same > /usr/lib/emacsen-common/packages/remove/emacspeak-ss file (which is the > file containing the typo). > > > I'm not sure it can be fixed easily by either dpkg or dh_installemacsen (I > can't think of any other place to fix this): > * dpkg can't fix this because it only knows the package prerm script > * dh_installemacsen can't fix this because when the prerm script is > called, the files are not unpacked and thus dh_installemacsen can't use > the second emacsen's remove file. > > > Please dpkg maintainers, comment. (I may be completely wrong in the above > points). You are entirely right. The maintscripts were run correctly, but they rely on an installed file from the filesystem, which has not be updated yet. This is at most a packaging problem with how these packages are setup, but definitely not in dpkg. I'm thus closing this report. Thanks, Guillem
--- End Message ---

