Processed: Re: Bug#665905: syslog-ng: fails to install, remove, distupgrade, and install again
Processing commands for cont...@bugs.debian.org: > tag 665905 + patch Bug #665905 [syslog-ng] syslog-ng: fails to install, remove, distupgrade, and install again Added tag(s) patch. > thanks Stopping processing here. Please contact me if you need assistance. -- 665905: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=665905 Debian Bug Tracking System Contact ow...@bugs.debian.org with problems -- To UNSUBSCRIBE, email to debian-bugs-rc-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Bug#665905: syslog-ng: fails to install, remove, distupgrade, and install again
tag 665905 + patch thanks > Nevertheless, I'll leave it at serious for now, and try to figure out > how to fix the situation properly. Turns out, once I understood the problem, fixing it was rather trivial. Patch attached. -- |8] commit b0b2a4f541c15941d0038229ee75fa5692ba2e64 Author: Gergely Nagy Date: Fri Apr 6 16:39:15 2012 +0200 debian: Fix the squeeze->wheezy install-remove-install upgrade When one installed syslog-ng in squeeze, and removed it, then dist-upgrades to wheezy, and tries to install syslog-ng again, it won't automatically work, because the logrotate script was moved from syslog-ng to syslog-ng-core, and the preinst wasn't clever enough to deal with this situation. The way to solve this is to move the .disabled file back to its place under the following conditions (assuming the postinst is called with 'install' as its first parameter, and the .disabled file exists): * It's either an install when there was a former syslog-ng-core version. * Or it's an install where there was no former syslog-ng-core installation, and the destination file doesn't exist yet. This supports both the install-remove-install case that span squeeze->wheezy, and works even between wheezy->wheezy versions. Reported-by: Andreas Beckmann Signed-off-by: Gergely Nagy Closes: #665905 diff --git a/debian/syslog-ng-core.preinst b/debian/syslog-ng-core.preinst index 1f7d8c4..9296632 100644 --- a/debian/syslog-ng-core.preinst +++ b/debian/syslog-ng-core.preinst @@ -2,8 +2,14 @@ set -e -if [ "$1" = "install" -a -n "$2" ] ; then - [ -f /etc/logrotate.d/syslog-ng.disabled ] && mv -f /etc/logrotate.d/syslog-ng.disabled /etc/logrotate.d/syslog-ng +if [ "$1" = "install" ]; then +if [ -f /etc/logrotate.d/syslog-ng.disabled ]; then +if [ -n "$2" ]; then +mv -f /etc/logrotate.d/syslog-ng.disabled /etc/logrotate.d/syslog-ng +elif [ ! -f /etc/logrotate.d/syslog-ng ]; then +mv -f /etc/logrotate.d/syslog-ng.disabled /etc/logrotate.d/syslog-ng +fi +fi fi #DEBHELPER#
Bug#665905: syslog-ng: fails to install, remove, distupgrade, and install again
Andreas Beckmann writes: > Package: syslog-ng > Version: 3.3.4.dfsg-2 > Severity: serious > User: debian...@lists.debian.org > Usertags: piuparts > > Hi, > > during a test with piuparts I noticed your package failed to install > (in 'squeeze'), remove (but not purge), distupgrade to 'wheezy', > and install again. Oh, damn, this'll be horrible to fix. The logrotate file was moved from the syslog-ng package to syslog-ng-core, and the postinst/preinst magic that was supposed to disable rotation if the package is removed (but not purged) bit me. Personally, I'd lower the severity to important, since the package CAN be installed again in wheezy if it was removed in squeeze, if one answers the prompt. Nevertheless, I'll leave it at serious for now, and try to figure out how to fix the situation properly. Thanks for the report! By the way, may I ask what version of piuparts you used? Mine (on sid) does not seem to know the --install-remove-install option, which is needed to trigger this bug. (I've been testing the package with piuparts and manually too - to make sure upgrades work after the split. I never thought of the install+remove in squeeze followed by a reinstall in wheezy scenario...) -- |8] -- To UNSUBSCRIBE, email to debian-bugs-rc-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Bug#665905: syslog-ng: fails to install, remove, distupgrade, and install again
Package: syslog-ng Version: 3.3.4.dfsg-2 Severity: serious User: debian...@lists.debian.org Usertags: piuparts Hi, during a test with piuparts I noticed your package failed to install (in 'squeeze'), remove (but not purge), distupgrade to 'wheezy', and install again. Before the second installation the package is in config-files-remaining state. The configuration is remaining from the last version that was successfully configured - which is from the previous release. Like a plain failure on initial install this makes the package too buggy for a release, thus the severity. >From the attached log (scroll to the bottom...): Setting up syslog-ng-core (3.3.4.dfsg-2) ... Installing new version of config file /etc/default/syslog-ng ... Installing new version of config file /etc/init.d/syslog-ng ... Configuration file `/etc/logrotate.d/syslog-ng' ==> Deleted (by you or by a script) since installation. ==> Package distributor has shipped an updated version. What would you like to do about it ? Your options are: Y or I : install the package maintainer's version N or O : keep your currently-installed version D : show the differences between the versions Z : start a shell to examine the situation The default action is to keep your current version. *** syslog-ng (Y/I/N/O/D/Z) [default=N] ? dpkg: error processing syslog-ng-core (--configure): EOF on stdin at conffile prompt cheers, Andreas syslog-ng_3.3.4.dfsg-2.log.gz Description: GNU Zip compressed data