Gentoo Archives: gentoo-amd64

From: Duncan <1i5t5.duncan@×××.net>
To: gentoo-amd64@l.g.o
Subject: [gentoo-amd64] Re: Re: Re: Re: libungif and giflib conflict.
Date: Wed, 02 Nov 2005 23:12:50
Message-Id: pan.2005.11.02.23.07.32.324733@cox.net
In Reply to: Re: [gentoo-amd64] Re: Re: Re: libungif and giflib conflict. by Harm Geerts
Harm Geerts posted <200511022259.51970.harmgeerts@××××.nl>, excerpted
below,  on Wed, 02 Nov 2005 22:59:51 +0100:

> On Wednesday 02 November 2005 21:54, Duncan wrote: >> Hmm... That --noreplace is a new one on me. I normally simply >> >> echo <category/pkg> >> /var/lib/portage/world >> >> Newer versions of portage (don't believe it's in stable portage yet) even >> have an emaint command that removes the bad lines for you. > > So did I, but now the warning `emerge depclean` produces tells me I can use > this. I find this rather nice as it is a lot safer and keeps the world file > free from user errors. For example replacing >> with > would be the most > destructive user error :P > I have portage 2.0.53_rc7 installed and I'm not sure which version introduced > --noreplace so it might not be available for everyone yet.
I'm still on rc6, so I guess I need to sync and emerge -uD world. However, it's probably in rc6 too, only I didn't notice it in the warning (<sheepish> as I don't read it as I know what the warning is about... only they added something! </sheepish>). Not here, forgetting the second > in >> wouldn't be destructive! I think this hint was featured in GWN a while back (yes, it was, comments are good things! =8^): -- snip -- # Based on a tips & tricks GWN feature. # Makes redirection to an existing file an error. # Use >> instead of > to append, or >| if overwriting is desired. set -o noclobber -- snip -- Put that in your .bashrc or whatever (my /etc/profile and .bashrc and all that are rather seriously customized, here, it's a file called noclobber.sh in /etc/profile.d/, but my bashrcs and profiles source everything in /etc/profile.d/ so it's added to them). That way, using > to redirect to an existing file produces an error saying it already exists. The comment gives the solution, use >> to append, or use >| to force-overwrite the file. So... "echo whatever > /var/lib/portage/world" would NOT "be the end of my world" here! (double entendre/entente) -- Duncan - List replies preferred. No HTML msgs. "Every nonfree program has a lord, a master -- and if you use the program, he is your master." Richard Stallman in http://www.linuxdevcenter.com/pub/a/linux/2004/12/22/rms_interview.html -- gentoo-amd64@g.o mailing list