On Jun 1, 2022, at 17:31, Jim DeLaHunt wrote: > Should I expect a +quartz variant to propagate to dependencies, and overrule > existing variants?
Variants specified on the command line when installing a port propagate to any dependencies that have not yet been installed. They do not propagate to any dependencies that have already been installed. You can add a variant to an already-installed port by using "sudo port upgrade --enforce-dependencies someport +somevariant". > I just tried to `install gimp +quartz`. This failed several times, each time > with errors about some recursive dependency of gimp requiring its own > dependency to be installed with a +quartz variant, but the port was already > installed without the +quartz variant` commands explicitly. > > The specific ports in question are: > > gimp +quartz, > which depends on gimp-lqr-plugin, > which depends on gimp2 +quartz — but it was installed without that > variant, > which depends on gtk-osx-application-gtk2, > and depends on gtk2 +quartz — but it was installed without that variant, > and depends on py27-pygtk +quartz — but it was installed without that > variant, > which depends on libglade2, > which also depends on gtk2 +quartz > > So concretely, install gimp +quartz failed because gimp2 was installed > without +quartz. > A manual install gimp2 +quartz failed because gtk2 was installed without > +quartz. > A manual install gtk2 +quartz succeeded, but led to 5 broken ports. > Rebuilding those broken ports failed at py27-pygtk because an in-progress > build of gimp2 had conflicting variants "+python27" vs "+python27+quartz". > A clean of gimp2, followed by a second manual install gimp2 +quartz > succeeded, but led to 4 broken ports. Rebuilding those broken ports failed at > py27-pygtk because gtk2 was installed with +quartz (actually, without the > conflicting variant +x11). > An uninstall py27-pygtk (despite gimp2 depending on it), followed by a clean > py27-pygtk, succeeded. > A manual install py27-pygtk +quartz succeeded, but led to 2 broken ports. > Rebuilding those broken ports succeeded. > > Thus I succeeded in fumbling my way through installing gimp +quartz despite > dependencies already present with the wrong variants, but it was a bit messy > and confusing. Should I expect MacPorts to do a better job with this > situation? If so, maybe I should file a ticket against some of these ports, > to see if portfile changes would avoid the problems. This undesirable experience is why we recommend users choose whether to use +x11 or +quartz before installing any ports, or uninstall all ports and reinstall them if changing one's mind after having installed ports.