any way to make --enforce-variants the default?
Mark Hattam
mark at dxradio.demon.co.uk
Mon Aug 31 18:38:54 PDT 2009
On 1 Sep 2009, at 02:28, Joshua Root wrote:
> 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
> _______________________________________________
> macports-users mailing list
> macports-users at lists.macosforge.org
> http://lists.macosforge.org/mailman/listinfo.cgi/macports-users
So can I use this to remove the +server variant from my already
installed mysql5
mysql5 @5.0.85_0+server (active)
which is no longer needed, and reminds me so everytime I do a sudo
port upgrade mysql5, as it's now handled by the
mysql5-server @5.0.85_0 (active)
eg
sudo port upgrade --enforce-variants mysql5 -server
or does a "-" not negate a "+"
Is it any worth to do something like
sudo port upgrade --enforce-variants --force installed
to do a one-hit "mend" of all the missing +darwins
Mark
More information about the macports-users
mailing list