Summary: | sys-apps/portage-2.3.31 - ctrl+c during postinst can break /var/db/pkg/*/*/environment.bz2 | ||
---|---|---|---|
Product: | Portage Development | Reporter: | Martin Mokrejš <mmokrejs> |
Component: | Core | Assignee: | Portage team <dev-portage> |
Status: | CONFIRMED --- | ||
Severity: | normal | ||
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: | umerge_and_emerge |
Description
Martin Mokrejš
2018-05-02 07:53:41 UTC
Created attachment 529330 [details]
umerge_and_emerge
# emerge --unmerge dev-python/namespace-google
# emerge -1 dev-python/namespace-google
# emerge --info
Atomicity really has to be implemented at the filesystem level, and is better delegated to the caller of emerge. *** This bug has been marked as a duplicate of bug 40127 *** But how about ignoring ctrl+c in the critical parts? (In reply to Martin Mokrejš from comment #3) > But how about ignoring ctrl+c in the critical parts? There are a number of signals that can't be ignored. The failure already tells you what to do (if you remove the corrupted environment.bz2, it will regenerate it and continue.) I think there is an open question as to whether portage should just do that automatically. Actually, we can update the enviroment.bz2 file more atomically, by writing it to a temporary file in the same directory and then renaming it. The relevant code uses a PORTAGE_UPDATE_ENV variable to refer to the path, which currently refers directly to environment.bz2 rather than a temporary file. |