Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 279096

Summary: download distfiles to a temporary file and rename upon successful completion
Product: Portage Development Reporter: Sven <sven.koehler>
Component: Enhancement/Feature RequestsAssignee: Portage team <dev-portage>
Status: CONFIRMED ---    
Severity: enhancement CC: kfm, sam
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
See Also: https://github.com/pkgcore/pkgdev/issues/153
https://github.com/pkgcore/pkgcore/issues/52
https://bugs.gentoo.org/show_bug.cgi?id=900226
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 377365    

Description Sven 2009-07-25 20:30:12 UTC
Hi,

developing my own ebuilds, I regularly notice, that "ebuild digest" calculates the digest of broken files.

This is because, sometimes, a downloads gets aborted, I press Strg+C or something else happends so that the downloaded file is cut off at the end.

"ebuilds digest" of course doesn't notice that simply because it cannot since the necessary information is not there yet.

That's why I would like to suggest, that "ebuild digest" downloads the files to a temporary file first, that's renamed to the real filename only if the download was successful.

For example:
- download to xyz.tar.gz.tmp
- rename to cyz.tar.gz only if download was successful





Reproducible: Always

Steps to Reproduce:
1. do a "ebuild digest"
2. abort the download
3. do the ebuild digest again
4. it will compute the checksums using the partial file