Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
emerge simplified
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message
vm63310
n00b
n00b


Joined: 06 Mar 2003
Posts: 6

PostPosted: Mon Jan 05, 2004 1:43 pm    Post subject: emerge simplified Reply with quote

I searched a lot for this information and didn't find anything useful so I did a research of my own. The problem was that I like to keep my system as bleeding-edge as possible but still I want to have the choice *not* to update some packages (kernel for example)

Here's what I do nowadays when I want to do world update.

1. emerge sync
2. emerge -Up world > updates.txt
3. $EDITOR updates.txt

Ok, now edit updates.txt file to include rows like the below ones:

Code:
[ebuild     U ] sys-apps/modutils-2.4.26 [2.4.24]
[ebuild     U ] sys-apps/module-init-tools-0.9.15_pre4 [0.9.14]
[ebuild  N    ] sys-apps/fbset-2.1 
[ebuild  N    ] sys-libs/libtermcap-compat-2.0.8 
[ebuild  N    ] sys-apps/help2man-1.29 
[ebuild     U ] sys-apps/coreutils-5.0.91-r3 [5.0.91-r1]
[ebuild  N    ] media-sound/alsa-driver-1.0.0_rc2 

Ok, I see that Portage is trying to install fbset-2.1 which is totally obsolete because I don't even have framebuffer support in my kernel. Anyhow, now delete rows so that only the packages you wan't to update remain. Mine looks like:

Code:
[ebuild     U ] sys-apps/modutils-2.4.26 [2.4.24]
[ebuild     U ] sys-apps/module-init-tools-0.9.15_pre4 [0.9.14]
[ebuild     U ] sys-apps/coreutils-5.0.91-r3 [5.0.91-r1]


Now copy-paste this code and save it to emerge-wrapper and chmod u+x it.

Code:
#!/bin/sh
for i in `awk '{print $4}' - |sed -e 's/^/=/'`;
do emerge $i --nodeps;
done


And the final part is to

4. emerge-wrapper < updates.txt

This little script goes through every line of updates.txt and install that package into system.

Note that I wrote that script in 2 minutes and it can contain bugs which may harm your system. It doesn't take care of any dependecies either so.. just beware

--
Wellu
Back to top
View user's profile Send private message
DiskBreaker
Apprentice
Apprentice


Joined: 07 Oct 2003
Posts: 224

PostPosted: Mon Jan 05, 2004 2:52 pm    Post subject: Reply with quote

Works nicely :wink:

For a little more sophisticated script, check out femerge: https://forums.gentoo.org/viewtopic.php?t=45827
Back to top
View user's profile Send private message
alikht
n00b
n00b


Joined: 13 Dec 2003
Posts: 9
Location: Vancouver, BC

PostPosted: Fri Jan 23, 2004 11:06 pm    Post subject: Reply with quote

To update absolutely everything:
Code:

qpkg -I -nc | xargs emerge -puv
qpkg -I -nc | xargs emerge -uv

Note! Second command will overwrite your world file (every installed package will be added to it).

Edit: you need gentoolkit package for qpkg.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks All times are GMT
Page 1 of 1

 
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