Opened 11 years ago

Last modified 11 years ago

#40042 new enhancement

base should ignore variant conflicts when cleaning

Reported by: c.herbig@… Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: base Version: 2.2.0
Keywords: Cc: cooljeanius (Eric Gallager)
Port:

Description

Trying to run port clean all fails at port R:

--->  Cleaning qyoto
Error: Inconsistent variant specification: R variant +x11 is required by at least one of +cairo +accelerate +gcc47 +recommended, but specified -x11
Error: Unable to open port: Error evaluating variants

My variants.conf looks like this:

+quartz
-x11
-video
-gnome
-ogg
-cdparanoia
-gnome_vfs
-universal

# old style variants
+no_x11
+no_gnome
+no_ogg
+no_gnome_vfs

Change History (11)

comment:1 Changed 11 years ago by c.herbig@…

P.S. Although it seems to be the fault of R, I filed this under base, since it might be good to see if there is a way to make base more resilient to what is causing this.

comment:2 Changed 11 years ago by ryandesign (Ryan Carsten Schmidt)

Component: baseports
Owner: changed from macports-tickets@… to kjell.konis@…
Port: R added
Summary: port clean all fails at R with variantsR: Inconsistent variant specification: R variant +x11 is required by at least one of +cairo +accelerate +gcc47 +recommended, but specified -x11

I don't think we need to make any changes to base. This is simply a bug in the way R is specifying its default variants.

R specifies that +cairo and +x11 are default variants, and +cairo requires +x11. So logically when the user has specified -x11, there will be an error when MacPorts attempts to then select +cairo. R should only make +cairo a default variant if the user has not already specified that they want to disable x11.

default_variants +x11
if {[variant_isset x11]} {
    default_variants +cairo
}

But the fact that +cairo requires +x11 is weird in and of itself, since the cairo port does not require x11 (it merely enables that option by default, but the user could disable it). If R requires that cairo be installed with its +x11 variant, then it should enforce that requirement using the active_variants 1.1 portgroup. And if it does not require that, then its +cairo variant should not require its +x11 variant.

comment:3 Changed 11 years ago by ryandesign (Ryan Carsten Schmidt)

Component: portsbase
Owner: changed from kjell.konis@… to macports-tickets@…
Port: R removed
Summary: R: Inconsistent variant specification: R variant +x11 is required by at least one of +cairo +accelerate +gcc47 +recommended, but specified -x11base should ignore variant conflicts when cleaning
Type: defectenhancement

Eh, I didn't realize there was already a separate ticket #39228 for R itself. You should have mentioned that.

Still not sure how we could enhance base to work around such problems. Perhaps we could special case "port clean" and other operations that shouldn't care about variants to ignore them.

comment:4 in reply to:  3 ; Changed 11 years ago by c.herbig@…

Replying to ryandesign@…:

Eh, I didn't realize there was already a separate ticket #39228 for R itself. You should have mentioned that.

I guess I didn't find it because I was looking for tickets involving port clean. I myself don't use R, so I can't really suggest how the maintainer should fix it.

comment:5 in reply to:  3 Changed 11 years ago by larryv (Lawrence Velázquez)

Replying to ryandesign@…:

Still not sure how we could enhance base to work around such problems. Perhaps we could special case "port clean" and other operations that shouldn't care about variants to ignore them.

This…

% sudo port clean R +cairo -x11
--->  Cleaning R
%

…doesn’t cause any problems, but perhaps setting variants via the command line uses a different code path than setting them in variants.conf.

comment:6 in reply to:  4 ; Changed 11 years ago by ryandesign (Ryan Carsten Schmidt)

Replying to c.herbig@…:

I myself don't use R, so I can't really suggest how the maintainer should fix it.

The maintainer should fix it the way I suggested above, but we'll let that be handled in #39228 and leave this ticket for any related improvements to base.

comment:7 Changed 11 years ago by c.herbig@…

Well, in the meanwhile, port clean all and not R seems to work.

comment:8 in reply to:  6 Changed 11 years ago by kjellpk (Kjell Konis)

Replying to ryandesign@…:

Replying to c.herbig@…:

I myself don't use R, so I can't really suggest how the maintainer should fix it.

The maintainer should fix it the way I suggested above, but we'll let that be handled in #39228 and leave this ticket for any related improvements to base.

R port maintainer here. #40304 has a patch that fixes this as suggested. Thanks.

comment:9 Changed 11 years ago by c.herbig@…

Perhaps this would best be fixed by simply recommending users to run port -p clean all. I would be happy to contribute to the documentation if that is in turn needed. Feel free to close this ticket.

Last edited 11 years ago by ryandesign (Ryan Carsten Schmidt) (previous) (diff)

comment:10 Changed 11 years ago by neverpanic (Clemens Lang)

Has duplicate #40879.

comment:11 Changed 11 years ago by cooljeanius (Eric Gallager)

Cc: egall@… added

Cc Me!

Note: See TracTickets for help on using tickets.