> On 2020-04-27, at 21:55, Ken Cunningham <[email protected]> > 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 <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 <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?
