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

Bug 663692

Summary: sys-apps/portage: copy-on-write when applying package moves to binary packages
Product: Portage Development Reporter: Zac Medico <zmedico>
Component: Binary packages supportAssignee: Portage team <dev-portage>
Status: CONFIRMED ---    
Severity: normal CC: sam
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: All   
See Also: https://bugs.gentoo.org/show_bug.cgi?id=766012
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 835380    

Description Zac Medico gentoo-dev 2018-08-15 17:31:09 UTC
Since package moves might interfere with PORTAGE_BINHOST clients when they are applied in-place, it would be better if the package moves would be applied to a copy when FEATURES=binpkg-multi-instance is enabled.
Comment 1 Zac Medico gentoo-dev 2018-08-27 19:13:29 UTC
The fakedbapi _instance_key_multi_instance method already includes mtime in the key, so the mtime can serve to distinguish new instances that have had package moves applied. The dbapi _cmp_cpv will have to include mtime in its comparison.
Comment 2 Zac Medico gentoo-dev 2018-08-27 19:30:45 UTC
Also eclean-pkg will need to account for mtime in this code from bug 586658:

https://gitweb.gentoo.org/proj/gentoolkit.git/commit/?id=1952ecb9f2912968dd2f4487089fa50ed3d3bad1
Comment 3 Zac Medico gentoo-dev 2021-01-17 23:09:21 UTC
I think it's probably better to create a new binary package format that patches an existing binary package, so that if the user has the base package installed, then it patches the base package into a new package. This can be used not only to propagate package moves, but also to propagate other dependency changes like those introduced by eclass changes.
Comment 4 Zac Medico gentoo-dev 2021-01-19 11:36:30 UTC
For bug 766012 I added copy on write to binarytree.move_ent since that seemed like this most practical and obvious solution:

https://gitweb.gentoo.org/proj/portage.git/commit/?id=79106b8bbce8b7b27db14877ca63c75a1a4a32d3

Both move_slot_ent and update_ents still operate in-place.