[28739] in Source-Commits

home help back first fref pref prev next nref lref last post

athrun commit [debian]: Create /bin/attachandrun symlink in postinst, to support merged /usr

daemon@ATHENA.MIT.EDU (Anders Kaseorg)
Mon Nov 14 17:32:16 2016

Date: Mon, 14 Nov 2016 17:32:14 -0500
From: Anders Kaseorg <andersk@mit.edu>
Message-Id: <201611142232.uAEMWEZf002659@drugstore.mit.edu>
To: source-commits@mit.edu

https://github.com/mit-athena/athrun/commit/31dea0b754e6b2d14c21a608d36fa03fcb4b2c1d
commit 31dea0b754e6b2d14c21a608d36fa03fcb4b2c1d
Author: Anders Kaseorg <andersk@mit.edu>
Date:   Mon Nov 14 17:30:13 2016 -0500

    Create /bin/attachandrun symlink in postinst, to support merged /usr
    
    Signed-off-by: Anders Kaseorg <andersk@mit.edu>

 debian/changelog                       |    6 ++++
 debian/debathena-attachandrun.links    |    1 -
 debian/debathena-attachandrun.postinst |   41 +++++++++++++++++++++++++++++++
 debian/debathena-attachandrun.postrm   |   42 ++++++++++++++++++++++++++++++++
 4 files changed, 89 insertions(+), 1 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 3d88b54..bc8495b 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+debathena-athrun (10.3.1-0debathena4) unstable; urgency=medium
+
+  * Create /bin/attachandrun symlink in postinst, to support merged /usr.
+
+ -- Anders Kaseorg <andersk@mit.edu>  Mon, 14 Nov 2016 17:29:28 -0500
+
 debathena-athrun (10.3.1-0debathena3) unstable; urgency=medium
 
   * Replace dh-python with a correct versioned dependency on python
diff --git a/debian/debathena-attachandrun.links b/debian/debathena-attachandrun.links
deleted file mode 100644
index f5e6362..0000000
--- a/debian/debathena-attachandrun.links
+++ /dev/null
@@ -1 +0,0 @@
-usr/bin/attachandrun bin/attachandrun
diff --git a/debian/debathena-attachandrun.postinst b/debian/debathena-attachandrun.postinst
new file mode 100644
index 0000000..f230a47
--- /dev/null
+++ b/debian/debathena-attachandrun.postinst
@@ -0,0 +1,41 @@
+#!/bin/sh
+# postinst script for debathena-attachandrun
+#
+# see: dh_installdeb(1)
+
+set -e
+
+# summary of how this script can be called:
+#        * <postinst> `configure' <most-recently-configured-version>
+#        * <old-postinst> `abort-upgrade' <new version>
+#        * <conflictor's-postinst> `abort-remove' `in-favour' <package>
+#          <new-version>
+#        * <postinst> `abort-remove'
+#        * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
+#          <failed-install-package> <version> `removing'
+#          <conflicting-package> <version>
+# for details, see https://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+
+case "$1" in
+    configure)
+        if [ ! -e /bin/attachandrun ]; then
+            ln -ns /usr/bin/attachandrun /bin/attachandrun
+        fi
+        ;;
+
+    abort-upgrade|abort-remove|abort-deconfigure)
+        ;;
+
+    *)
+        echo "postinst called with unknown argument \`$1'" >&2
+        exit 1
+        ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
diff --git a/debian/debathena-attachandrun.postrm b/debian/debathena-attachandrun.postrm
new file mode 100644
index 0000000..7e9b021
--- /dev/null
+++ b/debian/debathena-attachandrun.postrm
@@ -0,0 +1,42 @@
+#!/bin/sh
+# postrm script for debathena-attachandrun
+#
+# see: dh_installdeb(1)
+
+set -e
+
+# summary of how this script can be called:
+#        * <postrm> `remove'
+#        * <postrm> `purge'
+#        * <old-postrm> `upgrade' <new-version>
+#        * <new-postrm> `failed-upgrade' <old-version>
+#        * <new-postrm> `abort-install'
+#        * <new-postrm> `abort-install' <old-version>
+#        * <new-postrm> `abort-upgrade' <old-version>
+#        * <disappearer's-postrm> `disappear' <overwriter>
+#          <overwriter-version>
+# for details, see https://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+
+case "$1" in
+    remove)
+        if [ -L /bin/attachandrun ]; then
+            rm /bin/attachandrun
+        fi
+        ;;
+
+    purge|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
+        ;;
+
+    *)
+        echo "postrm called with unknown argument \`$1'" >&2
+        exit 1
+        ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0

home help back first fref pref prev next nref lref last post