Michael Orlitzky posted on Thu, 24 Jan 2013 13:55:46 -0500 as excerpted:

> On 01/24/13 13:25, Rich Freeman wrote:
>> On Thu, Jan 24, 2013 at 1:18 PM, Ian Stakenvicius <a...@gentoo.org>
>> wrote:
>>> a fatal die in pkg_pretend could be circumvented by an environment
>>> variable such as ${PN}_I_KNOW_WHAT_IM_DOING being set.  Just a
>>> thought.
>> 
>> If we're going to do this I'd definitely have the ${PN} bit as you
>> suggested.  Otherwise everybody will just set it in make.conf and the
>> feature will be pointless.  Then we'll yell at users because they
>> disabled the feature that normally just tends to break half their
>> builds but this time by some miracle would have actually prevented a
>> problem.
> 
> Are there really that many ways that this could cause false positives?
> (Not that I'm against the $PN prefix, just curious).

It's worth noting that for example, glibc uses I_KNOW_WHAT_I_AM_DOING to 
bypass its don't-break-the-system-by-downgrading-glibc check.

Unfortunately, due to environment saving and because I have 
FEATURES=buildpkg set, that means I have to set it at build-time, in 
ordered to have it in the glibc binpkg for the PREVIOUS version (the one 
I'd be downgrading to), in ordered to avoid a needless rebuild despite my 
having the binpkg I was JUST using until the upgrade and thus KNOW to be 
working, right at hand!

Now I've chosen to set that using package.env so it applies only to glibc, 
but I imagine many users have it set in their make.conf, because a lot of 
packages use it, and they were forced to set it for one or another at 
some point.

Thus, adding the package name to enforce per-package 
I_KNOW_WHAT_I_AM_DOING seems a good idea.

Or perhaps use the usual I_KNOW_WHAT_I_AM_DOING var, but instead of just 
checking that it's set, check that it's set to the specific package name.


Meanwhile, my vote is for a NON-FATAL pkg_pretend warning.  That gets run 
at the beginning when people are still likely to be watching, so should 
be good enough.  Beyond that, gentoo can't keep the obtuse from ignoring 
the warnings, so if it breaks they get to keep the pieces, and RESOLVED/
READTHEWARNINGS to any resulting bugs.

-- 
Duncan - List replies preferred.   No HTML msgs.
"Every nonfree program has a lord, a master --
and if you use the program, he is your master."  Richard Stallman


Reply via email to