any way to make --enforce-variants the default?
Joshua Root
jmr at macports.org
Mon Aug 31 18:28:08 PDT 2009
On 2009-9-1 10: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?
It's for adding variants to ports that are already installed. That's the
only time you should ever have to use it. Example:
sudo port upgrade --enforce-variants foo +universal
which will rebuild foo and all its dependencies with +universal.
Warnings about not matching +darwin are usually purely cosmetic and are
caused by a bug in older MacPorts versions where that variant was not
being recorded in the registry. Warnings about other variants are
usually worth paying attention to. They tell you when you do something
like `port install gtk2 +quartz` when you already have cairo installed
without +quartz, which is not going to work.
Nothing should ever fail to upgrade due to not using --enforce-variants
provided you had your variants set up correctly in the first place. If
you get a lot of messages like "+darwin_9 does not match +darwin_10",
you need to read <http://trac.macports.org/wiki/Migration>.
- Josh
More information about the macports-users
mailing list