[SCM] live-tools branch, debian, updated. debian/3.0.8-1-4-g31d9b4a

Daniel Baumann daniel at debian.org
Thu Aug 16 10:00:14 UTC 2012


The following commit has been merged in the debian branch:
commit 31d9b4af2c8c3ad91ad3d4c9a03ec46a47305eb9
Author: Daniel Baumann <daniel at debian.org>
Date:   Thu Aug 16 11:56:02 2012 +0200

    Renaming divertion of uptime from procps to /usr/bin/uptime.orig.procps to workaround the nasty auto-alternative in procps.
    
    This is very unfortunate, the procps package does *conditional* handling of
    alternatives for /usr/bin/uptime depending on if there is a
    /usr/bin/uptime.procps existing. For our case, this makes live very hard:
    
      * if there would always be an alternative, we could use register our
        live-uptime as an alternative and give it a higher priority.
    
      * if there would never be an alternative, we could simply divert the
        original uptime and use our live-uptime instead.
    
    Now, since procps does a conditional alternative, we need to make sure
    we do not hit this, hence using /usr/bin/uptime.orig.procps instead of
    /usr/bin/uptime.procps when diverting /usr/bin/uptime in order to not
    trap into the automatic alternative creation in procps maintainer scripts.

diff --git a/bin/live-uptime b/bin/live-uptime
index cecbf84..3f5c7ba 100755
--- a/bin/live-uptime
+++ b/bin/live-uptime
@@ -10,9 +10,9 @@
 
 set -e
 
-if [ ! -e /usr/bin/uptime.procps ]
+if [ ! -e /usr/bin/uptime.orig.procps ]
 then
-	echo "E: /usr/bin/uptime.procps - command not found"
+	echo "E: /usr/bin/uptime.orig.procps - command not found"
 	echo "E: On Debian based systems, uptime from procps"
 	echo "E: can be installed with:"
 	echo "E:   apt-get install procps"
@@ -20,7 +20,7 @@ then
 	exit 1
 fi
 
-_UPTIME="$(/usr/bin/uptime.procps)"
+_UPTIME="$(/usr/bin/uptime.orig.procps)"
 
 _DATE_HOST="$(date +%s)"
 
diff --git a/debian/live-tools.postrm b/debian/live-tools.postrm
index a94a350..4cf305a 100644
--- a/debian/live-tools.postrm
+++ b/debian/live-tools.postrm
@@ -9,8 +9,8 @@ case "${1}" in
 		dpkg-divert --package live-tools --quiet --remove --rename --divert /usr/share/man/man8/update-initramfs.initramfs-tools.8.gz /usr/share/man/man8/update-initramfs.8.gz
 
 		# procps: uptime
-		dpkg-divert --package live-tools --quiet --remove --rename --divert /usr/bin/uptime.procps /usr/bin/uptime
-		dpkg-divert --package live-tools --quiet --remove --rename --divert /usr/share/man/man1/uptime.procps.1.gz /usr/share/man/man1/uptime.1.gz
+		dpkg-divert --package live-tools --quiet --remove --rename --divert /usr/bin/uptime.orig.procps /usr/bin/uptime
+		dpkg-divert --package live-tools --quiet --remove --rename --divert /usr/share/man/man1/uptime.orig.procps.1.gz /usr/share/man/man1/uptime.1.gz
 		;;
 
 	purge|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
diff --git a/debian/live-tools.preinst b/debian/live-tools.preinst
index 56820c8..e422ff6 100644
--- a/debian/live-tools.preinst
+++ b/debian/live-tools.preinst
@@ -9,8 +9,8 @@ case "${1}" in
 		dpkg-divert --package live-tools --quiet --add --rename --divert /usr/share/man/man8/update-initramfs.initramfs-tools.8.gz /usr/share/man/man8/update-initramfs.8.gz
 
 		# procps: uptime
-		dpkg-divert --package live-tools --quiet --add --rename --divert /usr/bin/uptime.procps /usr/bin/uptime
-		dpkg-divert --package live-tools --quiet --add --rename --divert /usr/share/man/man1/uptime.procps.1.gz /usr/share/man/man1/uptime.1.gz
+		dpkg-divert --package live-tools --quiet --add --rename --divert /usr/bin/uptime.orig.procps /usr/bin/uptime
+		dpkg-divert --package live-tools --quiet --add --rename --divert /usr/share/man/man1/uptime.orig.procps.1.gz /usr/share/man/man1/uptime.1.gz
 		;;
 
 	abort-upgrade)

-- 
live-tools



More information about the debian-live-changes mailing list