Fetching tarball of a commit

Daniel Ericsson deric at macports.org
Fri May 11 12:47:22 PDT 2012


On 11 maj 2012, at 17:16, Ryan Schmidt wrote:

> 
> On May 11, 2012, at 10:03, Craig Treleaven wrote:
> 
>> So, I'm back working on a port of MythTV; thanks to Michael Dickens for finding and fixing a flaw in the QT4-mac port.  I really want to use a recent version of the Fixes/0.25 branch as some bugs affecting the Mac were fixed recently.  A Myth dev tells me that GitHub deliver the identical zipball for a particular commit (say 9ccfac11f3...) via:
>> 
>> https://github.com/MythTV/mythtv/zipball/9ccfac11f31d8d05d48092efcbec8015c68f6cc1
>> 
>> In Safari, this downloads "MythTV-mythtv-v0.25-84-g9ccfac1.zip".
>> 
>> I've tried several combinations of master_sites, distfiles, and distname with little success.  For example ...
>> 
>> set sha1_long       9ccfac11f31d8d05d48092efcbec8015c68f6cc1
>> master_sites        https://github.com/MythTV/mythtv/zipball/
>> distfiles           $sha1_long
>> extract.suffix      {}
>> checksums           rmd160  08598846aa0cf909a75c67c76183a6d044eff90a \
>>                   sha256 e7d681ad0d1e22d87b11779665966627354b71864c4269f1d789cce9649ec120
>> 
>> This fetches a file (named "9ccfac11f31d8d05d48092efcbec8015c68f6cc1", 79.5 MB) which passes the checksum but fails to unzip, complaining "has more than one entry--rest ignored".  I'm still a neophyte with MacPorts, TCL and lots of other stuff!  ;)
>> 
>> Any suggestions on how to get this to work?  Might be useful in other cases, as well.
> 
> We have a github portgroup which you should use.
> 
> We should improve the github portgroup so that it can fetch tarballs from arbitrary revisions. Currently it only fetches tarballs for tags.

I do this in some local Portfiles, checking it now it's seems to get redirected, but it works.

PortSystem          1.0
PortGroup           github 1.0

checksums           rmd160  38cf5c7de055057df1fc081d261e198d45127f3d \
                    sha256  c866214e6c54731a8cf6a89b7c85b3c631db22db1228db63403ccf7aabca38cc

github.setup MythTV mythtv 9ccfac11f31d8d05d48092efcbec8015c68f6cc1

8< --

--->  Attempting to fetch mythtv-9ccfac11f31d8d05d48092efcbec8015c68f6cc1.tar.gz from https://github.com/MythTV/mythtv/tarball/9ccfac11f31d8d05d48092efcbec8015c68f6cc1
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
 10 70.2M   10 7263k    0     0   508k      0  0:02:21  0:00:14  0:02:07  578k

And you do get the right revision with this...

-- Daniel




More information about the macports-dev mailing list