Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
How to re-emerge packages based on new USE flags?
View unanswered posts
View posts from last 24 hours

Goto page Previous  1, 2  
Reply to topic    Gentoo Forums Forum Index Duplicate Threads
View previous topic :: View next topic  
Author Message
hitman200ca
Tux's lil' helper
Tux's lil' helper


Joined: 02 Oct 2002
Posts: 110
Location: Canada

PostPosted: Wed Jun 09, 2004 6:16 pm    Post subject: Reply with quote

Slightly different than above.
A useful root script to have lying around.

checkuse.sh - finds all packages that have outdates use flags
or all packages the have a specific outdated use flag (as given
on command line)
Code:
#!/bin/sh

for foo in `qpkg -I -nc -v`
do
  if etcat -u =$foo | grep -iq " + - $1\| - + $1"; then
    etcat -u =$foo
  fi
done


Prints out all of the etcat's when no command line arg is given
and if you provide the use flag you are looking for it will show
only those

Code:
StormCloud root # ./checkuse.sh kde
[ Colour Code : set unset ]
[ Legend   : (U) Col 1 - Current USE flags        ]
[          : (I) Col 2 - Installed With USE flags ]

 U I [ Found these USE variables in : dev-java/sun-jdk-1.4.2.04 ]
 - - doc     : Adds extra documentation (API, Javadoc, etc)
 + + gnome   : Adds GNOME support
 - + kde     : Adds support for kde-base/kde (K Desktop Enviroment)
 + + mozilla : Adds mozilla support

_________________
"Against stupidity, the Gods themselves contend in vain."
-- Friedrich von Schiller
Back to top
View user's profile Send private message
PiotrBanasik
n00b
n00b


Joined: 26 Aug 2004
Posts: 8
Location: Burnaby, BC

PostPosted: Wed Sep 01, 2004 5:51 pm    Post subject: Reply with quote

Here is a script I ended up making for my purposes that does this ...
Code:
#!/bin/sh

MATCH=;
echo -n "Calculating Dependancies ";
for a in $(qpkg -I -nc); do
        equery -C uses $a | grep -q -e '^ - +' -e '^ + -' && {
                echo -n "+";
                MATCH="${MATCH} $a";
        } || {
                echo -n ".";
        };
done;
emerge -va ${MATCH};


any feedback is welcome
Back to top
View user's profile Send private message
Gatak
Apprentice
Apprentice


Joined: 04 Jan 2004
Posts: 174

PostPosted: Thu Sep 02, 2004 8:44 am    Post subject: Reply with quote

Nice script. It would be nice if it printed the current package it was equerying.
Code:
#!/bin/sh

MATCH=;
echo "Calculating Dependancies ";
for a in $(qpkg -I -nc); do
        equery -C uses $a | grep -q -e '^ - +' -e '^ + -' && {
                echo $a " +";
                MATCH="${MATCH} $a";
        } || {
                echo $a;
        };
done;
emerge -va ${MATCH};


Last edited by Gatak on Thu Sep 02, 2004 9:15 am; edited 2 times in total
Back to top
View user's profile Send private message
rinnan
Tux's lil' helper
Tux's lil' helper


Joined: 24 May 2003
Posts: 138
Location: Honolulu, Hawai`i

PostPosted: Thu Sep 02, 2004 9:07 am    Post subject: eflagsync Reply with quote

Wrote this a while ago... called it "eflagsync"... put this into a file called "eflagsync" and make it executable... then just run it. It will produce a pretty report of just what packages have had flags change on them since they were installed and what those new flags are.

Code:
#!/bin/bash
for a in `qpkg -I -nc` ; do etcat uses $a ; done | egrep "\-\ \+"\|"\+\ \-"\|"Found" | egrep --before-context=1 "\-\ \+"\|"\+\ \-"
Back to top
View user's profile Send private message
kallamej
Administrator
Administrator


Joined: 27 Jun 2003
Posts: 4975
Location: Gothenburg, Sweden

PostPosted: Tue Sep 28, 2004 4:58 pm    Post subject: Reply with quote

Moved from Portage & Programming in favour of https://forums.gentoo.org/viewtopic.php?t=229453
_________________
Please read our FAQ Forum, it answers many of your questions.
irc: #gentoo-forums on irc.libera.chat
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Duplicate Threads All times are GMT
Goto page Previous  1, 2
Page 2 of 2

 
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