Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#38508 closed enhancement (duplicate)

RFE: add version number support to `platforms` field in portfiles

Reported by: cooljeanius (Eric Gallager) Owned by: larryv (Lawrence Velázquez)
Priority: Normal Milestone:
Component: base Version: 2.1.3
Keywords: Cc:
Port:

Description

Thought of this is #38506; not sure if there's already a ticket open for it...

Anyway, currently, if a port is incompatible with a certain OS version, the portfile author has to write something like this:

pre-fetch {
    if {${os.platform} == "darwin" && ${os.major} < 9} {
        ui_error "${name} is only supported on OS X 10.5 Leopard or later."
        return -code error "unsupported platform version"
    }
}

It'd be much easier to just be able to write something likeplatforms darwin 9+ or something like that instead.

Change History (5)

comment:1 Changed 11 years ago by larryv (Lawrence Velázquez)

Owner: changed from macports-tickets@… to larryv@…
Status: newassigned

I’ve been thinking about this. I’m leaning towards a syntax similar to that in compiler_blacklist_versions.

platforms   macosx {darwin >= 9} freebsd

comment:2 in reply to:  1 Changed 11 years ago by cooljeanius (Eric Gallager)

Replying to larryv@…:

I’ve been thinking about this. I’m leaning towards a syntax similar to that in compiler_blacklist_versions.

platforms   macosx {darwin >= 9} freebsd

That would be perfect, thanks for agreeing to take this on.

comment:3 Changed 11 years ago by larryv (Lawrence Velázquez)

Hm. It doesn’t seem that platforms even affects whether or not a port can be installed. Even after I change a port to use

platforms   freebsd

I can still install it on OS X. Can anyone confirm this behavior?

Version 0, edited 11 years ago by larryv (Lawrence Velázquez) (next)

comment:4 Changed 11 years ago by raimue (Rainer Müller)

Resolution: duplicate
Status: assignedclosed

The platform field is currently purely informational and is not enforced.

Duplicate of #15712.

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

Replying to raimue@…:

The platform field is currently purely informational and is not enforced.

Would changing this cause any problems?

Note: See TracTickets for help on using tickets.