[Pkg-xen-changes] r304 - in trunk/xen-unstable/debian: bin templates
Bastian Blank
waldi at costa.debian.org
Wed Sep 6 15:09:11 UTC 2006
Author: waldi
Date: Wed Sep 6 15:09:09 2006
New Revision: 304
Added:
trunk/xen-unstable/debian/templates/xen-hypervisor.postinst.in
trunk/xen-unstable/debian/templates/xen-hypervisor.postrm.in
Modified:
trunk/xen-unstable/debian/bin/gencontrol.py
Log:
Call update-grub if available from hypervisor postinst and postrm scripts.
* debian/bin/gencontrol.py: Generate postinst and postrm for hypervisor.
* debian/templates/xen-hypervisor.postinst.in,
debian/templates/xen-hypervisor.postrm.in: Add.
Modified: trunk/xen-unstable/debian/bin/gencontrol.py
==============================================================================
--- trunk/xen-unstable/debian/bin/gencontrol.py (original)
+++ trunk/xen-unstable/debian/bin/gencontrol.py Wed Sep 6 15:09:09 2006
@@ -95,6 +95,12 @@
package['Architecture'] = [arch]
packages.append(package)
+ package_name = packages_own[0]['Package']
+
+ for i in ('postinst', 'postrm'):
+ j = self.substitute(self.templates["xen-hypervisor.%s" % i], vars)
+ file("debian/%s.%s" % (package_name, i), 'w').write(j)
+
cmds_binary_arch = []
cmds_binary_arch.append(("$(MAKE) -f debian/rules.real binary-arch-flavour %s" % makeflags,))
cmds_build = []
Added: trunk/xen-unstable/debian/templates/xen-hypervisor.postinst.in
==============================================================================
--- (empty file)
+++ trunk/xen-unstable/debian/templates/xen-hypervisor.postinst.in Wed Sep 6 15:09:09 2006
@@ -0,0 +1,21 @@
+#!/bin/bash
+
+set -e
+
+case "$1" in
+ configure)
+ command -v update-grub > /dev/null && update-grub
+ ;;
+
+ abort-upgrade|abort-remove|abort-deconfigure)
+ ;;
+
+ *)
+ echo "postinst called with unknown argument \`$1'" >&2
+ exit 1
+ ;;
+esac
+
+#DEBHELPER#
+
+exit 0
Added: trunk/xen-unstable/debian/templates/xen-hypervisor.postrm.in
==============================================================================
--- (empty file)
+++ trunk/xen-unstable/debian/templates/xen-hypervisor.postrm.in Wed Sep 6 15:09:09 2006
@@ -0,0 +1,21 @@
+#!/bin/bash
+
+set -e
+
+case "$1" in
+ remove)
+ command -v update-grub > /dev/null && update-grub
+ ;;
+
+ purge|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
+ ;;
+
+ *)
+ echo "postrm called with unknown argument \`$1'" >&2
+ exit 1
+ ;;
+esac
+
+#DEBHELPER#
+
+exit 0
More information about the Pkg-xen-changes
mailing list