The following commit has been merged in the master branch:
commit 7b1b83d9df8a366a60a794faabfb073817ce2ba1
Author: Guillem Jover <[email protected]>
Date:   Thu Mar 28 20:44:30 2013 +0100

    Do not pass -e in shell script shebangs, set it in the body
    
    This guarantees that the -e option will be set even if the script is
    invoked as an argument to sh.
    
    Warned-by: lintian

diff --git a/debian/changelog b/debian/changelog
index e0335dc..970221a 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -17,6 +17,7 @@ dpkg (1.17.0) UNRELEASED; urgency=low
     Closes: #699807
   * Fix clang warnings due to change of alignment requirements.
   * Change copyright file to point to GPL-2 instead of GPL.
+  * Do not pass -e in shell script shebangs, set it in the body.
 
  -- Guillem Jover <[email protected]>  Fri, 03 Aug 2012 13:21:00 +0200
 
diff --git a/debian/dpkg-dev.preinst b/debian/dpkg-dev.preinst
index f0a375f..892c96f 100755
--- a/debian/dpkg-dev.preinst
+++ b/debian/dpkg-dev.preinst
@@ -1,4 +1,4 @@
-#!/bin/sh -e
+#!/bin/sh
 # This script can be called in the following ways:
 #
 # Before the package is installed:
@@ -14,6 +14,8 @@
 # If postrm fails during upgrade or fails on failed upgrade:
 #      <old-preinst> abort-upgrade <new-version>
 
+set -e
+
 remove_doc_symlink() {
     if [ -L /usr/share/doc/dpkg-dev ]; then
        rm /usr/share/doc/dpkg-dev
diff --git a/debian/dpkg.lintian-overrides b/debian/dpkg.lintian-overrides
index 6a9c418..a010f42 100644
--- a/debian/dpkg.lintian-overrides
+++ b/debian/dpkg.lintian-overrides
@@ -2,9 +2,6 @@ dpkg: redundant-origin-field
 dpkg: redundant-bugs-field
 dpkg: arch-dep-package-has-big-usr-share
 # False positives, we read from a file not from a tty
-dpkg: read-in-maintainer-script preinst:40
-dpkg: read-in-maintainer-script preinst:41
-dpkg: read-in-maintainer-script preinst:43
-dpkg: read-in-maintainer-script preinst:51
+dpkg: read-in-maintainer-script preinst:*
 # On purpose, install-info is only a wrapper that will be removed soon
 dpkg: binary-without-manpage usr/sbin/install-info
diff --git a/debian/dpkg.postinst b/debian/dpkg.postinst
index 874f75c..a74db4b 100755
--- a/debian/dpkg.postinst
+++ b/debian/dpkg.postinst
@@ -1,4 +1,4 @@
-#!/bin/sh -e
+#!/bin/sh
 # This script can be called in the following ways:
 #
 # After the package was installed:
@@ -18,6 +18,7 @@
 # If prerm fails during replacement due to conflict:
 #      <postinst> abort-remove in-favour <new-package> <version>
 
+set -e
 
 # Create the database files if they don't already exist
 create_database() {
diff --git a/debian/dpkg.postrm b/debian/dpkg.postrm
index b0550e4..f218e95 100755
--- a/debian/dpkg.postrm
+++ b/debian/dpkg.postrm
@@ -1,4 +1,4 @@
-#!/bin/sh -e
+#!/bin/sh
 # This script can be called in the following ways:
 #
 # After the package was removed:
@@ -26,6 +26,7 @@
 # If preinst fails during upgrade:
 #      <new-postrm> abort-upgrade <old-version>
 
+set -e
 
 # Remove log file when dpkg is purged
 remove_logfile() {
diff --git a/debian/dpkg.preinst b/debian/dpkg.preinst
index 13fcde3..d29fa41 100755
--- a/debian/dpkg.preinst
+++ b/debian/dpkg.preinst
@@ -1,4 +1,4 @@
-#!/bin/sh -e
+#!/bin/sh
 # This script can be called in the following ways:
 #
 # Before the package is installed:
@@ -14,6 +14,8 @@
 # If postrm fails during upgrade or fails on failed upgrade:
 #      <old-preinst> abort-upgrade <new-version>
 
+set -e
+
 # Handle upgrades from pre-conffile dpkg.cfg
 upgrade_dpkg_non_conffile()
 {
diff --git a/debian/dpkg.prerm b/debian/dpkg.prerm
index bce0e42..9a11387 100755
--- a/debian/dpkg.prerm
+++ b/debian/dpkg.prerm
@@ -1,4 +1,4 @@
-#!/bin/sh -e
+#!/bin/sh
 # This script can be called in the following ways:
 #
 # Before the package is removed:
@@ -17,6 +17,8 @@
 # Before the package is replaced due to conflict:
 #      <prerm> remove in-favour <new-package> <version>
 
+set -e
+
 ensure_no_triggers_noawait()
 {
     admindir=${DPKG_ADMINDIR:-/var/lib/dpkg}
diff --git a/debian/dselect.preinst b/debian/dselect.preinst
index c12f737..d01329e 100755
--- a/debian/dselect.preinst
+++ b/debian/dselect.preinst
@@ -1,4 +1,4 @@
-#!/bin/sh -e
+#!/bin/sh
 # This script can be called in the following ways:
 #
 # Before the package is installed:
@@ -14,6 +14,8 @@
 # If postrm fails during upgrade or fails on failed upgrade:
 #      <old-preinst> abort-upgrade <new-version>
 
+set -e
+
 remove_doc_symlink() {
     if [ -L /usr/share/doc/dselect ]; then
        rm /usr/share/doc/dselect
diff --git a/doc/triggers.txt b/doc/triggers.txt
index bc46001..5447135 100644
--- a/doc/triggers.txt
+++ b/doc/triggers.txt
@@ -462,7 +462,8 @@ scrollkeeper, goes like this:
      - Make the postinst modifications as described above.
      - Rename scrollkeeper-update to scrollkeeper-update-now
      - Provide a new wrapper script as scrollkeeper-update:
-          #!/bin/sh -e
+          #!/bin/sh
+          set -e
           if type dpkg-trigger >/dev/null 2>&1 && \
              dpkg-trigger /usr/share/omf; then
                 exit 0

-- 
dpkg's main repository


-- 
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to