Opened 7 years ago

Last modified 6 years ago

#52989 new enhancement

buildbot: allow building 'pseudoports' — at Initial Version

Reported by: mojca (Mojca Miklavec) Owned by: admin@…
Priority: Low Milestone:
Component: buildbot/mpbb Version:
Keywords: buildbot Cc:
Port:

Description

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

for p in "$@"; do
    print-subports "$p" && success=1
done

and print-subports does

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?

Change History (0)

Note: See TracTickets for help on using tickets.