summaryrefslogtreecommitdiff
path: root/debian
diff options
context:
space:
mode:
authorColin Watson <cjwatson@ubuntu.com>2010-08-20 02:20:04 +0100
committerLeann Ogasawara <leann.ogasawara@canonical.com>2010-08-20 16:03:52 -0700
commit46ba512c8523f473a1354c5ec2b6ce058d094263 (patch)
tree336c3608259e728b69b45d1364d53a3a619834d9 /debian
parent7b4fdbc9f028b06e2b841141b3d9fdca9212c47b (diff)
UBUNTU: Pass DEB_MAINT_PARAMS to hook scripts
This matches http://svn.debian.org/viewsvn/kernel/dists/trunk/linux-2.6?view=rev&revision=15014 (see http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=563161), and is necessary in order to implement current boot loader packaging policies (http://lists.debian.org/debian-kernel/2010/07/msg00078.html) in grub2. Signed-off-by: Colin Watson <cjwatson@canonical.com> Acked-by: Tim Gardner <tim.gardner@canonical.com> Signed-off-by: Leann Ogasawara <leann.ogasawara@canonical.com>
Diffstat (limited to 'debian')
-rw-r--r--debian/control-scripts/postinst7
-rw-r--r--debian/control-scripts/postrm7
-rw-r--r--debian/control-scripts/preinst7
-rw-r--r--debian/control-scripts/prerm7
4 files changed, 28 insertions, 0 deletions
diff --git a/debian/control-scripts/postinst b/debian/control-scripts/postinst
index b1baa710da74..ce5ae569a090 100644
--- a/debian/control-scripts/postinst
+++ b/debian/control-scripts/postinst
@@ -993,6 +993,13 @@ sub run_hook {
}
}
+my $options;
+for (@ARGV) {
+ s,','\\'',g;
+ $options .= " '$_'";
+}
+$ENV{'DEB_MAINT_PARAMS'}="$options";
+
## Run user hook script here, if any
if ($postinst_hook) {
&run_hook("postinst", $postinst_hook);
diff --git a/debian/control-scripts/postrm b/debian/control-scripts/postrm
index b81d7aaa70c7..227e351fc59b 100644
--- a/debian/control-scripts/postrm
+++ b/debian/control-scripts/postrm
@@ -312,6 +312,13 @@ sub run_hook {
}
}
+my $options;
+for (@ARGV) {
+ s,','\\'',g;
+ $options .= " '$_'";
+}
+$ENV{'DEB_MAINT_PARAMS'}="$options";
+
## Run user hook script here, if any
if ($postrm_hook) {
&run_hook("postrm", $postrm_hook);
diff --git a/debian/control-scripts/preinst b/debian/control-scripts/preinst
index 11c335a4a6cb..6824225faa27 100644
--- a/debian/control-scripts/preinst
+++ b/debian/control-scripts/preinst
@@ -272,6 +272,13 @@ sub run_hook {
}
+my $options;
+for (@ARGV) {
+ s,','\\'',g;
+ $options .= " '$_'";
+}
+$ENV{'DEB_MAINT_PARAMS'}="$options";
+
## Run user hook script here, if any
if (-x "$preinst_hook") {
&run_hook("preinst", $preinst_hook);
diff --git a/debian/control-scripts/prerm b/debian/control-scripts/prerm
index c2148424fce0..07e41461d3ab 100644
--- a/debian/control-scripts/prerm
+++ b/debian/control-scripts/prerm
@@ -259,6 +259,13 @@ sub run_hook {
}
+my $options;
+for (@ARGV) {
+ s,','\\'',g;
+ $options .= " '$_'";
+}
+$ENV{'DEB_MAINT_PARAMS'}="$options";
+
## Run user hook script here, if any
if (-x "$prerm_hook") {
&run_hook("prerm", $prerm_hook);