Opened 4 years ago

Closed 3 years ago

#60565 closed enhancement (duplicate)

Make setting known_fail yes prevent installation of deps

Reported by: ryandesign (Ryan Carsten Schmidt) Owned by:
Priority: Normal Milestone:
Component: base Version: 2.6.2
Keywords: Cc: ctreleaven (Craig Treleaven)
Port:

Description

Some ports do this (this is from gcc49):

if {${os.platform} eq "darwin" && ([vercmp $xcodeversion 9.0] > 0)} {
    known_fail      yes
    depends_lib
    depends_run
    archive_sites
    pre-fetch {
        ui_error "building ${name} is not supported with Xcode 9 or greater"
        return -code error {unsupported platform}
    }
}

In other words in addition to setting known_fail yes and printing an error message, it clears the dependencies. I guess the intention of this is to avoid the annoying situation where a user asks to install a port, spends a lot of time installing its dependencies, and only then discovers that the port they wanted won't work on their system anyway. Maybe MacPorts base could arrange for the dependencies to be cleared automatically when known_fail yes is used.

The disadvantage of this is that when a user runs port info or port deps they won't see the dependencies that would be required if the port worked, which is valuable and relevant information. The dependencies would also be absent from the portindex for that OS version, which could be bad since the MacPorts web app gets its information from the portindex for one particular OS version. Maybe there is a way for MacPorts base to keep the dependencies visible in port info and port deps and the portindex but to skip trying to install them.

A separate ticket tracks clearing archive_sites.

Change History (6)

comment:1 Changed 4 years ago by ryandesign (Ryan Carsten Schmidt)

Milestone: MacPorts Future

comment:2 Changed 4 years ago by kencu (Ken)

Years ago, when I first came to MacPorts, I asked if all that supported-os-versions functionality could be encompassed in one single command that would accomplish all that, something like:

platform darwin
supported_versions {}

where supported_versions would accept some bit of tcl like [>10], or [8-11], or etc.

At the time, I was told this was impossible -- but I'd just like to open the idea again, as it would be much simpler in the end, I think.

The default would just be as we are now -- all versions -- so it could be optionally added.

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

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

Ken, I believe that's #15712. Given how long it's been open and how many comments there are, I guess it's not simple.

This ticket is specifically about clearing deps when setting known_fail yes, which is possibly more simple to implement. Alternately, I've also proposed #60566.

comment:4 Changed 3 years ago by ctreleaven (Craig Treleaven)

Cc: ctreleaven added

comment:5 Changed 3 years ago by ctreleaven (Craig Treleaven)

See also #59640

comment:6 Changed 3 years ago by jmroot (Joshua Root)

Milestone: MacPorts Future
Resolution: duplicate
Status: newclosed
Note: See TracTickets for help on using tickets.