Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[TIP] dependencies "keywordisation" script ;-)
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
anigel
Bodhisattva
Bodhisattva


Joined: 14 Apr 2003
Posts: 1889
Location: Un petit bled pas loin de Limoges ;-)

PostPosted: Wed Oct 12, 2005 3:43 pm    Post subject: [TIP] dependencies "keywordisation" script ;-) Reply with quote

Original french post available here.

Here is a "tip", which will allow you to automatically ~arch all dependencies from a masked package. I'll show you the example for gnome, since this is the package I used for testing...

First of all, copy/paste the following lines in a new file, named x86deps.sh (for example), and chmod u+x it.

Code:
#!/bin/bash
#script de ~archage de dependances de paquets, par anigel (forum gentoo fr)

cp /etc/portage/package.keywords /etc/portage/package.keywords.backup
[ "$1" = "" ] && echo "syntaxe : x86deps.sh category/package" && exit 1

while [ $? != 0 ] ; do
   PKGNAME=`emerge $1 -pv | grep "masked by" | awk -F " " '{ print $2 }' | sed s/-[0-9].*//`
   echo "$PKGNAME ~x86"  | tee -a /etc/portage/package.keywords
   emerge $1 -pv &>/dev/null
done

emerge $1 -av


Then, you must add to your /etc/portage/package.keywords, the line corresponding to the package you want to ~arch. Following our example (gnome) :

Code:
echo "gnome-base/gnome ~x86" >> /etc/portage/package.keywords


In the end, you just have to launch the script, who will deal with all the deps. It can be quite long, depending on the number of deps. When it will ask you confirmation to launch the compilation process, take care ro your USE flags ;-) !

NB : You'll pay attention to the fast that the script takes care of your /etc/portage/package.keywords. But, be carefull : it makes a backup each time you run it, so a backup may overwrite the preceeding one ! Anyway you shouldn't get into troubles, since I never delete anything in this file : I just add lines. If you add any problems : just remove the lines my script added !
_________________
Il y a 10 sortes d'individus en ce bas-monde : ceux qui causent binaire, et les autres.
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