Patrick Schoenfeld <schoenf...@debian.org> writes: > 10.9.1 The use of dpkg-statoverride states: > > "The corresponding dpkg-statoverride --remove calls can then be made > unconditionally when the package is purged." > > This is not true, because dpkg-statoverride fails, if no override > exists, causing the purge to fail as well. > Because the admin could remove an override the remove > call should not happen, if the override does not exist. > So it should be called somewhat like that: > > if dpkg-statoverride --list $file >/dev/null 2>&1 ; then > dpkg-statoverride --remove $i > done
I've applied the following for the next release of Policy: --- a/policy.sgml +++ b/policy.sgml @@ -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> -- Russ Allbery (r...@debian.org) <http://www.eyrie.org/~eagle/> -- To UNSUBSCRIBE, email to debian-policy-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org