Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 547532 - sys-apps/portage: emerge --search randomly returns wrong installation status with --search-index=y
Summary: sys-apps/portage: emerge --search randomly returns wrong installation status ...
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core - Interface (emerge) (show other bugs)
Hardware: All All
: Normal normal (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords: InVCS
Depends on:
Blocks: 484436
  Show dependency tree
 
Reported: 2015-04-24 01:17 UTC by Zac Medico
Modified: 2015-05-19 19:43 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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