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

Bug 442526

Summary: emerge should auto-resume and/or clean binpkgs that are in Packages but have digest mismatches
Product: Portage Development Reporter: SpanKY <vapier>
Component: Binary packages supportAssignee: Portage team <dev-portage>
Status: CONFIRMED ---    
Severity: enhancement    
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
See Also: https://bugs.gentoo.org/show_bug.cgi?id=175612
https://bugs.gentoo.org/show_bug.cgi?id=900224
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 377365    

Description SpanKY gentoo-dev 2012-11-09 23:15:52 UTC
when we have a Packages index, we have sizes/digests of all the binpkgs.  so if i start d/l-ing some and CTRL+C the process, it isn't uncommon for some binpkgs to be left in a partial state.  the next time i run emerge, it complains like:

!!! Invalid binary package: '.../x11-proto/xf86dgaproto-2.1.tbz2'
!!! Missing metadata key(s): CATEGORY, PF, SLOT. This binary package is not
!!! recoverable and should be deleted.

if portage finds an invalid binpkg and its sizes do not match, try to resume it.  if it still fails, it should use the same logic as distfiles where we rename it with a "_checksum_failure_" suffix and then try to refetch.

we could put this behind a flag or FEATURE, but i'm not sure we need to bother since we don't rm the file and this is behavior that people should generally want (when used in combination with Packages).