Filesize in Portfiles (was Re: [76684] trunk/dports/sysutils/rpm/Portfile)
Arno Hautala
arno at alum.wpi.edu
Sun Mar 6 14:44:00 PST 2011
On Sun, Mar 6, 2011 at 11:51, Jeff Johnson <n3npq at mac.com> wrote:
>
> Instead of setting off on a mass-edit of Portfiles, I'd suggest
> just automating file size (and digests for that matter) outside
> of build recipes. You can get that info (in most cases) with
> just a wee bit of scripting.
I do the same right now for the digests. I wouldn't expect to start a
crusade to edit every Portfile. I'd add it as a supported feature and
provide tools to easily calculating it for new Portfiles.
On Sun, Mar 6, 2011 at 12:16, Anders F Björklund <afb at macports.org> wrote:
>
> Implemented as "curl getsize" in MacPorts pextlib, for instance.
> As used by distcheck.type=filesize, to report all distfiles...
>
> $ port -v distcheck rpm distcheck.type=filesize
That's a nifty trick. Thanks.
Though, I'm getting a failure on every trial. Running curl manually
seems to indicate that many servers don't include the size in the
headers or because curl is trying to use IPv6 and my router isn't
ready for that.
> But that would still require a network access to get that info,
> even if was better than the previous (having to download them).
That's another downside. It'd be nice if the size check was as fast as
checking each Portfile, rather than going out to the network several
times.
Again, this is purely a "nice to have" feature.
--
arno s hautala /-| arno at alum.wpi.edu
pgp b2c9d448
More information about the macports-dev
mailing list