any way to make --enforce-variants the default?

Ryan Schmidt ryandesign at macports.org
Mon Aug 31 18:10:00 PDT 2009


Hi Randal,

On Aug 31, 2009, at 19:49, Randal L. Schwartz wrote:

> It seems like this new "--enforce-variants" switch is just
> a pain.  In a cargo-cult way, I now have to include it on
> every "upgrade", because it invariably breaks when I don't.
> So then I wonder, why isn't it the default?
>
> And I've run into a tougher place.  I tried to install something
> new.  But that triggered the upgrade of something else, which then
> failed because, yup, again, --enforce-variants isn't set.
> But why (and how!) would I have set --enforce-variants
> on "sudo port install gimp".  This is *not* making sense.
>
> So, what's the purpose of this new switch, and when would you ever  
> *not* use
> it?

My understanding is that --enforce-variants will cause ports to  
rebuild which MacPorts doesn't think need to be rebuild, but where the  
set of variants used when you originally installed it does not match  
the set of variants MacPorts would use if you installed it today. This  
can be either because someone added default variants (or applicable  
platform variants) to the port since you installed it, or because the  
port has a "darwin" variant. (MacPorts versions before 1.8.0 failed to  
record the "darwin" variant in the registry.)

I am curious to know what "breaks" and is "failing" for you. What  
error messages are you getting? I thought upgrading ports with -- 
enforce-variants was a mostly optional activity, and one which was not  
the default because in most cases it wouldn't change anything on your  
system and rebuilds can take time.





More information about the macports-users mailing list