Stage package fetching progress is useless
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Snapcraft |
Fix Released
|
Medium
|
Sergio Schvezov |
Bug Description
When Snapcraft fetches stage packages, as of 2.27 it does it individually, which doesn't provide an overall picture of how long pulling all of them will take. This is because fetch_archives(), the method used to do it previously, messes with some filenames so fetching from the cache didn't work. For example:
>>> import snapcraft.
>>> r = repo.Ubuntu(
>>> with r._apt.
....... p = apt_cache['cpp']
....... p.mark_install()
....... apt_cache.
Results in 'cpp_4%
>>> import snapcraft.
>>> r = repo.Ubuntu(
>>> with r._apt.
....... p = apt_cache['cpp']
....... p.candidate.
Results in cpp_5.3.
Using fetch_binary isn't ideal for the reasons stated above. A better method could be to store files in the cache by hash, but that adds overhead that should be unnecessary. Some investigation into fetch_archives() may be warranted.
description: | updated |
Changed in snapcraft: | |
status: | New → In Progress |
importance: | Undecided → Medium |
assignee: | nobody → Sergio Schvezov (sergiusens) |
Changed in snapcraft: | |
status: | In Progress → Fix Committed |
Changed in snapcraft: | |
status: | Fix Committed → Fix Released |
Solving this here https:/ /github. com/snapcore/ snapcraft/ pull/1949