Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[TIP] de-emergere tot pacchetti in base a una keyword
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Forum italiano (Italian) Risorse italiane (documentazione e tools)
View previous topic :: View next topic  
Author Message
FonderiaDigitale
Veteran
Veteran


Joined: 06 Nov 2003
Posts: 1710
Location: Rome, Italy

PostPosted: Wed Apr 14, 2004 12:35 am    Post subject: [TIP] de-emergere tot pacchetti in base a una keyword Reply with quote

14.4.04 : inserito nelle faq di gentoo-italia.org :)

attimo di noia... ne approfitto per postare questo piccolo snippetino che uso per togliere dai miei sistemi pacchetti in base a una determinata wildmask.

Dovete avere installato
Code:
app-portage/gentoolkit
per farlo funzionare (cosa che in ogni caso caldamente consiglio).

Code:
#!/bin/bash
for a in `qpkg -nc -I -v "$1"|cut -d ' ' -f1`
do
        lista="$lista $a"
done
if [ -n "$lista" ]
then
        emerge -C -av $lista
else
        echo "Spiacente, non esiste nessun pacchetto installato che corrisponda a \"$1\"."
fi

Code:
chmod u+x unmergebymask

Lo scriptiello lo potete invocare con un parametro, ad es.
Code:
./unmergebymask synce

Risultato (sul mio portatile):
Code:
goliath root $ /usr/local/scripts/portage/unmergemask synce
 
>>> These are the packages that I would unmerge:
 
 app-pda/synce-trayicon
    selected: 0.8
   protected: none
     omitted: none
 
 app-pda/synce-dccm
    selected: 0.8.9
   protected: none
     omitted: none
 
 app-pda/synce-serial
    selected: 0.8.9
   protected: none
     omitted: none
 
 app-pda/synce-librapi2
    selected: 0.8.9
   protected: none
     omitted: none
 
 app-pda/synce-libsynce
    selected: 0.8.9
   protected: none
     omitted: none
 
 app-pda/synce-gnomevfs
    selected: 0.8
   protected: none
     omitted: none
 
>>> 'Selected' packages are slated for removal.
>>> 'Protected' and 'omitted' packages will not be removed.
 
Do you want me to unmerge these packages? [Yes/No]

Lo script vi chiede conferma prima di togliere pacchetti dal sistema (onde evitare di distruggere cose importanti).

Buon lavoro ragazzi.
_________________
Come disse un amico, i sistemisti sono un po' come gli artigiani per l'informatica :)


Last edited by FonderiaDigitale on Thu Apr 15, 2004 4:34 am; edited 1 time in total
Back to top
View user's profile Send private message
fedeliallalinea
Bodhisattva
Bodhisattva


Joined: 08 Mar 2003
Posts: 13200
Location: here

PostPosted: Wed Apr 14, 2004 7:37 am    Post subject: Reply with quote

Ottimo tip FonderiaDigitale.
_________________
"aspetto un'emozione sempre più indefinibile"
- CCCP -
"la libertà un doveroso pericolo in verità"
- PGR -
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Forum italiano (Italian) Risorse italiane (documentazione e tools) 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