Re: "size" documentation

2018-08-19 Thread Dave Horsfall

On Sun, 19 Aug 2018, Ryan Schmidt wrote:

If the idea is to help display a progress bar (please make it in 
color),


What color would you like? :)


Do we really need unnecessary colour?  I've been using computers since 
about 1971, and mono sems to work just fine.


-- Dave


Re: "size" documentation

2018-08-18 Thread Rainer Müller
On 2018-08-18 09:53, Jan Stary wrote:
> On Aug 17 22:06:13, c...@macports.org wrote:
>> I think the idea of the size keyword is to start to use it to display
>> download progress bars for servers that do not send a Content-Length
>> HTTP header (or do not have an equivalent of such a header due to the
>> used protocol).
> 
> How many of the total number of ports have their distfiles served
> by such servers? Would it be simpler to just not display a progress bar
> in those cases, as opposed to introducing another keyword?

Yes, that is the current implementation. Specifying "size" is simple and
might have a use case in the future.

> If the idea is to help display a progress bar (please make it in color),
> why is it a 'checksum'? We already have much beter checksums.

Well, adding it at any other place would add more complexity and
confusion. The file size is a checksum.

> curl it the one doing the download. If it can display a progress bar,
> it will. If not, please leave it like that.
> 
>> This is currently not implemented.
> 
> Reminds me of 'platforms'.

Patches are still welcome...

Rainer


Re: "size" documentation

2018-08-18 Thread Jan Stary
On Aug 17 10:19:17, m...@macports.org wrote:
> > On Aug 17, 2018, at 7:44 AM, Perry E. Metzger  wrote:
> > 3. There's no real documentation of the "size" parameter to
> > checksums, and I'm constantly asking people to add the size. Note
> > that I don't think "size" is a reasonable thing to require given that
> > finding two files of the same size with the same SHA-2 hash is
> > probably worth a doctoral dissertation at this point, but if we are
> > going to require it (why do we require it?), it should be documented,
> > and port lint should complain that it isn't there, and doing
> > port -v checksums should spit it out if it isn't there. 
> 
> The size is also useful for giving user feedback
> on the download time remaining. 

On Aug 17 22:06:13, c...@macports.org wrote:
> I think the idea of the size keyword is to start to use it to display
> download progress bars for servers that do not send a Content-Length
> HTTP header (or do not have an equivalent of such a header due to the
> used protocol).

How many of the total number of ports have their distfiles served
by such servers? Would it be simpler to just not display a progress bar
in those cases, as opposed to introducing another keyword?

If the idea is to help display a progress bar (please make it in color),
why is it a 'checksum'? We already have much beter checksums.

curl it the one doing the download. If it can display a progress bar,
it will. If not, please leave it like that.

> This is currently not implemented.

Reminds me of 'platforms'.

Jan