Activity log for bug #1663365

Date Who What changed Old value New value Message
2017-02-09 20:04:22 Kyle Fazzari bug added bug
2017-02-09 20:04:49 Kyle Fazzari 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.internal.repo as repo >>> r = repo.Ubuntu('/tmp/foo') >>> with r._apt.archive('/tmp/cache') as apt_cache: ... p = apt_cache['cpp'] ... p.mark_install() ... apt_cache.fetch_archives() Results in 'cpp_4%3a5.3.1-1ubuntu1_amd64.deb' being fetched. Whereas: >>> import snapcraft.internal.repo as repo >>> r = repo.Ubuntu('/tmp/foo') >>> with r._apt.archive('/tmp/cache') as apt_cache: ... p = apt_cache['cpp'] ... p.candidate.fetch_binary(<downloaddir>) Results in cpp_5.3.1-1ubuntu1_amd64.deb being fetched. 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. 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.internal.repo as repo >>> r = repo.Ubuntu('/tmp/foo') >>> with r._apt.archive('/tmp/cache') as apt_cache: ....... p = apt_cache['cpp'] ....... p.mark_install() ....... apt_cache.fetch_archives() Results in 'cpp_4%3a5.3.1-1ubuntu1_amd64.deb' being fetched. Whereas: >>> import snapcraft.internal.repo as repo >>> r = repo.Ubuntu('/tmp/foo') >>> with r._apt.archive('/tmp/cache') as apt_cache: ....... p = apt_cache['cpp'] ....... p.candidate.fetch_binary(<downloaddir>) Results in cpp_5.3.1-1ubuntu1_amd64.deb being fetched. 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.
2018-02-23 15:28:19 Sergio Schvezov snapcraft: status New In Progress
2018-02-23 15:28:22 Sergio Schvezov snapcraft: importance Undecided Medium
2018-02-23 15:28:25 Sergio Schvezov snapcraft: assignee Sergio Schvezov (sergiusens)
2018-02-26 11:06:11 Sergio Schvezov snapcraft: status In Progress Fix Committed
2018-09-07 03:22:12 Sergio Schvezov snapcraft: status Fix Committed Fix Released