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

Re: Environment variables, debian/rules and dpkg-buildpackage



Raphael Hertzog <hertzog@debian.org> writes:

> You're not trying very hard to look from both sides: whether the default
> value comes from the environment or from an included Makefile, in both
> cases the user can override it with command-line arguments.
>
> Granted it means that dpkg-buildpackage would have to pass
> user-overriden flags on the command line instead of using the
> environment, but that can be done if people really want this
> possibility.

I think it's clearly mandatory to implement a hierarchy of settings:

* Debian defaults
* Local distribution overrides
* Local package overrides
* User settings

where each overrides the previous ones.

Personally, I'd rather see this done via an included make fragment.  I
think the logic in debian/rules is simpler in that case, and I don't agree
with the argument that it's that much harder to implement than relying on
environment variables.  In practice, huge numbers of Debian packages
already unconditionally set CFLAGS in debian/rules and hence override any
environment variable settings.  All those packages are going to have to be
modified anyway.  I don't see a way of meaningfully deploying this change
without modifying most of the archive.

-- 
Russ Allbery (rra@debian.org)               <http://www.eyrie.org/~eagle/>


Reply to: