]> git.donarmstrong.com Git - debian/debian-policy.git/commitdiff
Don't suggest calling dpkg-statoverride --remove unconditionally
authorRuss Allbery <rra@debian.org>
Fri, 7 Aug 2009 23:10:58 +0000 (16:10 -0700)
committerRuss Allbery <rra@debian.org>
Fri, 7 Aug 2009 23:12:14 +0000 (16:12 -0700)
The system administrator may have removed an override, and --remove will
fail if none exist.  Suggest checking first to see whether the override
exists before removing it.

Thanks, Patrick Schoenfeld and Guillem Jover.

debian/changelog
policy.sgml

index 15dd27830d9568e3b94250b63910a56ed0ca7ff8..71bbb23d91891f5590250108dcfeb4241a915051 100644 (file)
@@ -45,6 +45,8 @@ debian-policy (3.8.3.0) UNRELEASED; urgency=low
     on binary dependencies.  Thanks, Frank Küster.  (Closes: #529771)
   * Clarify the units of Installed-Size and document that it is an
     approximation.  Thanks, Martin Dorey.  (Closes: #534408)
+  * Don't suggest calling dpkg-statoverride --remove unconditionally in
+    the postrm script.  Thanks, Patrick Schoenfeld.  (Closes: #539389)
   * Explain that the copyright dates are for the original Policy manual
     and that there is no updated list of copyright holders for subsequent
     revisions available.  (Partly addresses #47438)
index 4246954a59bf7d3849bb908c4f96aaad0f4b1ae3..6fc038f6db79cc5451e918440e69c9204429a54d 100644 (file)
@@ -7762,9 +7762,17 @@ do
   fi
 done
            </example>
-           The corresponding <tt>dpkg-statoverride --remove</tt>
-           calls can then be made unconditionally when the package is
-           purged.
+           The corresponding code to remove the override when the package
+           is purged would be:
+           <example>
+for i in /usr/bin/foo /usr/sbin/bar
+do
+  if dpkg-statoverride --list $i >/dev/null 2>&1
+  then
+    dpkg-statoverride --remove $i
+  fi
+done
+           </example>
          </p>
        </sect1>
       </sect>