Disabling a Variant?

Michael Dickens michaelld at macports.org
Sat Aug 18 19:00:45 PDT 2012


Right now, qt4-mac has a variant for the "mysql" plugin.  We're moving
to using a separate port to provide Qt plugins such as this; this one is
actually already checked in as "qt4-mac-mysql55-plugin".  Hence, I'm
going to disable the "mysql" variant in qt4-mac; once I/we get there,
I'll also disable the other plugin variants, leaving a much simplified
qt4-mac Portfile!

So, my question is how to go about disabling the variant.  If someone
already has "qt4-mac +mysql" installed, what I'd ideally like to have
happen is that just qt4-mac is installed on the upgrade, and a note is
printed telling the user to install "qt4-mac-mysql55-plugin".  I do not
want the +mysql variant to be valid after the next revision; I just want
it there to do this note but otherwise be innocuous.  Can I do something
like:

{{{
variant mysql {}

if {[variant_isset mysql]} {

  note "Variant +mysql is not longer used by the this port.\n
Please install the mysql plugin via the port 'qt4-mac-mysql55-plugin'."
  disable_variant mysql

}
}}}

But I don't think I can "disable_variant".  What's the correct way to go
about doing this?  Will "port" work correctly when upgrading from
"qt4-mac +mysql" to a new version without the +mysql variant, if that's
the way to go?

Slowly making progress .. - MLD


More information about the macports-dev mailing list