Bug#679704: live-tools: fails to upgrade from wheezy: ln: failed to create symbolic link `/usr/bin/uptime': File exists
tags 679704 + patch thanks Hi, this happens, because the preinstal uncoditionally tries to create the symlink, w/o checking that it already is a symlink the live-uptime. Easy reproducable via apt-get install --reinstall live-tools, no need for an upgrade :) Attached is a patch which moves the creation of the symlink from the preinst (and removing of it in postrm) to the actual package (via live-tools.links). Upgrading 3.0.2-1 → 3.0.2-1.1 and 3.0.2-1.1 → 3.0.2-1.1 is tested, everything else is not. Regards Evgeni -- Bruce Schneier can read and understand Perl programs. From cf828f00b1c02e873e02ce3446d948a6d747bc6c Mon Sep 17 00:00:00 2001 From: Evgeni Golov evg...@debian.org Date: Thu, 5 Jul 2012 16:17:06 +0200 Subject: [PATCH] =?UTF-8?q?install=20the=20uptime=20=E2=86=92=20live-uptime=20?= =?UTF-8?q?link=20in=20the=20package,=20not=20in=20preinst?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- debian/live-tools.links |2 ++ debian/live-tools.postrm |2 -- debian/live-tools.preinst |2 -- 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/debian/live-tools.links b/debian/live-tools.links index 5a18980..76d2d47 100644 --- a/debian/live-tools.links +++ b/debian/live-tools.links @@ -5,3 +5,5 @@ /usr/share/man/de/man7/live-tools.7.gz /usr/share/man/de/man1/live-system.1.gz /usr/share/man/de/man7/live-tools.7.gz /usr/share/man/de/man1/live-toram.1.gz /usr/share/man/de/man7/live-tools.7.gz /usr/share/man/de/man1/live-uptime.1.gz + +/usr/bin/live-uptime /usr/bin/uptime diff --git a/debian/live-tools.postrm b/debian/live-tools.postrm index 6c06daa..6618670 100644 --- a/debian/live-tools.postrm +++ b/debian/live-tools.postrm @@ -4,8 +4,6 @@ set -e case ${1} in remove) - rm -f /usr/bin/uptime - dpkg-divert --package live-tools --quiet --remove --rename --divert /usr/bin/uptime.procps /usr/bin/uptime ;; diff --git a/debian/live-tools.preinst b/debian/live-tools.preinst index 8b02200..b505fce 100644 --- a/debian/live-tools.preinst +++ b/debian/live-tools.preinst @@ -5,8 +5,6 @@ set -e case ${1} in install|upgrade) dpkg-divert --package live-tools --quiet --add --rename --divert /usr/bin/uptime.procps /usr/bin/uptime - - ln -s /usr/bin/live-uptime /usr/bin/uptime ;; abort-upgrade) -- 1.7.10
Bug#679704: live-tools: fails to upgrade from wheezy: ln: failed to create symbolic link `/usr/bin/uptime': File exists
tag 679704 pending thanks On 07/05/2012 04:29 PM, Evgeni Golov wrote: Attached is a patch which moves the creation of the symlink from the preinst (and removing of it in postrm) to the actual package (via live-tools.links). i'll upload something similar to this in some minutes. -- Address:Daniel Baumann, Donnerbuehlweg 3, CH-3012 Bern Email: daniel.baum...@progress-technologies.net Internet: http://people.progress-technologies.net/~daniel.baumann/ -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#679704: live-tools: fails to upgrade from wheezy: ln: failed to create symbolic link `/usr/bin/uptime': File exists
On 07/05/2012 04:56 PM, Daniel Baumann wrote: i'll upload something similar to this in some minutes. s/something similar to this/exactely that/ thanks ;) -- Address:Daniel Baumann, Donnerbuehlweg 3, CH-3012 Bern Email: daniel.baum...@progress-technologies.net Internet: http://people.progress-technologies.net/~daniel.baumann/ -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#679704: live-tools: fails to upgrade from wheezy: ln: failed to create symbolic link `/usr/bin/uptime': File exists
Package: live-tools Version: 3.0.2-1 Severity: serious User: debian...@lists.debian.org Usertags: piuparts Hi, during a test with piuparts I noticed your package fails to upgrade from 'wheezy'. It installed fine in 'wheezy', then the upgrade to 'sid' fails. From the attached log (scroll to the bottom...): Preparing to replace live-tools 3.0.1-1 (using .../live-tools_3.0.2-1_all.deb) ... ln: failed to create symbolic link `/usr/bin/uptime': File exists dpkg: error processing /var/cache/apt/archives/live-tools_3.0.2-1_all.deb (--unpack): subprocess new pre-installation script returned error exit status 1 Errors were encountered while processing: /var/cache/apt/archives/live-tools_3.0.2-1_all.deb There wasn't any version of linux-containers installed in the chroot. cheers, Andreas live-tools_3.0.2-1.log.gz Description: GNU Zip compressed data