# emerge -p bash These are the packages that would be merged, in order: Calculating dependencies... done! [ebuild R ] app-shells/bash-4.2_p53:4.2::gentoo [4.2_p53:0::gentoo] USE="net nls readline -afs -mem-scramble -static% (-bashlogger%) (-examples%) (-plugins%) (-vanilla%)" 0 KiB Total: 1 package (1 reinstall), Size of downloads: 0 KiB Yes, I did notice that it was changing from slot 0 to slot 4.2. But the reinstall fails spectacularly: >>> Installing (1 of 1) app-shells/bash-4.2_p53::gentoo * checking 13 files for package collisions >>> Merging app-shells/bash-4.2_p53 to / --- /usr/ --- /usr/share/ --- /usr/share/info/ >>> /usr/share/info/bash-4.2.info.bz2 >>> /usr/share/info/bashref-4.2.info.bz2 -> bash-4.2.info.bz2 --- /usr/share/doc/ --- /usr/share/doc/bash-4.2_p53/ >>> /usr/share/doc/bash-4.2_p53/INTRO.bz2 >>> /usr/share/doc/bash-4.2_p53/FAQ.bz2 >>> /usr/share/doc/bash-4.2_p53/NEWS.bz2 >>> /usr/share/doc/bash-4.2_p53/COMPAT.bz2 >>> /usr/share/doc/bash-4.2_p53/README.bz2 >>> /usr/share/doc/bash-4.2_p53/Y2K.bz2 >>> /usr/share/doc/bash-4.2_p53/CHANGES.bz2 >>> /usr/share/doc/bash-4.2_p53/AUTHORS.bz2 --- /usr/share/man/ --- /usr/share/man/man1/ >>> /usr/share/man/man1/builtins-4.2.1.bz2 >>> /usr/share/man/man1/bash-4.2.1.bz2 --- /bin/ >>> /bin/bash-4.2 >>> Safely unmerging already-installed instance... No package files given... Grabbing a set. <<< obj /usr/share/man/man1/rbash.1.bz2 <<< obj /usr/share/man/man1/builtins.1.bz2 <<< obj /usr/share/man/man1/bashbug.1.bz2 <<< obj /usr/share/man/man1/bash.1.bz2 --- replaced dir /usr/share/man/man1 --- replaced dir /usr/share/man <<< obj /usr/share/locale/ru/LC_MESSAGES/bash.mo <<< sym /usr/share/info/bashref.info.bz2 <<< obj /usr/share/info/bash.info.bz2 --- replaced dir /usr/share/info --- replaced obj /usr/share/doc/bash-4.2_p53/Y2K.bz2 --- replaced obj /usr/share/doc/bash-4.2_p53/README.bz2 --- replaced obj /usr/share/doc/bash-4.2_p53/NEWS.bz2 --- replaced obj /usr/share/doc/bash-4.2_p53/INTRO.bz2 --- replaced obj /usr/share/doc/bash-4.2_p53/FAQ.bz2 --- replaced obj /usr/share/doc/bash-4.2_p53/COMPAT.bz2 --- replaced obj /usr/share/doc/bash-4.2_p53/CHANGES.bz2 --- replaced obj /usr/share/doc/bash-4.2_p53/AUTHORS.bz2 --- replaced dir /usr/share/doc/bash-4.2_p53 --- replaced dir /usr/share/doc --- replaced dir /usr/share <<< obj /usr/bin/bashbug --- replaced dir /usr <<< obj /etc/skel/.bashrc <<< obj /etc/skel/.bash_profile <<< obj /etc/skel/.bash_logout <<< obj /etc/bash/bashrc <<< obj /etc/bash/bash_logout <<< sym /bin/rbash <<< obj /bin/bash --- replaced dir /bin --- !empty dir /usr/share/locale/ru/LC_MESSAGES --- !empty dir /usr/share/locale/ru --- !empty dir /usr/share/locale --- !empty dir /usr/bin --- !empty dir /etc/skel <<< dir /etc/bash --- !empty dir /etc [Errno 2] No such file or directory: '/bin/bash': /bin/bash -c /usr/lib/portage/python3.3/ebuild.sh postrm Traceback (most recent call last): File "/usr/lib64/python3.3/site-packages/portage/process.py", line 317, in spawn unshare_net, unshare_ipc, cgroup) File "/usr/lib64/python3.3/site-packages/portage/process.py", line 515, in _exec os.execve(binary, myargs, env) File "/usr/lib64/python3.3/site-packages/portage/__init__.py", line 259, in __call__ rval = self._func(*wrapped_args, **wrapped_kwargs) FileNotFoundError: [Errno 2] No such file or directory: '/bin/bash' * The ebuild phase 'postrm' has exited unexpectedly. This type of behavior * is known to be triggered by things such as failed variable assignments * (bug #190128) or bad substitution errors (bug #200313). Normally, before * exiting, bash should have displayed an error message above. If bash did * not produce an error message above, it's possible that the ebuild has * called `exit` when it should have called `die` instead. This behavior * may also be triggered by a corrupt bash binary or a hardware problem * such as memory or cpu malfunction. If the problem is not reproducible or * it appears to occur randomly, then it is likely to be triggered by a * hardware problem. If you suspect a hardware problem then you should try * some basic hardware diagnostics such as memtest. Please do not report * this as a bug unless it is consistently reproducible and you are sure * that your bash binary and hardware are functioning properly. sandbox:spawn_shell failed to exec child: No such file or directory * The ebuild phase 'die_hooks' has exited unexpectedly. This type of * behavior is known to be triggered by things such as failed variable * assignments (bug #190128) or bad substitution errors (bug #200313). * Normally, before exiting, bash should have displayed an error message * above. If bash did not produce an error message above, it's possible * that the ebuild has called `exit` when it should have called `die` * instead. This behavior may also be triggered by a corrupt bash binary or * a hardware problem such as memory or cpu malfunction. If the problem is * not reproducible or it appears to occur randomly, then it is likely to * be triggered by a hardware problem. If you suspect a hardware problem * then you should try some basic hardware diagnostics such as memtest. * Please do not report this as a bug unless it is consistently * reproducible and you are sure that your bash binary and hardware are * functioning properly. !!! FAILED postrm: 1 * The 'postrm' phase of the 'app-shells/bash-4.2_p53' package has failed * with exit value 1. * * The problem occurred while executing the ebuild file named * 'bash-4.2_p53.ebuild' located in the '/var/db/pkg/app- * shells/bash-4.2_p53' directory. If necessary, manually remove the * environment.bz2 file and/or the ebuild file located in that directory. * * Removal of the environment.bz2 file is preferred since it may allow the * removal phases to execute successfully. The ebuild will be sourced and * the eclasses from the current portage tree will be used when necessary. * Removal of the ebuild file will cause the pkg_prerm() and pkg_postrm() * removal phases to be skipped entirely. >>> Regenerating /etc/ld.so.cache... >>> Original instance of package unmerged safely. [Errno 2] No such file or directory: '/bin/bash': /bin/bash -c /usr/lib/portage/python3.3/ebuild.sh postinst Traceback (most recent call last): File "/usr/lib64/python3.3/site-packages/portage/process.py", line 317, in spawn unshare_net, unshare_ipc, cgroup) File "/usr/lib64/python3.3/site-packages/portage/process.py", line 515, in _exec os.execve(binary, myargs, env) File "/usr/lib64/python3.3/site-packages/portage/__init__.py", line 259, in __call__ rval = self._func(*wrapped_args, **wrapped_kwargs) FileNotFoundError: [Errno 2] No such file or directory: '/bin/bash' * The ebuild phase 'postinst' has exited unexpectedly. This type of * behavior is known to be triggered by things such as failed variable * assignments (bug #190128) or bad substitution errors (bug #200313). * Normally, before exiting, bash should have displayed an error message * above. If bash did not produce an error message above, it's possible * that the ebuild has called `exit` when it should have called `die` * instead. This behavior may also be triggered by a corrupt bash binary or * a hardware problem such as memory or cpu malfunction. If the problem is * not reproducible or it appears to occur randomly, then it is likely to * be triggered by a hardware problem. If you suspect a hardware problem * then you should try some basic hardware diagnostics such as memtest. * Please do not report this as a bug unless it is consistently * reproducible and you are sure that your bash binary and hardware are * functioning properly. sandbox:spawn_shell failed to exec child: No such file or directory * The ebuild phase 'die_hooks' has exited unexpectedly. This type of * behavior is known to be triggered by things such as failed variable * assignments (bug #190128) or bad substitution errors (bug #200313). * Normally, before exiting, bash should have displayed an error message * above. If bash did not produce an error message above, it's possible * that the ebuild has called `exit` when it should have called `die` * instead. This behavior may also be triggered by a corrupt bash binary or * a hardware problem such as memory or cpu malfunction. If the problem is * not reproducible or it appears to occur randomly, then it is likely to * be triggered by a hardware problem. If you suspect a hardware problem * then you should try some basic hardware diagnostics such as memtest. * Please do not report this as a bug unless it is consistently * reproducible and you are sure that your bash binary and hardware are * functioning properly. * FAILED postinst: 1 sandbox:spawn_shell failed to exec child: No such file or directory * The ebuild phase 'other' has exited unexpectedly. This type of behavior * is known to be triggered by things such as failed variable assignments * (bug #190128) or bad substitution errors (bug #200313). Normally, before * exiting, bash should have displayed an error message above. If bash did * not produce an error message above, it's possible that the ebuild has * called `exit` when it should have called `die` instead. This behavior * may also be triggered by a corrupt bash binary or a hardware problem * such as memory or cpu malfunction. If the problem is not reproducible or * it appears to occur randomly, then it is likely to be triggered by a * hardware problem. If you suspect a hardware problem then you should try * some basic hardware diagnostics such as memtest. Please do not report * this as a bug unless it is consistently reproducible and you are sure * that your bash binary and hardware are functioning properly. [Errno 2] No such file or directory: '/bin/bash': /bin/bash -c /usr/lib/portage/python3.3/ebuild.sh clean Traceback (most recent call last): File "/usr/lib64/python3.3/site-packages/portage/process.py", line 317, in spawn unshare_net, unshare_ipc, cgroup) File "/usr/lib64/python3.3/site-packages/portage/process.py", line 515, in _exec os.execve(binary, myargs, env) File "/usr/lib64/python3.3/site-packages/portage/__init__.py", line 259, in __call__ rval = self._func(*wrapped_args, **wrapped_kwargs) FileNotFoundError: [Errno 2] No such file or directory: '/bin/bash' sandbox:spawn_shell failed to exec child: No such file or directory * The ebuild phase 'die_hooks' has exited unexpectedly. This type of * behavior is known to be triggered by things such as failed variable * assignments (bug #190128) or bad substitution errors (bug #200313). * Normally, before exiting, bash should have displayed an error message * above. If bash did not produce an error message above, it's possible * that the ebuild has called `exit` when it should have called `die` * instead. This behavior may also be triggered by a corrupt bash binary or * a hardware problem such as memory or cpu malfunction. If the problem is * not reproducible or it appears to occur randomly, then it is likely to * be triggered by a hardware problem. If you suspect a hardware problem * then you should try some basic hardware diagnostics such as memtest. * Please do not report this as a bug unless it is consistently * reproducible and you are sure that your bash binary and hardware are * functioning properly. >>> Failed to execute postinst for app-shells/bash-4.2_p53, Log file:
this is why you are supposed to use emerge -uDN @world
Same problem. DOESN'T WORK (from a different machine)! # emerge -DNu world These are the packages that would be merged, in order: Calculating dependencies... done! [ebuild R ] app-shells/bash-4.2_p53:4.2::gentoo [4.2_p53:0::gentoo] USE="net nls readline -afs -mem-scramble -static% (-bashlogger%) (-examples%) (-plugins%) (-vanilla%)" 0 KiB Total: 1 package (1 reinstall), Size of downloads: 0 KiB [...] continues as before
you can recover your system by adding a symlink from /bin/sh to bash-4.2 and then installing the bash:0 SLOT we probably should have @system depend on bash:0 explicitly rather than just any SLOT of bash
should be addressed by: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=08b8ef91bcf9037a6f550ce4e2e7c524a6be17c1