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

Bug 547532

Summary: sys-apps/portage: emerge --search randomly returns wrong installation status with --search-index=y
Product: Portage Development Reporter: Zac Medico <zmedico>
Component: Core - Interface (emerge)Assignee: Portage team <dev-portage>
Status: RESOLVED FIXED    
Severity: normal Keywords: InVCS
Priority: Normal    
Version: 2.2   
Hardware: All   
OS: All   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 484436    

Description Zac Medico gentoo-dev 2015-04-24 01:17:23 UTC
When VdbMetadataDelta.applyDelta() processes an "add" event, another package instance from the same slot (that was replaced) can remain in the cache. Then IndexedVardb.match returns both instances, and search.getInstallationStatus() can randomly show the wrong instance installed.
Comment 1 Zac Medico gentoo-dev 2015-04-24 16:36:39 UTC
There's a patch in the following branch:

	https://github.com/zmedico/portage/tree/bug_547532

I've posted it for review here:

	https://archives.gentoo.org/gentoo-portage-dev/message/f50ed3f2727f93926e770d3d09b3864e
Comment 3 Zac Medico gentoo-dev 2015-05-09 06:02:25 UTC
The "add" event handling was fixed by 89a48c206f007d4b1e323c089842cd6475c1eea2, but "remove" events need similar handling. There's a new patch in my branch:

https://github.com/zmedico/portage/tree/bug_547532

I've posted it for review here:

https://archives.gentoo.org/gentoo-portage-dev/message/ec5962dd5b97280331739025d834f2dd
Comment 5 Brian Dolbec (RETIRED) gentoo-dev 2015-05-19 19:43:36 UTC
Released in portage-2.2.19