(i looked for a DUPLICATE but didn't find one) ... so here's the story-- without giving it much thought, i was going to upgrade bash, but somewhat absent-mindedly i did a '# emerge unmerge bash' beforehand and i'm sure i don't need to tell you that it screwed the pooch. granted it was my own fault but i'm thinking that portage should incorporate some intelligence to know that some ports (regardless of version) should never, under any circumstances, be unmerged because they are common to all archs and so forth. bash is one of them. without bash, you can't compile, vipw fails (can't change a user's shell), etc etc. turns into a minor nightmare.
carpaski: checking dependencies when unmerging should prevent this right?
Would it be possible to solve this by preventing portage from unmerging anything recorded in the system profile? (As in, emerge system...) A check for that shouldn't be too hard to do, but it's probably beyond me :-(
Created attachment 17835 [details, diff] The patch This patch matches the package to be unmerged with the simple items in the system profile. It gives the user an extended warning. It doesn't yet match >portage-2.0.25 to portage-2.0.49-r3 (there isn't a function to do this in portage.py easily, or at least that I could find)
*** Bug 33521 has been marked as a duplicate of this bug. ***
another option is creating a binary package of critical packages (eg glibc, gcc, bash, portage...) and then if you bork something boot onto the livecd, extract the package into / and reboot
Added the warning in. :)
Bug has been fixed and released in stable portages on or before 2.0.51-r2