At 12:23 PM -0500 10/21/12, Ryan Schmidt wrote:
On Oct 21, 2012, at 08:47, Craig Treleaven wrote:

 At 12:22 AM +1100 10/22/12, Joshua Root wrote:
 On 2012-10-22 00:12 , Craig Treleaven wrote:
 Hi Ryan:

 Thanks for all the improvements to the port.  For my education, I've
 seen the message quite a few times saying: "* rewrote master_sites to
 avoid HTTP redirects".  I see you used

'master_sites sourceforge:project/mediainfo/binary/mediainfo/${version}'

 How does one determine this?

 One easy way is to run:

 curl -IL URL

 which will show you if and where the existing URL is redirected.

OK, I think I've got it. I started with someone else's portfile in this case where the 'master_sites sourceforge' produced a working download. Homepage is at http://mediainfo.sourceforge.net.

 The first time I ran 'port fetch', the log showed:

 DEBUG: Executing org.macports.fetch (mediainfo)
---> MediaInfo_CLI_0.7.60_GNU_FromSource.tar.bz2 doesn't seem to exist in /opt/local/var/macports/distfiles/mediainfo ---> Attempting to fetch MediaInfo_CLI_0.7.60_GNU_FromSource.tar.bz2 from http://iweb.dl.sourceforge.net/mediainfo

Now, running 'curl -IL http://iweb.dl.sourceforge.net/mediainfo/MediaInfo_CLI_0.7.60_GNU_FromSource.tar.bz2' produced a bunch of output that included:

Location: http://voxel.dl.sourceforge.net/project/mediainfo/binary/mediainfo/0.7.60/MediaInfo_CLI_0.7.60_GNU_FromSource.tar.bz2

So the idea is to extract the bit: 'project/mediainfo/binary/mediainfo/0.7.60' (and replace "0.7.60" with ${version}).

Is that right? Would a How-to with examples like this be a good thing for the wiki?

That's it. Sure, a wiki tutorial would be good, or a script. I had a script I was using to do these fixups for me, but it broke recently and probably needs some adjustment. Let me see if I can fix it up and put it in my scripts directory.

See https://trac.macports.org/wiki/howto/AvoidRedirects

_______________________________________________
macports-dev mailing list
macports-dev@lists.macosforge.org
http://lists.macosforge.org/mailman/listinfo/macports-dev

Reply via email to