Yes, using the `curl -IL` command to obtain the part of the path I need to extract (which is very slightly different from the web browser URL), did the trick. Thanks! :)
-- Jason Liu On Thu, Dec 16, 2021 at 4:29 PM Daniel J. Luke <dl...@geeklair.net> wrote: > On Dec 16, 2021, at 4:24 PM, Jason Liu <jason...@umich.edu> wrote: > > I'm working on a new portfile that has its source stored on sourceforge. > MacPorts is having trouble obtaining the tarball, because apparently the > mirrors are pointing to the wrong file, and if I put the full URL into > `master_sites`, it's unable to find the tarball at all. It seems that > sourceforge is using 301 redirects to point to the actual file. If I use > the URL with a `curl -L`, the correct file downloads just fine. Is there > any way to get MacPorts to follow redirects during the fetch phase? If at > all possible, I'd like to avoid manually using curl through a `system` > call, but I suppose it could work as a last resort. > > Does this sourceforge example help? > > https://trac.macports.org/wiki/howto/AvoidRedirects > > -- > Daniel J. Luke > >