[MacPorts] #52989: buildbot: allow building 'pseudoports'
MacPorts
noreply at macports.org
Thu Dec 1 11:42:26 CET 2016
#52989: buildbot: allow building 'pseudoports'
----------------------------+---------------------
Reporter: mojca | Owner: admin@…
Type: enhancement | Status: new
Priority: Normal | Milestone:
Component: server/hosting | Version:
Keywords: buildbot | Port:
----------------------------+---------------------
I would find it useful if we would allow building a subset of ports with
simple expressions, so that we could rebuild all ports (either in one go
or incrementally) every now and then.
In particular it would be helpful if we could build `category:shells` or
`all` or similar things.
We are currently using the following expression to list the subports:
{{{
port info --index --line --name wxWidgets-3.0 subportof:wxWidgets-3.0
}}}
The following works:
{{{
port info --index --line --name 'category:shells'
}}}
but
{{{
port info --index --line --name 'category:shells'
subportof:'category:shells'
port info --index --line --name all subportof:all
}}}
doesn't.
What would be needed to get this working?
After inspecting the source code I see that a list of ports is generated
with
{{{
#!bash
for p in "$@"; do
print-subports "$p" && success=1
done
}}}
and `print-subports` does
{{{
#!bash
ports=$("${option_prefix}/bin/port" -q info --index --line --name
"${portname}" "subportof:${portname}" 2>/dev/null) || return
}}}
which fails if the argument of `subportof:` is not a proper port name. One
possible solution would be to run `port info` first, for example
{{{
> port info --index --line --name maintainer:mojca and category:math
aquaterm
gnuplot
libcerf
}}}
or
{{{
> port info --index --line --name wxWidgets-2.8 wxWidgets-3.0
wxWidgets-2.8
wxWidgets-3.0
}}}
and then iterate over that result rather than on the list of arguments
(three in the example `maintainer:mojca and category:math`) to print all
subports.
At the same time we should be a bit careful about code injections to
prevent logged in users from executing arbitrary shell code on the build
slaves.
Any thoughts?
--
Ticket URL: <https://trac.macports.org/ticket/52989>
MacPorts <https://www.macports.org/>
Ports system for macOS
More information about the macports-tickets
mailing list