[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#218897: Explicitily disallow adding local diversion by package



Hi!

On Thu, 2010-07-01 at 10:30:50 -0700, Russ Allbery wrote:
> diff --git a/policy.sgml b/policy.sgml
> index 9fe7158..c7f2a4e 100644
> --- a/policy.sgml
> +++ b/policy.sgml
> @@ -1214,9 +1214,11 @@
>  	</p>
>  
>  	<p>
> -	  You should not use <prgn>dpkg-divert</prgn> on a file
> -	  belonging to another package without consulting the
> -	  maintainer of that package first.
> +	  You should not use <prgn>dpkg-divert</prgn> on a file belonging
> +	  to another package without consulting the maintainer of that
> +	  package first.  When adding or removing diversions, package
> +	  maintainer scripts must provide the <tt>--package</tt> flag
> +	  to <prgn>dpkg-divert</prgn> and must not use <tt>--local</tt>.
>  	</p>
>  
>  	<p>

Ok, even if this has been merged already and closed, I've been meaning
to mention something I've considered implementing. dpkg-divert would get
the package name from the DPKG_MAINTSCRIPT_PACKAGE environment variable,
which would change the default of local. Specifying --package would
override the environment variable. This should probably reduce
inadvertent mistakes or omissions, and make it a bit more
strightforward for maintainers.

I added this to my TODO list and will probably be including it for
dpkg 1.16.0.

thanks,
guillem



Reply to: