Opened 6 years ago

Last modified 3 years ago

#55502 assigned enhancement

Use size from checksums for curl progress bar when server does not supply length header

Reported by: ryandesign (Ryan Carsten Schmidt) Owned by: neverpanic (Clemens Lang)
Priority: Normal Milestone: MacPorts Future
Component: base Version:
Keywords: Cc: raimue (Rainer Müller)
Port:

Description

When MacPorts is fetching a distfile using libcurl, and the web server does not supply a Length header, MacPorts does not know how big the file is, so it can't display a determinate progress bar and has to fall back on an indeterminate progress bar. GitHub's automatically generated tarballs are a common example of when this happens.

MacPorts now has support for portfile authors to indicate the filesize in the checksums line, using the checksum type size.

For distfiles that indicate their size in this way, MacPorts should be able to use that information to display a determinate progress bar, even if the server doesn't supply the length.

Change History (3)

comment:1 Changed 6 years ago by raimue (Rainer Müller)

Milestone: MacPorts 2.6.0
Owner: set to neverpanic
Status: newassigned

This is reasonable, but it is not as easy as I originally thought. At the moment, we just rely on the progress function of curl, so we would need to pass the expected size to the curl Tcl command and then pass it through to the progress function to calculate the expected time. Also the checksums option is only parsed in the checksums phase, so that would neeed to be moved to be done earlier.

comment:2 Changed 6 years ago by mojca (Mojca Miklavec)

Milestone: MacPorts 2.6.0MacPorts 2.7.0

comment:3 Changed 3 years ago by jmroot (Joshua Root)

Milestone: MacPorts 2.7.0MacPorts Future

Ticket retargeted after milestone closed

Note: See TracTickets for help on using tickets.