diff --git a/debian/changelog b/debian/changelog index 3e1e55598..82f1c2b24 100644 --- a/debian/changelog +++ b/debian/changelog @@ -68,6 +68,7 @@ linux-2.6 (2.6.32-6) UNRELEASED; urgency=low (closes: #565494), ITCO_VENDOR_SUPPORT (closes: #525232), PCIEASPM (closes: #545417). * Enable easier debugging of Power Managment code. (closes: #478315) + * Pass `DEB_MAINT_PARAMS' to hook scripts. (closes: #563161) -- Ben Hutchings Sun, 10 Jan 2010 17:38:50 +0000 diff --git a/debian/templates/temp.image.plain/postinst b/debian/templates/temp.image.plain/postinst index d5d730030..7c329d50b 100755 --- a/debian/templates/temp.image.plain/postinst +++ b/debian/templates/temp.image.plain/postinst @@ -853,6 +853,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/templates/temp.image.plain/postrm b/debian/templates/temp.image.plain/postrm index d048ee41e..7df0a7ffb 100755 --- a/debian/templates/temp.image.plain/postrm +++ b/debian/templates/temp.image.plain/postrm @@ -256,6 +256,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/templates/temp.image.plain/preinst b/debian/templates/temp.image.plain/preinst index e88e03691..ae1dcefb6 100755 --- a/debian/templates/temp.image.plain/preinst +++ b/debian/templates/temp.image.plain/preinst @@ -184,6 +184,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/templates/temp.image.plain/prerm b/debian/templates/temp.image.plain/prerm index 791a26453..05c29b9f3 100755 --- a/debian/templates/temp.image.plain/prerm +++ b/debian/templates/temp.image.plain/prerm @@ -264,6 +264,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);