[MacPorts] #38508: RFE: add version number support to `platforms` field in portfiles
#38508: RFE: add version number support to `platforms` field in portfiles -------------------------+-------------------------------- Reporter: egall@… | Owner: macports-tickets@… Type: enhancement | Status: new Priority: Normal | Milestone: Component: base | Version: 2.1.3 Keywords: | Port: -------------------------+-------------------------------- 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 like`platforms darwin 9+` or something like that instead. -- Ticket URL: <https://trac.macports.org/ticket/38508> MacPorts <http://www.macports.org/> Ports system for OS X
#38508: RFE: add version number support to `platforms` field in portfiles --------------------------+---------------------- Reporter: egall@… | Owner: larryv@… Type: enhancement | Status: assigned Priority: Normal | Milestone: Component: base | Version: 2.1.3 Resolution: | Keywords: Port: | --------------------------+---------------------- Changes (by larryv@…): * status: new => assigned * owner: macports-tickets@… => larryv@… Comment: I’ve been thinking about this. I’m leaning towards a syntax similar to that in `compiler_blacklist_versions`. {{{ platforms macosx {darwin >= 9} freebsd }}} -- Ticket URL: <https://trac.macports.org/ticket/38508#comment:1> MacPorts <http://www.macports.org/> Ports system for OS X
#38508: RFE: add version number support to `platforms` field in portfiles --------------------------+---------------------- Reporter: egall@… | Owner: larryv@… Type: enhancement | Status: assigned Priority: Normal | Milestone: Component: base | Version: 2.1.3 Resolution: | Keywords: Port: | --------------------------+---------------------- Comment (by egall@…): Replying to [comment:1 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. -- Ticket URL: <https://trac.macports.org/ticket/38508#comment:2> MacPorts <http://www.macports.org/> Ports system for OS X
#38508: RFE: add version number support to `platforms` field in portfiles --------------------------+---------------------- Reporter: egall@… | Owner: larryv@… Type: enhancement | Status: assigned Priority: Normal | Milestone: Component: base | Version: 2.1.3 Resolution: | Keywords: Port: | --------------------------+---------------------- Comment (by larryv@…): 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? -- Ticket URL: <https://trac.macports.org/ticket/38508#comment:3> MacPorts <http://www.macports.org/> Ports system for OS X
#38508: RFE: add version number support to `platforms` field in portfiles --------------------------+---------------------- Reporter: egall@… | Owner: larryv@… Type: enhancement | Status: closed Priority: Normal | Milestone: Component: base | Version: 2.1.3 Resolution: duplicate | Keywords: Port: | --------------------------+---------------------- Changes (by raimue@…): * status: assigned => closed * resolution: => duplicate Comment: The platform field is currently purely informational and is not enforced. Duplicate of #15712. -- Ticket URL: <https://trac.macports.org/ticket/38508#comment:4> MacPorts <http://www.macports.org/> Ports system for OS X
#38508: RFE: add version number support to `platforms` field in portfiles --------------------------+---------------------- Reporter: egall@… | Owner: larryv@… Type: enhancement | Status: closed Priority: Normal | Milestone: Component: base | Version: 2.1.3 Resolution: duplicate | Keywords: Port: | --------------------------+---------------------- Comment (by larryv@…): Replying to [comment:4 raimue@…]:
The platform field is currently purely informational and is not enforced.
Would changing this cause any problems? -- Ticket URL: <https://trac.macports.org/ticket/38508#comment:5> MacPorts <http://www.macports.org/> Ports system for OS X
participants (1)
-
MacPorts