[151216] contrib/buildbot-test/master.cfg

Mojca Miklavec mojca at macports.org
Wed Aug 10 21:56:01 PDT 2016


On 11 August 2016 at 03:45, Ryan Schmidt wrote:
>> On Aug 10, 2016, at 8:44 PM, Lawrence Velázquez wrote:
>>> On Aug 10, 2016, at 9:37 PM, Ryan Schmidt wrote:
>>>
>>>> On Aug 10, 2016, at 1:13 PM, mojca at macports.org wrote:
>>>>
>>>> --- contrib/buildbot-test/master.cfg        2016-08-10 18:09:29 UTC (rev 151215)
>>>> +++ contrib/buildbot-test/master.cfg        2016-08-10 18:13:02 UTC (rev 151216)
>>>> @@ -368,6 +368,7 @@
>>>>
>>>> portbuilder_factory = BuildFactory()
>>>> portbuilder_factory.workdir = '../build'
>>>> +logdir = "{}/logs".format(portbuilder_factory.workdir)
>>>
>>> Is this different from:
>>>
>>> logdir = portbuilder_factory.workdir + "/logs"
>>>
>>> ?
>>
>> Technically, they are different. For instance, if
>> portbuilder_factory.workdir were (for some reason) not a string, the
>> former would still work but the latter would not.
>>
>> Practically, they probably produce the same result.
>>
>> But neither is the "right" way:
>>
>>    import os
>>    logdir = os.path.join(portbuilder_factory.workdir, "logs")

I knew that, but felt too lazy to use it.

> Ok, there are other places where we had used "+" to concatenate strings to make paths; we should change them all to use os.path.join.

I changed that in r151249 and 151258. I don't know any "official" way
to construct PATH though and it wouldn't work on Windows anyway, so
the whole point of changing this is a bit moot.

Figuring out why
    workdir=os.path.join(portwatcher_factory.workdir, "mpbb")
didn't work and
    workdir=portwatcher_factory.workdir+"/mpbb"
was ok is left as an exercise to the reader.

I also removed /usr/local/bin from PATH. I guess we don't really need
that one unless we want to support the other package manager :)

I also added a new log listing the contents of the port.

Mojca


More information about the macports-dev mailing list