[lkml]   [2009]   [Apr]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    Patch in this message
    Subject[PATCH 3/5] deb-pkg: pass Debian maintainer script parameters to packaging hook scripts
    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 <>

    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 @@
    -# builddeb 1.2
    +# builddeb 1.3
    # Copyright 2003 Wichert Akkerman <>
    # 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
    exit 0
    chmod 755 "$tmpdir/DEBIAN/$script"

     \ /
      Last update: 2009-04-01 21:47    [W:0.020 / U:21.336 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site