[MacPorts] #64326: app PortGroup: app.name unable to handle names with spaces
MacPorts
noreply at macports.org
Mon Jan 3 02:58:23 UTC 2022
#64326: app PortGroup: app.name unable to handle names with spaces
-------------------------+--------------------
Reporter: jasonliu-- | Owner: (none)
Type: defect | Status: new
Priority: Normal | Milestone:
Component: ports | Version: 2.7.1
Resolution: | Keywords:
Port: pg-app-1.0 |
-------------------------+--------------------
Comment (by ryandesign):
Replying to [comment:7 jasonliu--]:
> I never created two variables, at least not intentionally.
Well the `app.name` option ("variable") already exists, and you're
creating a new variable `pretty_name` and then setting `app.name` to it,
for what to me was is discernible reason other than making things more
confusing.
> Particularly if a port has multiple subports, only one of which uses the
app PortGroup, defining {{{$pretty_name}}} near the top of the file allows
it to be used in all of the subports, including the ones that don't use
the app PortGroup.
You have multiple subports that install apps of the same name? That's
weird.
Include the app portgroup at the top of the portfile, unconditionally.
Indeed the app portgroup was not designed with subports in mind, in that
it does have consequences the moment it is included, however by setting
`app.create no` soon after, those consequences are disabled. Then, in the
subports in which you want apps created, use `app.create yes`. Now you can
use the existing `app.name` option as intended, even globally, and not
need a second variable.
--
Ticket URL: <https://trac.macports.org/ticket/64326#comment:8>
MacPorts <https://www.macports.org/>
Ports system for macOS
More information about the macports-tickets
mailing list