On Mar 6, 2011, at 20:21, Jeremy Lavergne wrote:
>> however, given that people can just use "port distfiles" and "curl -I".
>
> By no means is "run this set of obscure commands" the Mac way, which I
> believe MacPorts strives to follow. While it'd be nice for the GUI (an always
> separate topic of malcontent), I don't recall any MacPorts-based ones having
> this functionality presently.
>
> This appears to be a situation where we can easily improve our user
> experience.
>
> I believe `port` could handle the addition of a user-friendly message from a
> HEAD request, appended to the standard ui_msg:
>
> ---> Fetching PORTNAME (WX.YZ MB)
>
> While I can't whip up Tcl on a whim, I envision something similar to this:
> set msg "Fetching portname "
> if fetch.type in {http, ftp} do msg-append curl::getsize(distfile)
> ui_msg msg
>
> Depending on how base already handles this message for multiple distfiles, we
> would either have a sum of all distfiles being appended or print the
> curl::getsize out for each distfile.
>
> This change should also work gracefully if the fetch phase is ever threaded
> (enabling download X at a time, continue downloading dependencies while
> compiling, etc).
Ah, well, yes, you're right of course, I didn't mean that users should use
obscure commands; I meant the information is already available via those
commands, so we needn't go through thousands of portfiles adding this
information and keeping it updated there forevermore, when it's redundant.
Certainly MacPorts could be enhanced with a command (port distsize?) that would
print the filesizes for you. Or the web site could be enhanced to include that
information.
We might have to forgo this for ports that don't fetch distfiles (fetch.type
cvs, svn, git, hg, ...)
Certainly a proper progress bar for downloads in MacPorts would be nice.
Currently we just let curl print whatever it wants, but when we have ports like
gcc4* that download five large distfiles, it's nice to know the overall
progress, not just the progress of each file. But that is the exception; most
ports just have one distfile.
_______________________________________________
macports-dev mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macports-dev