macports localinstall github tries to download from macports

Ken Cunningham ken.cunningham.webuse at gmail.com
Mon Apr 27 21:53:27 UTC 2020


I would suggest  you try going with what the github PG wants to use for it's defaults for this moment, and see what you think of that. It's usually good.

We do prefer, if there is one, an official "GitHub Release" which sometimes has extra stuff in it, but this is your own personal Portfile right now, and you're just trying to get it done, so don't worry about that stuff for now.

If you glance at the top of the github portgroup TCL file you will read more than you could ever want to know about how the github portgroup works and what options it supports:

/opt/macports-ports/_resources/port1.0/group/github-1.0.tcl


K





On 2020-04-27, at 2:40 PM, macports at parvis.nl wrote:

> 
>> On 2020-04-27, at 21:55, Ken Cunningham <ken.cunningham.webuse at gmail.com> wrote:
>> 
>> it takes some work sometimes to make the github PortGroup obey your bidding:
>> 
>> 
>> you know that you want this file:
>> 
>> https://github.com/snabb/downtimed/archive/version-1.0.tar.gz
>> 
>> 
>> you would have thought that setting:
>> 
>> github.tarball_from archive
>> 
>> 
>> would work to get you that file, but it does not, because the github portgroup generates this url instead:
>> 
>> https://github.com/snabb/downtimed/archive/1.0/downtimed-1.0.tar.gz
>> 
>> 
>> and there is nothing at that URL. Ergo your 404 error.
>> 
>> This can be very frustrating. Some package mangers just let you put in the whole URL you want -- that is nice :> -- but it bypasses a feature MacPorts wants to have, which is distfile mirroring, which is nice when it works.
>> 
>> You can see the URL the github PG generates by using
>> 
>> port distfiles
>> 
>> and then just monkey around with options until it matches a place where there is a file.
>> 
>> In practical terms for right now, if you remove this line:
>> 
>> github.tarball_from archive
>> 
>> 
>> 
>> and you should be OK
>> 
>> port distfiles will tell you.
>> 
>> I often paste the URL I want into the portfile as a comment, and then keep monkeying around with the GitHub PG settings until I get something.
>> 
>> Anybody who tells you it is very easy and you're missing something obvious just forgets what it was like before they knew how to manhandle the github PG :>
>> 
>> Ken
> 
> 
> thanks.
> 
> left out github.tarball_from
> now i get
> https://github.com/snabb/downtimed/tarball/1.0/downtimed-1.0.tar.gz
> but i need
> https://github.com/snabb/downtimed/archive/version-1.0.tar.gz
> 
> is there a way to use a template for the download? or is it trial and error?
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macports.org/pipermail/macports-users/attachments/20200427/265239bb/attachment.html>


More information about the macports-users mailing list