Opened 9 years ago

Last modified 2 years ago

#50725 assigned defect

compilers-1.0 portgroup allows selection of nonexistent variant to defeat default variant

Reported by: ryandesign (Ryan Carsten Schmidt) Owned by: michaelld (Michael Dickens)
Priority: Normal Milestone:
Component: ports Version: 2.3.99
Keywords: portgroup Cc: cjones051073 (Chris Jones), mascguy (Christopher Nielsen)
Port:

Description

As an example, the py27-scipy port has compiler variants, and the gfortran variant should be used if the user has not already selected another:

$ port info py27-scipy
py27-scipy @0.17.0 (python)
Variants:             atlas, clang37, gcc48, gcc49, gcc5, gcc6, [+]gfortran, llvm, openblas

Description:          An opensource library of scientific tools for Python
Homepage:             http://www.scipy.org/

Build Dependencies:   gcc5
Library Dependencies: python27, py27-numpy, py27-nose, swig-python, libgcc
Platforms:            darwin
License:              BSD
Maintainers:          sean@macports.org, michaelld@macports.org, openmaintainer

The port does not have a gcc44 variant, but if I select it, this erroneously causes the port to no longer use gfortran as the default:

$ port info py27-scipy +gcc44
py27-scipy @0.17.0 (python)
Variants:             atlas, clang37, gcc48, gcc49, gcc5, gcc6, gfortran, llvm, openblas

Description:          An opensource library of scientific tools for Python
Homepage:             http://www.scipy.org/

Library Dependencies: python27, py27-numpy, py27-nose, swig-python
Platforms:            darwin
License:              BSD
Maintainers:          sean@macports.org, michaelld@macports.org, openmaintainer

If I try to install this way, I'll get an error:

$ sudo port install py27-scipy +gcc44
--->  Computing dependencies for py27-scipy
--->  Fetching distfiles for py27-scipy
Error: Failed to fetch py27-scipy: must set at least one Fortran variant
Error: See /opt/local/var/macports/logs/_Users_rschmidt_macports_dports_python_py-scipy/py27-scipy/main.log for details.
Error: Follow http://guide.macports.org/#project.tickets to report a bug.
Error: Processing of port py27-scipy failed

The compilers portgroup should ignore selected variants the port does not offer.

Change History (6)

comment:1 Changed 9 years ago by seanfarley (Sean Farley)

Huh. Thanks for the report. Unfortunately, I won't have any time until next week to look at it :-(

comment:2 Changed 6 years ago by mf2k (Frank Schima)

Cc: michaelld removed
Owner: changed from seanfarley to michaelld
Status: newassigned

comment:3 Changed 6 years ago by michaelld (Michael Dickens)

Testing this issue out just now & I can't replicate it. Maybe it's been fixed sometime in the 3 years since it was filed? Does the OP still see it?

comment:4 Changed 2 years ago by mascguy (Christopher Nielsen)

Keywords: portgroup added

Add keyword portgroup, to pg-related tickets

comment:5 Changed 2 years ago by mascguy (Christopher Nielsen)

Cc: cjones051073 added

comment:6 Changed 2 years ago by mascguy (Christopher Nielsen)

Cc: mascguy added
Note: See TracTickets for help on using tickets.