Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Killed my coreutils -- HELP
View unanswered posts
View posts from last 24 hours

Goto page Previous  1, 2, 3, 4, 5  
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
devsk
Advocate
Advocate


Joined: 24 Oct 2003
Posts: 2995
Location: Bay Area, CA

PostPosted: Sat May 31, 2008 7:48 pm    Post subject: Reply with quote

Do you ever wonder why portage allows unmerging of programs (say python, coreutils, bash etc.) which it needs to run itself? It should not directly (i.e. from the command line) allow to unmerge packages that it needs for its operation, which I think is a small subset of 'system'. A warning is not enough. It JUST shouldn't be allowed.

If unmerge support for those packages is needed for some corner cases, it should be allowed only with a --force-i_am_elite_let_me_shoot_myself flag.
Back to top
View user's profile Send private message
GlenCollins
n00b
n00b


Joined: 11 Apr 2006
Posts: 53
Location: Australia

PostPosted: Mon Jun 02, 2008 1:16 pm    Post subject: Reply with quote

Just noted there's a lot of posts in here but not enough thanks for desultory for his excellent post.

This post (and some after) helped me a great deal. Although I had to create $PKDIR directory, even in the default location as it didn't exist (Gentoo manual still helpful to this day :-))

I had one more weird thing, when rebooting I had
Code:
/bin/mktemp: No such file or directory
and depscan.sh errors. This was when any init.d scripts tried to be run (e.g. net.eth0!), but emerge of coreutils (although already done as per desultory's instructions) solved this.

Thanks again desultory.
Back to top
View user's profile Send private message
audiodef
Watchman
Watchman


Joined: 06 Jul 2005
Posts: 6639
Location: The soundosphere

PostPosted: Fri Jul 25, 2008 1:00 pm    Post subject: Try upgrading blocking packages Reply with quote

If you run into blocked packages, try syncing and updating the blocking package first. I had a similar block issue when migrating to openrc. udev got in the way, and after updating udev it went smoothly.
_________________
decibel Linux: https://decibellinux.org
Github: https://github.com/Gentoo-Music-and-Audio-Technology
Facebook: https://www.facebook.com/decibellinux
Discord: https://discord.gg/73XV24dNPN
Back to top
View user's profile Send private message
gforum
Tux's lil' helper
Tux's lil' helper


Joined: 31 Mar 2008
Posts: 140

PostPosted: Sun Jul 27, 2008 4:10 am    Post subject: Reply with quote

i had the same issue and fixed it through getting the bin and untaring it.
but maybe i didnt really get things strait, so i ask.
->
is now mktemp a part of coreutils?
as in... this issue is fixed?

cause im running fine without it i believe, all i got is coreutils. or so it seems...
Back to top
View user's profile Send private message
desultory
Bodhisattva
Bodhisattva


Joined: 04 Nov 2005
Posts: 9410

PostPosted: Sun Jul 27, 2008 5:05 am    Post subject: Reply with quote

gforum wrote:
is now mktemp a part of coreutils?
Yes.
gforum wrote:
as in... this issue is fixed?
It was only broken in the sense of not being properly documented before it propagated to users, as such it is now fixed.
Back to top
View user's profile Send private message
rogerx
Tux's lil' helper
Tux's lil' helper


Joined: 06 Apr 2004
Posts: 118

PostPosted: Fri Dec 26, 2008 1:25 am    Post subject: Reply with quote

You can easily fix an unmerged coreutils by rebooting with the install or minimal cd.

Obtain a binary built coreutils (either from your system if you build binaries -- set in make.conf or from the stage tarballs)

Mount your system on /mnt/gentoo

Simply untar coreutils designating from the root folder of your system (/mnt/gentoo) or by using the tar directory flag.

Reboot and everything should work again. It would be wise at this point to re-emerge coreutils as manually doing the above does not record into world.
_________________
Roger
http://rogerx.freeshell.org/
Back to top
View user's profile Send private message
Captain Newbie
Apprentice
Apprentice


Joined: 22 Dec 2006
Posts: 182
Location: Socal

PostPosted: Fri Dec 26, 2008 7:15 am    Post subject: Reply with quote

devsk wrote:
Do you ever wonder why portage allows unmerging of programs (say python, coreutils, bash etc.) which it needs to run itself? It should not directly (i.e. from the command line) allow to unmerge packages that it needs for its operation, which I think is a small subset of 'system'. A warning is not enough. It JUST shouldn't be allowed

Saying that the operator doesn't know best is a bad idea, even if the operator doesn't know best. :roll:

While falling on one's sword with emerge -C sucks, it's almost always a good learning experience (if only for What Not To Do). Unmerging Python can be perfectly valid (i.e. upgrading 2.4->2.5)...
Quote:
If unmerge support for those packages is needed for some corner cases, it should be allowed only with a --force-i_am_elite_let_me_shoot_myself flag.

There is already one - I_KNOW_WHAT_I_AM_DOING (set in the developer profiles) - although I don't think it's designed to prevent (or permit) emerge -C coreutils. And besides...some users, thinking they're $DEITY, enable it anyway, thereby defeating the purpose of having it.
_________________
/* Nobody will ever see this message :-) */
panic("Cannot initialize video hardware\n");
"As much as it pains me, we hope that developers know what they're doing." - wolf31o2
Back to top
View user's profile Send private message
desultory
Bodhisattva
Bodhisattva


Joined: 04 Nov 2005
Posts: 9410

PostPosted: Fri Dec 26, 2008 8:16 am    Post subject: Reply with quote

Captain Newbie wrote:
There is already one - I_KNOW_WHAT_I_AM_DOING (set in the developer profiles) - although I don't think it's designed to prevent (or permit) emerge -C coreutils.
Indeed, it mostly reduces warning messages.
Back to top
View user's profile Send private message
rogerx
Tux's lil' helper
Tux's lil' helper


Joined: 06 Apr 2004
Posts: 118

PostPosted: Fri Dec 26, 2008 9:21 am    Post subject: Reply with quote

Yea. Gotta luv that 5 second warning after typing "emerge -C coreutils"!!!

In order to remove Portage's depends, should be a "--force" switch & the warning (w/o using --force switch) should state something like "In order to remove (coreutils), use the --force switch".

From here, if the admin always uses --force, it's his own d*rn fault!!


Other then this, I LOL @ the 5 second warning when typing "emerge -C coreutils". Absolutely hilarious!!
_________________
Roger
http://rogerx.freeshell.org/
Back to top
View user's profile Send private message
Captain Newbie
Apprentice
Apprentice


Joined: 22 Dec 2006
Posts: 182
Location: Socal

PostPosted: Fri Dec 26, 2008 5:15 pm    Post subject: Reply with quote

desultory wrote:
Indeed, it mostly reduces warning messages.

That's what I gathered.

For those of you who are asleep at the switch (it happens!) :
Code:
dwhitese@annika ~ $ emerge -pC coreutils

>>> These are the packages that would be unmerged:


!!! 'sys-apps/coreutils' is part of your system profile.
!!! Unmerging it may be damaging to your system.

...

I don't think it could possibly get any more clear than that - although it's probably a bit of an understatement, red text (if you're on a color terminal) and three '!'s is pretty clear.
_________________
/* Nobody will ever see this message :-) */
panic("Cannot initialize video hardware\n");
"As much as it pains me, we hope that developers know what they're doing." - wolf31o2
Back to top
View user's profile Send private message
rogerx
Tux's lil' helper
Tux's lil' helper


Joined: 06 Apr 2004
Posts: 118

PostPosted: Fri Dec 26, 2008 8:05 pm    Post subject: Reply with quote

Hey. Isn't the number one rule when programming, assume users are dumb? As such, a good program adheres and provides errors detection.

Whomever noted this lacking, is right.

Cpt Newbie, you are right about the warning is clear enough. But Portage should protect removing it's depends due to admin naiveness.
Good programming practices dictate this well.

One thing I noted concerning implementing such a (--force) switch, Portage needs to distinguish between an upgrade (-u) of it's depends and removal (-C). And, provide the appropriate level of deterrence before one of it's dependencies are removed.

Think this is fact, and a bug should be filed. However, I have no time to take up the programming project. :-)
_________________
Roger
http://rogerx.freeshell.org/
Back to top
View user's profile Send private message
Captain Newbie
Apprentice
Apprentice


Joined: 22 Dec 2006
Posts: 182
Location: Socal

PostPosted: Fri Dec 26, 2008 9:06 pm    Post subject: Reply with quote

rogerx wrote:
snip

The real problem isn't so much that Portage should halt and refuse to do stupid things, but developer-user communication with respect to changes to system software could be improved (c.f. also: e2fsprogs-libs/com_err/ss stuff, which ~arch portage will handle automagically but stable portage will not, for instance). mktemp being obsoleted is the same sort of thing (in my view, anyway).

I wonder if it's possible to have some kind of news printed out about --update world following a sync that would alert users to changes in the tree like this. To me, that's a far more acceptable solution than kludging up emerge with training wheels. Reasoning:
(1) Nobody in their right minds manually types emerge -C coreutils (or rm -rf / ... etc.) except when trying to negotiate around a blocking package. Protecting the system from insane people would require the complete removal of root privileges.
(2) Changes to the system set causing blocking packages/other nastiness could be mentioned post-sync.
(3) If I remember correctly, newer Portages (unstable or masked, as yet) have automated block resolution to begin with.
_________________
/* Nobody will ever see this message :-) */
panic("Cannot initialize video hardware\n");
"As much as it pains me, we hope that developers know what they're doing." - wolf31o2
Back to top
View user's profile Send private message
rogerx
Tux's lil' helper
Tux's lil' helper


Joined: 06 Apr 2004
Posts: 118

PostPosted: Fri Dec 26, 2008 10:33 pm    Post subject: Reply with quote

<shrugs> Bad things happen when a developer automatically assumes users know better! ;-)

Although I know better, I still did an emerge -C coreutils recently here. (Using ~arch portage, and maybe that's why I did it.) And, every now and then, I might get a nervous twitch on the carriage return key after typing "rm -rf ./*" and meant to type the additional keys to mean, "rm -rf ./*.log"

Good programs check for these obvious errors such as trying to remove Portage's depends. However, programs should still remain versatile in order not to hinder a user from performing tasks.

I do see you're point though (using rm -rf ./*). Many times we really do mean to type "rm -rf ./*", and we usually know better to "pwd" before typing. It would totally suck if "rm -rf ./*" popped-up a "Are You Sure?" gui click prompt! And, it would add additional bloat.

But, all in all, if Portage were my programing project, I would definitely protect my depends with an additional switch. But as you state, it would add too much bloat (and bloat == making code reading more difficult).
_________________
Roger
http://rogerx.freeshell.org/
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Goto page Previous  1, 2, 3, 4, 5
Page 5 of 5

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum