[macports-ports] branch master updated: atf: update to 0.21

Ryan Schmidt ryandesign at macports.org
Thu Mar 8 16:21:54 UTC 2018


On Mar 8, 2018, at 10:13, Ken Cunningham wrote:

> On Mar 7, 2018, at 11:56 PM, Ryan Schmidt wrote:
> 
>> On Mar 2, 2018, at 01:58, Ken wrote:
>> 
>>> +github.setup            jmmv atf 0.21
>>> +
>>> +# github.tarball_from downloads or releases does not set the mastersite correctly
>>> +master_sites            https://github.com/jmmv/atf/releases/download/${name}-${version}/
>> 
>> It does if you set the tag prefix. See:
>> 
>> https://github.com/macports/macports-ports/commit/c998339ff1ecd76f4e428efe8725083451f570f1
> 
> That tag prefix doesn’t do quite what I thought it did, clearly. I thought it was needed to change the name of the distfile, which is somehow already set right. But indeed, adding the tag changes the full distfile URL from this
> 
> https://github.com/jmmv/atf/releases/download/0.21/atf-0.21.tar.gz
> 
> to 
> 
> https://github.com/jmmv/atf/releases/download/atf-0.21/atf-0.21.tar.gz
> 
> 
> I guess in future I can use `port distfiles PORTNAME` more often to try to debug what is going wrong….


The tag prefix is whatever string appears before the version number in this project's git tag names. GitHub suggests the tag prefix "v" so many projects use that. Many other projects use no prefix. This project's developers have chosen to use the prefix "atf-".

The github portgroup defaults distname to ${github.project}-${github.version}, similar to the way MacPorts base defaults distname to ${name}-${version} in other ports. When using github.tarball_from tarballs, which is the default, it does not matter what distname you specify. The GitHub server accepts any filename. The file you receive is not determined by the filename, but by the tag name. Usually you don't override distname when using github.tarball_from tarballs.

You are changing github.tarball_from to releases. GitHub imposes no naming convention for release downloads; developers can upload files with whatever names they want, so you need to override distname if the developer's file naming convention is not ${github.project}-${github.version}${extract.suffix}.

All as described in the portgroup's documentation :)



More information about the macports-dev mailing list