All of lore.kernel.org
 help / color / mirror / Atom feed
From: maximilian attems <max@stro.at>
To: Frans Pop <elendil@planet.nl>
Cc: linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org,
	Sam Ravnborg <sam@ravnborg.org>
Subject: Re: [PATCH 3/5] deb-pkg: pass Debian maintainer script parameters to packaging hook scripts
Date: Wed, 1 Apr 2009 23:41:41 +0200	[thread overview]
Message-ID: <20090401214141.GB17518@stro.at> (raw)
In-Reply-To: <200904012143.18562.elendil@planet.nl>

On Wed, 01 Apr 2009, Frans Pop wrote:

> The Debian packaging scripts created by the deb-pkg target do not pass
> on the standard Debian maintainer script parameters to hook scripts,
> which means that those scripts cannot tell whether they are being called
> during e.g. install vs. upgrade, or removal vs. purge of the package.
> 
> As there are several variantions in how hook scripts are called from
> kernel packages, we pass the parameters in the environment variable
> DEB_MAINT_PARAMS rather than as extra arguments.
> 
> Bump version of builddep script to 1.3.
> 
> Signed-off-by: Frans Pop <elendil@planet.nl>

ack for the env variable.
 
> diff --git a/scripts/package/builddeb b/scripts/package/builddeb
> index 5b1517d..c9a4dcd 100644
> --- a/scripts/package/builddeb
> +++ b/scripts/package/builddeb
> @@ -1,6 +1,6 @@
>  #!/bin/sh
>  #
> -# builddeb 1.2
> +# builddeb 1.3
>  # Copyright 2003 Wichert Akkerman <wichert@wiggy.net>
>  #
>  # Simple script to generate a deb package for a Linux kernel. All the
> @@ -63,7 +63,11 @@ for script in postinst postrm preinst prerm ; do
>  
>  set -e
>  
> -test -d /etc/kernel/$script.d && run-parts --arg="$version" /etc/kernel/$script.d
> +# Pass maintainer script parameters to hook scripts
> +export DEB_MAINT_PARAMS="\$@"
> +
> +test -d $debhookdir/$script.d && \\
> +	run-parts --arg="$version" /etc/kernel/$script.d

gratious formating change, please if this needs to be broken in 2 lines,
break before && so that logic is more evident.
>  exit 0
>  EOF
>  	chmod 755 "$tmpdir/DEBIAN/$script"
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kbuild" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 
-- 
maks

  reply	other threads:[~2009-04-01 21:59 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-01 19:33 [PATCH 0/5] Improve flexibility of deb-pkg target Frans Pop
2009-04-01 19:38 ` [PATCH 4/5] Frans Pop
2009-04-01 19:42 ` [PATCH 1/5] deb-pkg: minor general improvements in builddeb script Frans Pop
2009-04-01 21:38   ` maximilian attems
2009-04-01 19:43 ` [PATCH 2/5] deb-pkg: fix 'file not found' error when building .deb package for arm Frans Pop
2009-04-01 19:43 ` [PATCH 3/5] deb-pkg: pass Debian maintainer script parameters to packaging hook scripts Frans Pop
2009-04-01 21:41   ` maximilian attems [this message]
2009-04-01 19:43 ` [PATCH 5a/5] deb-pkg: allow alternative hook scripts directory in .deb packages Frans Pop
2009-04-01 21:42   ` maximilian attems
2009-04-01 19:44 ` [PATCH 5b/5] " Frans Pop
2009-04-01 21:43   ` maximilian attems
2009-04-01 20:24 ` [PATCH 0/5] Improve flexibility of deb-pkg target maximilian attems

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090401214141.GB17518@stro.at \
    --to=max@stro.at \
    --cc=elendil@planet.nl \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sam@ravnborg.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.