diff mbox

[v4,4/4] deb-pkg: add a hook argument to match debian hooks parameters

Message ID 1367941611-12223-5-git-send-email-anisse@astier.eu
State New
Headers show

Commit Message

Anisse Astier May 7, 2013, 3:46 p.m. UTC
We now provide the installed image path to the kernel hooks.

This should allow the package to better integrate with debian hooks, and
should not be too disruptive of hooks supporting only one parameter.

Signed-off-by: Anisse Astier <anisse@astier.eu>
---
 scripts/package/builddeb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Ben Hutchings May 8, 2013, 4 a.m. UTC | #1
On Tue, 2013-05-07 at 17:46 +0200, Anisse Astier wrote:
> We now provide the installed image path to the kernel hooks.
> 
> This should allow the package to better integrate with debian hooks, and
> should not be too disruptive of hooks supporting only one parameter.
> 
> Signed-off-by: Anisse Astier <anisse@astier.eu>
Reviewed-by: Ben Hutchings <ben@decadent.org.uk>

All hook scripts should support both forms, as specified in
<http://kernel-handbook.alioth.debian.org/ch-update-hooks.html>.  Of
course, that is only Debian policy and we don't know that everyone
working on derivatives has read it...

Ben.

> ---
>  scripts/package/builddeb | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/scripts/package/builddeb b/scripts/package/builddeb
> index 73bb551..fa084c6 100644
> --- a/scripts/package/builddeb
> +++ b/scripts/package/builddeb
> @@ -182,7 +182,7 @@ set -e
>  # Pass maintainer script parameters to hook scripts
>  export DEB_MAINT_PARAMS="\$*"
>  
> -test -d $debhookdir/$script.d && run-parts --arg="$version" $debhookdir/$script.d
> +test -d $debhookdir/$script.d && run-parts --arg="$version" --arg="/$installed_image_path" $debhookdir/$script.d
>  exit 0
>  EOF
>  	chmod 755 "$tmpdir/DEBIAN/$script"
> -- 
> 1.8.3.rc1
> 
>
diff mbox

Patch

diff --git a/scripts/package/builddeb b/scripts/package/builddeb
index 73bb551..fa084c6 100644
--- a/scripts/package/builddeb
+++ b/scripts/package/builddeb
@@ -182,7 +182,7 @@  set -e
 # Pass maintainer script parameters to hook scripts
 export DEB_MAINT_PARAMS="\$*"
 
-test -d $debhookdir/$script.d && run-parts --arg="$version" $debhookdir/$script.d
+test -d $debhookdir/$script.d && run-parts --arg="$version" --arg="/$installed_image_path" $debhookdir/$script.d
 exit 0
 EOF
 	chmod 755 "$tmpdir/DEBIAN/$script"