]> git.donarmstrong.com Git - debian/debian-policy.git/commitdiff
Don't fail in /usr/local creation example if chmod fails
authorRuss Allbery <rra@debian.org>
Sat, 24 Dec 2011 17:59:42 +0000 (09:59 -0800)
committerRuss Allbery <rra@debian.org>
Sat, 24 Dec 2011 17:59:42 +0000 (09:59 -0800)
* Fix the example of creating a /usr/local subdirectory to not fail if
  the chown or chmod fail.  Thanks, Joey Hess.  (Closes: #617315)

debian/changelog
policy.sgml

index af931cc7fbbc0c200f20c1bd46795c1edbe7f039..f55de246f1963d850792be2dc9ec9b80dff9f4d1 100644 (file)
@@ -13,6 +13,8 @@ debian-policy (3.9.3.0) UNRELEASED; urgency=low
   * Clarify that continuation lines of the Description control field must
     contain at least one non-whitespace character.  Thanks, Guillem Jover.
     (Closes: #627490)
+  * Fix the example of creating a /usr/local subdirectory to not fail if
+    the chown or chmod fail.  Thanks, Joey Hess.  (Closes: #617315)
   * Add the release date of 3.9.2.0 to upgrading-checklist.
   * Fix ordering of the last entries in the 3.9.2.0 upgrading-checklist.
   * Fix typo in upgrading-checklist entry for multiarch paths.  Thanks,
index b8db0ab79ed0068d49d9a0a57ed77f83cf7ecf6f..4aeae3639795ae5ee8fcc682cd9acffdc35bbe81 100644 (file)
@@ -6336,12 +6336,11 @@ install -m644 debian/shlibs.<var>package</var> debian/<var>package</var>/DEBIAN/
            For example, the <tt>emacsen-common</tt> package could
            contain something like
            <example compact="compact">
-if [ ! -e /usr/local/share/emacs ]
-then
-  if mkdir /usr/local/share/emacs 2>/dev/null
-  then
-    chown root:staff /usr/local/share/emacs
-    chmod 2775 /usr/local/share/emacs
+if [ ! -e /usr/local/share/emacs ]; then
+  if mkdir /usr/local/share/emacs 2>/dev/null; then
+    if chown root:staff /usr/local/share/emacs; then
+      chmod 2775 /usr/local/share/emacs || true
+    fi
   fi
 fi
            </example>