From: Russ Allbery Date: Fri, 7 Aug 2009 23:10:58 +0000 (-0700) Subject: Don't suggest calling dpkg-statoverride --remove unconditionally X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=eea0471b35d7f68d15fdab8e0ddfd5a0525de9bc;p=debian%2Fdebian-policy.git Don't suggest calling dpkg-statoverride --remove unconditionally 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. --- diff --git a/debian/changelog b/debian/changelog index 15dd278..71bbb23 100644 --- a/debian/changelog +++ b/debian/changelog @@ -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) diff --git a/policy.sgml b/policy.sgml index 4246954..6fc038f 100644 --- a/policy.sgml +++ b/policy.sgml @@ -7762,9 +7762,17 @@ do fi done - The corresponding dpkg-statoverride --remove - 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: + +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 +