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

Bug 303567

Summary: sys-apps/portage-2.2 - `emerge -j4 -DkNtu1 @system @world' fails when upgrading bash and glibc concurrently
Product: Portage Development Reporter: Helmut Jarausch <jarausch>
Component: Core - DependenciesAssignee: Portage team <dev-portage>
Status: RESOLVED FIXED    
Severity: normal Keywords: InVCS
Priority: High    
Version: 2.2   
Hardware: All   
OS: Linux   
See Also: https://bugs.gentoo.org/show_bug.cgi?id=782817
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 307597, 328317    
Attachments: merge libc asap
install libc asap while accounting for parallel builds

Description Helmut Jarausch 2010-02-05 12:21:00 UTC
Prologue - I know, I use a masked portage version, but recent updates to 
QT / KDE  would have been a mess without.

Under the following situation portage commits suicide :

- option --usepkg
- there is a new glibc
- there is a new bash linked to the new glibc

Having looked at the dead system (from a SystemRescueCD),
the new bash has been installed before the new glibc has been (completely?)
installed.
The result: no shell did work anymore
            portage fails
            even a chroot to the system fails since there is no working shell

I could survive by doing an rsync (/lib and /bin) from the target machine.

Still, quite unpleasant.

Probably glibc and other packages vital to the shell (and maybe python)
should be replaced first.

Probably the same problem occurs with versions 2.1.x


Reproducible: Always
Comment 1 Jeroen Roovers (RETIRED) gentoo-dev 2010-02-09 16:48:08 UTC
I hopefully updated the Summary to be less spectacularly dramatic and to more exactly and dryly specify what exactly happened...
Comment 2 Zac Medico gentoo-dev 2010-02-09 19:19:51 UTC
Adding virtual/libc to the bash dependencies would solve this. Given the virtual/libc dependencies are typically unspecified, I guess we should add a hack in the dependency resolver to automatically promote virtual/glibc to the front of the list, similar to how sys-apps/portage is automatically promoted.
Comment 3 Zac Medico gentoo-dev 2010-02-17 03:52:15 UTC
Created attachment 219959 [details, diff]
merge libc asap

Save as /tmp/libc_asap.patch and apply as follows:

  cd /usr/lib/portage
  patch -p0 < /tmp/libc_asap.patch
Comment 4 Zac Medico gentoo-dev 2010-03-03 11:20:13 UTC
This is fixed in 2.1.8 and 2.2_rc64.
Comment 5 Zac Medico gentoo-dev 2010-03-03 11:26:58 UTC
Actually, the current won't necessarily work with --jobs > 1, so this needs a little more work.
Comment 6 Zac Medico gentoo-dev 2010-03-09 03:55:01 UTC
Created attachment 222767 [details, diff]
install libc asap while accounting for parallel builds
Comment 7 Zac Medico gentoo-dev 2010-03-10 04:11:41 UTC
This is fixed in 2.1.8.3 and 2.2_rc67.