snapcraft source progress bar crash on compressed source
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Snapcraft |
New
|
Undecided
|
Unassigned |
Bug Description
The download progress bar code assumes that the transfer size is the same as the disk size, which is true when the source is already compressed and doesn't compress better and the web server decides not to compress additionally.
Sources that use a URL might give a URL that compresses well, and when web servers tell the content length -- the size of the amount that will be transferred, the amount that is decompressed and written to disk is larger. That leads to the progress bar finish test to fail.
File "/home/
self.download()
File "/home/
download_
File "/home/
progress_
File "/usr/lib/
raise ValueError('Value out of range 0 <= %s <= %s' % (value, self.maxval,))
ValueError: Value out of range 0 <= 1295 <= 1074
You can't peek at the server header Content-Length and then take request data that has been decompressed for you.