[MacPorts] #55502: Use size from checksums for curl progress bar when server does not supply length header

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

[MacPorts] #55502: Use size from checksums for curl progress bar when server does not supply length header

MacPorts
#55502: Use size from checksums for curl progress bar when server does not supply
length header
-------------------------+-----------------
 Reporter:  ryandesign   |      Owner:
     Type:  enhancement  |     Status:  new
 Priority:  Normal       |  Milestone:
Component:  base         |    Version:
 Keywords:               |       Port:
-------------------------+-----------------
 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.

--
Ticket URL: <https://trac.macports.org/ticket/55502>
MacPorts <https://www.macports.org/>
Ports system for macOS
Reply | Threaded
Open this post in threaded view
|

Re: [MacPorts] #55502: Use size from checksums for curl progress bar when server does not supply length header

MacPorts
#55502: Use size from checksums for curl progress bar when server does not supply
length header
--------------------------+----------------------------
  Reporter:  ryandesign   |      Owner:  neverpanic
      Type:  enhancement  |     Status:  assigned
  Priority:  Normal       |  Milestone:  MacPorts 2.6.0
 Component:  base         |    Version:
Resolution:               |   Keywords:
      Port:               |
--------------------------+----------------------------
Changes (by raimue):

 * status:  new => assigned
 * owner:   => neverpanic
 * milestone:   => MacPorts 2.6.0


Comment:

 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.

--
Ticket URL: <https://trac.macports.org/ticket/55502#comment:1>
MacPorts <https://www.macports.org/>
Ports system for macOS
Reply | Threaded
Open this post in threaded view
|

Re: [MacPorts] #55502: Use size from checksums for curl progress bar when server does not supply length header

MacPorts
In reply to this post by MacPorts
#55502: Use size from checksums for curl progress bar when server does not supply
length header
--------------------------+----------------------------
  Reporter:  ryandesign   |      Owner:  neverpanic
      Type:  enhancement  |     Status:  assigned
  Priority:  Normal       |  Milestone:  MacPorts 2.7.0
 Component:  base         |    Version:
Resolution:               |   Keywords:
      Port:               |
--------------------------+----------------------------
Changes (by mojca):

 * milestone:  MacPorts 2.6.0 => MacPorts 2.7.0


--
Ticket URL: <https://trac.macports.org/ticket/55502#comment:2>
MacPorts <https://www.macports.org/>
Ports system for macOS