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

Bug 542732

Summary: sys-apps/portage-2.2.18: concurrent emerge invocations lose parallel modifications to world file
Product: Portage Development Reporter: Hanno Böck <hanno>
Component: CoreAssignee: Portage team <dev-portage>
Status: RESOLVED FIXED    
Severity: major CC: d.rammelt, ua_gentoo_bugzilla
Priority: Normal Keywords: InVCS, REGRESSION
Version: 2.2   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 484436    

Description Hanno Böck gentoo-dev 2015-03-09 18:37:45 UTC
On parallell merges current ~amd64 version of portage (2.2.18 and 2.2.17 tested) will remove packages from the world file if another merge finishes later. (This does not happen with 2.2.14 and 2.2.15)

Reproduce:
* Start two emerge processes with not yet installed packages (preferrably with no dependencies) at the same time.
* Whichever merge will finish first will add its package to the world file as expected.
* Whichever merge finishes second will then add its package to the world and *remove* the other package.

I assume what's happening is that an emerge process already opens the world file on startup and saves its state modified from that starting point. That leads to the situation where packages are removed from the world file when they have been merged while another emerge process was running.
Comment 1 Zac Medico gentoo-dev 2015-03-09 19:34:15 UTC
There's a patch in the following branch:

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

I've posted it for review here:

    http://thread.gmane.org/gmane.linux.gentoo.portage.devel/5326
Comment 2 Zac Medico gentoo-dev 2015-03-09 19:54:28 UTC
This is in the master branch now:

https://github.com/gentoo/portage/commit/0bdfd62184d3224c23f5293683ba6fb5c0769e6a
Comment 3 Zac Medico gentoo-dev 2015-04-28 12:56:09 UTC
*** Bug 547972 has been marked as a duplicate of this bug. ***
Comment 4 Brian Dolbec (RETIRED) gentoo-dev 2015-05-18 23:46:19 UTC
Released in portage-2.2.19