From: Russ Allbery Date: Sat, 24 Dec 2011 17:59:42 +0000 (-0800) Subject: Don't fail in /usr/local creation example if chmod fails X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=cbbacc3e326902ebe89005e528191681f0003409;p=debian%2Fdebian-policy.git Don't fail in /usr/local creation example if chmod fails * Fix the example of creating a /usr/local subdirectory to not fail if the chown or chmod fail. Thanks, Joey Hess. (Closes: #617315) --- diff --git a/debian/changelog b/debian/changelog index af931cc..f55de24 100644 --- a/debian/changelog +++ b/debian/changelog @@ -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, diff --git a/policy.sgml b/policy.sgml index b8db0ab..4aeae36 100644 --- a/policy.sgml +++ b/policy.sgml @@ -6336,12 +6336,11 @@ install -m644 debian/shlibs.package debian/package/DEBIAN/ For example, the emacsen-common package could contain something like -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