Building all ports when setting up a new buildbot builder

Ryan Schmidt ryandesign at macports.org
Wed Dec 3 07:37:23 PST 2014


On Dec 3, 2014, at 9:09 AM, Joshua Root wrote:

> On 2014-12-4 02:07 , Ryan Schmidt wrote:
>> 
>> On Dec 3, 2014, at 9:03 AM, Joshua Root wrote:
>> 
>>> On 2014-12-4 01:57 , Ryan Schmidt wrote:
>>>> 
>>>> On Dec 3, 2014, at 8:54 AM, Joshua Root wrote:
>>>> 
>>>>> On 2014-12-3 15:34 , Ryan Schmidt wrote:
>>>>>> If that works, then it should also be able to handle:
>>>>>> 
>>>>>> port echo name:^[0-9a-d] > own_ports
>>>>>> sudo ./mpab buildports own_ports
>>>>> 
>>>>> But not `echo 'name:^[0-9a-d]' > own_ports`.
>>>> 
>>>> Sure, "echo 'name:^[0-9a-d]'" would not work, but "port echo 'name:^[0-9a-d]'" should.
>>> 
>>> I'm not even sure what we're discussing here any more.
>> 
>> We are discussing how to instruct the builders to build a set of ports based on the selectors the `port` command knows how to process. The builders use mpab "somehow". mpab supports this feature as documented in its readme.
>> 
>>> Obviously you can
>>> provide any arbitrary list of ports via the text field. How you generate
>>> them is irrelevant. That text field is the equivalent of the own_ports file.
>> 
>> Ok, so if the buildbot will not run "port echo 'name:^[0-9a-d]'" to get the list of ports, then we can do it manually and paste the result into the portlist.
>> 
>> It is just unexpected that the buildbot can expand the selector "all" but not other selectors.
> 
> It can't, at least not the way you think.

Ok, I've looked at the mpab code briefly. I see in several scripts, "all" is special cased, such as:


if [[ `head -n1 $PORTLISTFILE` == "all" ]]; then
    ports=`${PREFIX}/bin/port -q echo all | tr '\n' ' '`
else
    ports=`cat $PORTLISTFILE`
fi


In another, a special script is used to list all ports in dependency order:


useFailCache=""
if [[ -f /var/tmp/portlist && `head -n1 /var/tmp/portlist` != "all" ]]; then
   portList=`/bin/cat /var/tmp/portlist`
else
   portList=`$TCLSH /var/tmp/genportlist.tcl`
   useFailCache=1
fi
/bin/rm -f /var/tmp/portlist


However, I wonder: is /var/tmp/portlist simply the list of ports provided by the user? If so, they're not necessarily in dependency order, so is it important that the list of all ports be in dependency order?


Is there a reason not to extend these scripts to support all the MacPorts selectors?




More information about the macports-dev mailing list