Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 256616 - upgrade to >=bash-3.2_p39 causes parallel builds to fail due to temporarily missing /bin/sh
Summary: upgrade to >=bash-3.2_p39 causes parallel builds to fail due to temporarily m...
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core (show other bugs)
Hardware: x86 Linux
: High normal
Assignee: Portage team
URL:
Whiteboard:
Keywords: InVCS
Depends on:
Blocks: 210077 261959 262145
  Show dependency tree
 
Reported: 2009-01-28 11:54 UTC by Gustavo F. Padovan
Modified: 2024-02-27 03:12 UTC (History)
3 users (show)

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


Attachments
perl-5.8.8-r5 build.log (build.log,33.85 KB, text/plain)
2009-01-28 11:56 UTC, Gustavo F. Padovan
Details
gpm-1.20.5 build.log (build.log,12.81 KB, text/plain)
2009-01-28 11:57 UTC, Gustavo F. Padovan
Details
emerge --info (emerge.info,3.22 KB, text/plain)
2009-01-28 11:57 UTC, Gustavo F. Padovan
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Gustavo F. Padovan 2009-01-28 11:54:46 UTC
while emerging app-shells/bash-3.2_p39 (in a emerge -NDuva world from stage3-x86-2008.0 tarball) other emerge compilation fail with this message:
make[1]: /bin/sh: Command not found

Reproducible: Always

Steps to Reproduce:
1. `emerge -NDuva -j3 world` from stage3-x86-2008.0 tarball with parallel portage

Actual Results:  
>>> Emerging (35 of 75) app-shells/bash-3.2_p39
>>> Installing sys-apps/texinfo-4.11-r1
>>> Emerging (36 of 75) sys-apps/less-418
>>> Installing sys-apps/less-418
>>> Emerging (37 of 75) sys-libs/gpm-1.20.5
>>> Installing app-shells/bash-3.2_p39
>>> Failed to emerge dev-lang/perl-5.8.8-r5, Log file:
>>>  '/var/tmp/portage/dev-lang/perl-5.8.8-r5/temp/build.log'
>>> Failed to emerge sys-libs/gpm-1.20.5, Log file:
>>>  '/var/tmp/portage/sys-libs/gpm-1.20.5/temp/build.log'
Comment 1 Gustavo F. Padovan 2009-01-28 11:56:16 UTC
Created attachment 179949 [details]
perl-5.8.8-r5 build.log
Comment 2 Gustavo F. Padovan 2009-01-28 11:57:14 UTC
Created attachment 179951 [details]
gpm-1.20.5 build.log
Comment 3 Gustavo F. Padovan 2009-01-28 11:57:58 UTC
Created attachment 179952 [details]
emerge --info
Comment 4 Zac Medico gentoo-dev 2009-01-28 18:17:12 UTC
You'd better do this to fix it (your system might not boot otherwise):

  ln -s bash /bin/sh
Comment 5 Zac Medico gentoo-dev 2009-01-28 19:09:56 UTC
Actually, I suspect that your /bin/sh symlink already exists. It's just that it didn't exist in the time between bash being upgraded and the pkg_postinst phase executing (which creates the symlink).
Comment 6 Zac Medico gentoo-dev 2009-01-28 19:19:10 UTC
One possible way to solve this would be to add /bin/sh to CONFIG_PROTECT. There's already some code in pkg_preinst which bumps the timestamp on the symlink, and that will prevent it from being unmerged if it's CONFIG_PROTECTed.
Comment 7 Zac Medico gentoo-dev 2009-01-29 00:17:10 UTC
Considering that this issue boils down to an unspecified dependency on /bin/sh, maybe we should have a new RESTRICT value for packages like this, which prevents them from being merged while other packages are being built. I suppose we could also just use the system set to identify such packages, but that wouldn't provide as much granularity.
Comment 8 Zac Medico gentoo-dev 2009-01-29 00:40:46 UTC
I don't think a new RESTRICT value is really necessary. Since the system set should work pretty well as an indicator, so I'll go ahead and use that.
Comment 9 Zac Medico gentoo-dev 2009-02-02 06:12:35 UTC
This is fixed in svn r12569.
Comment 10 Ciaran McCreesh 2009-02-03 20:06:23 UTC
Or you could do --jobs properly, by installing via binary packages, as you've been told is necessary for correctness several times before. Adding in more workarounds doesn't fix the underlying issue.
Comment 11 Zac Medico gentoo-dev 2009-02-03 21:26:56 UTC
The "underlying issue" doesn't apply to all packages. It would be better to introduce a new RESTRICT value than to treat all packages identically.
Comment 12 Ciaran McCreesh 2009-02-03 21:28:38 UTC
You have no idea which packages are and aren't affected. This bug is a perfect example of one of the many things you didn't think of. Why not just do it properly in a way that's guaranteed not to introduce new breakages?
Comment 13 Zac Medico gentoo-dev 2009-03-10 09:28:05 UTC
This is fixed in 2.2_rc24 which is in package.mask. I'll close this bug when it's also released in 2.1.6.8.
Comment 14 Zac Medico gentoo-dev 2009-03-13 20:42:18 UTC
This is released in 2.1.6.8.
Comment 15 Larry the Git Cow gentoo-dev 2024-02-27 03:12:56 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/proj/portage.git/commit/?id=0896ede9663d1ffb10434ee163205e7d9a909667

commit 0896ede9663d1ffb10434ee163205e7d9a909667
Author:     Zac Medico <zmedico@gentoo.org>
AuthorDate: 2024-02-26 00:12:13 +0000
Commit:     Zac Medico <zmedico@gentoo.org>
CommitDate: 2024-02-27 02:52:19 +0000

    Scheduler: Support parallel-install with merge-wait
    
    For system packages, always serialize install regardless of
    parallel-install, in order to mitigate failures triggered
    by fragile states as in bug 256616. For other packages,
    continue to populate self._task_queues.merge, which will
    serialize install unless parallel-install is enabled.
    
    Fixes: 825db01b91a3 ("Add merge-wait FEATURES setting enabled by default")
    Bug: https://bugs.gentoo.org/256616
    Bug: https://bugs.gentoo.org/925213
    Signed-off-by: Zac Medico <zmedico@gentoo.org>

 lib/_emerge/PackageMerge.py |  4 ++--
 lib/_emerge/Scheduler.py    | 44 +++++++++++++++++++++++++++++++++-----------
 man/make.conf.5             |  9 ++++++---
 3 files changed, 41 insertions(+), 16 deletions(-)