Step though fetch and others
Bradley Giesbrecht
brad at pixilla.com
Thu Feb 5 18:47:13 PST 2009
On Feb 5, 2009, at 6:25 PM, Ryan Schmidt wrote:
>> So I have local_repo/mail/dbmail/Portfile:
>> name dbmail
>> version 2.2.11
>> homepage http://www.dbmail.org
>> master_sites http://www.dbmail.org/download/2.2/
>
> A construct we like to use in these situations is:
>
> set branch [join [lrange [split ${version} .] 0 1] .]
> master_sites http://www.dbmail.org/download/${branch}
>
> That way you don't have to update master_sites when the version
> changes.
>
>> checksums md5 d535587973d73b85469d92a35f52133b \
>> sha1 7b9c19de7ca14d849e8388377b8aa941f3f3538b \
>> rmd160 e8a506b850d1610b66059b685b7a2318ce5e37a9
>>
>> According to what I've read it should be fetching from:
>> ${master_sites}${name}-${version}.tar.gz
>
> In the end, yes.
>
> More specifically, it fetches from ${master_sites}${distfiles}
> (assuming master_sites and distfiles are both only a single item,
> which they are in your case)
>
> ${distfiles} defaults to ${distname}${extract.suffix}.
> ${distname} defaults to ${name}-${version}
> ${extract.suffix} defaults to .tar.gz
>
>
>> Well, there is definitely a file at that address. But I'm getting a
>> html page download that's failing checksum besides not being what I
>> want.
>>
>> How do I step through the fetch process?
>>
>> Or print to console the vars fetch is using?
>
> You can enable debug mode with the -d switch:
>
> cd path/to/dbmail
> sudo port clean
> sudo port -d fetch
Which is what I was doing and debug does not print the protocol or url.
Maybe it should?
> You can also get the full URLs MacPorts wants to download from by
> using
>
> port distfiles
This does what I was looking for and has me puzzled.
If I copy and paste the first url from the (port distfiles) list into
my browser I get the file I want downloaded.
If I md5 the file the checksums match.
If I do:
file dbmail-2.2.11.tar.gz
dbmail-2.2.11.tar.gz: gzip compressed data, from Unix, last modified:
Mon Feb 2 06:26:11 2009
But if I do:
file /opt/local/var/macports/distfiles/dbmail/dbmail-2.2.11.tar.gz
/opt/local/var/macports/distfiles/dbmail/dbmail-2.2.11.tar.gz: HTML
document text
I'm at a lose without stepping through fetch. And I am not familiar
with tcl but probably will be someday:)
//Brad
More information about the macports-dev
mailing list