github portgroup design

Joshua Root jmr at macports.org
Wed Jun 24 18:19:28 PDT 2015


On 2015-6-25 10:56 , Ryan Schmidt wrote:
> On Jun 23, 2015, at 7:01 PM, Joshua Root wrote:
> 
>> On 2015-6-24 07:21 , Ryan Schmidt wrote:
>>>
>>> On Jun 22, 2015, at 4:42 PM, Lawrence Velázquez wrote:
>>>
>>>> On Jun 4, 2015, at 7:32 PM, Ryan Schmidt wrote:
>>>>
>>>>> I agree setup procs are not the best.
>>>>
>>>> I also don't like that the semantics of the arguments are not obvious. We might know from experience what the different components of
>>>>
>>>>   github.setup foo bar 1.0 foo-
>>>>
>>>> mean, but it doesn't lend itself to being understood. And then each portgroup with a setup proc uses different arguments.
>>>
>>> Well sure, each portgroup has different needs. As long as the arguments are documented, which they are for the github portgroup, that's at least something.
>>
>> If we must have setup procs, their invocations should be readable. They
>> should take named args, e.g. '-somearg foo -otherarg bar' or
>> 'somearg=foo otherarg=bar'.
> 
> I like named args in Objective-C and Swift, but we haven't used them in setup procs, that I recall. We use them some in MacPorts base, yes? Need a good example to look at...

The add_users option and its underlying adduser/addgroup procs are one
example that uses the = approach.

- Josh


More information about the macports-dev mailing list