View previous topic :: View next topic |
Author |
Message |
fedeliallalinea Administrator


Joined: 08 Mar 2003 Posts: 31526 Location: here
|
Posted: Fri Oct 15, 2004 7:10 pm Post subject: [TOOL] addkeywords |
|
|
Questo tools permette di mettere tutti i file necessari per compilare un pacchetto ~x86 in /etc/portage/package.keywords cosi da evitare di usare ACCEPT_KEYWORDS= .
mrfree ecco qua
Code: | #!/bin/sh
function usage {
echo -e "\nUsage: addkeywords ~ARCH PACKAGE\n"
echo -e ""
exit 1
}
[ -z $1 ] && usage
[ -z $2 ] && usage
[ ! -s /etc/portage/package.keywords ] && echo "File /etc/portage/package.keywords not found!" && exit 1
LIST=`ACCEPT_KEYWORDS="$1" emerge --columns -p $2 | awk '/\// {print $4}'`
echo "" >> /etc/portage/package.keywords
echo "#Package for $2" >> /etc/portage/package.keywords
for PACKAGE in ${LIST}
do
echo "${PACKAGE} ~x86" >> /etc/portage/package.keywords
done
echo "" >> /etc/portage/package.keywords |
Per usarlo bisogna dare
Code: | # addkeywords ~ARCH PACKAGE |
esempio pratico
Code: | # addkeywords ~x86 gnome |
_________________ Questions are guaranteed in life; Answers aren't.
Last edited by fedeliallalinea on Sat Oct 16, 2004 2:11 pm; edited 1 time in total |
|
Back to top |
|
 |
mrfree Veteran


Joined: 15 Mar 2003 Posts: 1303 Location: Europe.Italy.Sulmona
|
Posted: Fri Oct 15, 2004 10:00 pm Post subject: |
|
|
Grande fedeli, thz
Proverò lo script appena possibile.
PS: prima o poi dovrò decidermi a diventare bashscript-autonomo  _________________ Please EU, pimp my country!
ICE: /etc/init.d/iptables panic |
|
Back to top |
|
 |
sorchino Apprentice


Joined: 08 Jul 2003 Posts: 242 Location: Bologna/Treno/Fano
|
Posted: Sat Oct 16, 2004 9:59 am Post subject: |
|
|
Ottimo fedeliallalinea in effetti in caso di gnome/kde/o simili è una vera palla aggiungere a mano pacchetto per pacchetto. _________________ "Colui al quale avete dato il nome di Gesu` in realta` non era che il capo di una banda di briganti i cui miracoli che gli attribuite non erano che manifestazioni operate secondo la magia e i trucchi esoterici." Celso. |
|
Back to top |
|
 |
fedeliallalinea Administrator


Joined: 08 Mar 2003 Posts: 31526 Location: here
|
Posted: Sat Oct 16, 2004 2:02 pm Post subject: |
|
|
Spero solo che funzioni a dovere visto che non ho fatto molti test _________________ Questions are guaranteed in life; Answers aren't. |
|
Back to top |
|
 |
fedeliallalinea Administrator


Joined: 08 Mar 2003 Posts: 31526 Location: here
|
Posted: Sat Oct 16, 2004 2:10 pm Post subject: |
|
|
Post splittatto da questo _________________ Questions are guaranteed in life; Answers aren't. |
|
Back to top |
|
 |
gutter Bodhisattva


Joined: 13 Mar 2004 Posts: 7162 Location: Aarau, Aargau, Switzerland
|
Posted: Sat Oct 16, 2004 2:18 pm Post subject: |
|
|
Una cosa utile  _________________ Registered as User #281564 and Machines #163761 |
|
Back to top |
|
 |
Raffo Veteran


Joined: 23 Apr 2004 Posts: 1019 Location: Berlin
|
Posted: Sat Oct 16, 2004 2:22 pm Post subject: |
|
|
io tempo fa mi sono creato uno script stupido che chiede se voglio installare un pacchetto stabile o masked ed inserisce la relativa key (se masked) in package.keywords...purtroppo date le mie limitate capacità è molto rozzo, ma funzionale  |
|
Back to top |
|
 |
xchris Advocate


Joined: 10 Jul 2003 Posts: 2824
|
Posted: Mon Oct 25, 2004 11:41 pm Post subject: |
|
|
non ci credo...
ne avevo appena fatto uno pure io...
mooolto grezzo ma funzionante.
utilizza pero' un approccio diverso (+ lento...decisamente)
Una volta smascherato a mano il primo file (ad es gnome) permette di scrivere correttamente i file package.keywords e package.unmask.
va bhe
amen
ciao _________________ while True:Gentoo() |
|
Back to top |
|
 |
fedeliallalinea Administrator


Joined: 08 Mar 2003 Posts: 31526 Location: here
|
Posted: Tue Oct 26, 2004 7:20 am Post subject: |
|
|
xchris wrote: | utilizza pero' un approccio diverso (+ lento...decisamente) |
Non vale la pena di postarlo comunque? _________________ Questions are guaranteed in life; Answers aren't. |
|
Back to top |
|
 |
xchris Advocate


Joined: 10 Jul 2003 Posts: 2824
|
Posted: Tue Oct 26, 2004 8:15 am Post subject: |
|
|
ok..script zorro.
Dato uno o piu' pacchetti da emerge (con,senza versione) prepara i file package.unmask e package.keyword
Grezzo e lento ma funzionante. (credo )
Code: |
#!/bin/bash
# ARCH -> x86 ppc sparc alpha hppa mips ia64 amd64
ARCH="x86"
#####################
HILITE="\033[1m"
NORMAL="\033[0m"
RED='\E[31;01m'
GREEN='\E[32;01m'
YELLOW='\E[33;01m'
#####################
[ $# -eq 0 ] && echo -e "\nSpecify one or more packages\n" && exit
source /sbin/functions.sh
DONE=1
echo && einfo "Please Wait...\n"
PRELIMINARY_CHECK=`emerge -p $* 2>&1 | grep "no ebuilds to satisfy"`
[ "$PRELIMINARY_CHECK" ] && echo && einfo "No ebuild found!" && echo && exit
[ ! -e "/etc/portage" ] && einfo "Creating /etc/portage directory\n" && { mkdir /etc/portage || { einfo "ERROR...Quiting" && exit ;} }
while [ $DONE ]
do
RESULT=`emerge -p $* 2>&1 | grep "(masked" | head -n 1`
if [ "$RESULT" ]
then
ACTION_STRING=
RESULT_FILTERED=`echo $RESULT | cut -d":" -f2`
KEYWORD_MASKED=`echo $RESULT | cut -d":" -f2 | grep "~"`
HARD_MASKED=`echo $RESULT | cut -d":" -f2 | grep "package.mask"`
MISSING_MASKED=`echo $RESULT | cut -d":" -f2 | grep "missing"`
CLEAN_NAME=`echo $RESULT | cut -d" " -f2 | sed -e 's/-[0-9]/*/g' | cut -d"*" -f1`
if [ "$HARD_MASKED" = "$RESULT_FILTERED" ]
then
echo "$CLEAN_NAME" >> /etc/portage/package.unmask
ACTION_STRING=$RED"[HARD]"$NORMAL
fi
if [ "$KEYWORD_MASKED" = "$RESULT_FILTERED" ]
then
echo "$CLEAN_NAME ~$ARCH" >> /etc/portage/package.keywords
ACTION_STRING=$ACTION_STRING$YELLOW"[KEYWORD]"$NORMAL
fi
if [ "$MISSING_MASKED" = "$RESULT_FILTERED" ]
then
echo && einfo "Package masked by missing keyword..Aborting" && echo
exit
fi
if [ ! "$ACTION_STRING" ]
then
echo && einfo "Don't know how to handle.. sorry!" && echo
exit
else
echo -e $GREEN"*$NORMAL $CLEAN_NAME "$ACTION_STRING
fi
else
echo && einfo "Your ebuild is emergeable!" && echo
DONE=
fi
done
|
bisogna editare la propria ARCH nel file..
esempio d'uso..
devo smascherare xfce4
./zorro =xfce-base/xfce4-4.1.90
Code: |
root@lyra root # ./zorro =xfce-base/xfce4-4.1.90
* Please Wait...
* xfce-base/xfce4 removed Hard Masking
* xfce-base/xfce4 removed Keyword masking
* xfce-extra/xfce4-taskbar removed Keyword masking
* xfce-base/xfce4-base removed Hard Masking
* xfce-base/xfce4-base removed Keyword masking
* xfce-extra/xfce4-iconbox removed Hard Masking
* xfce-extra/xfce4-iconbox removed Keyword masking
* xfce-base/xfce-mcs-manager removed Hard Masking
* xfce-base/xfce-mcs-manager removed Keyword masking
* xfce-base/libxfce4util removed Hard Masking
* xfce-base/libxfce4util removed Keyword masking
* xfce-base/libxfce4mcs removed Hard Masking
* xfce-base/libxfce4mcs removed Keyword masking
* xfce-base/libxfcegui4 removed Hard Masking
* xfce-base/libxfcegui4 removed Keyword masking
* xfce-extra/xfce4-systray removed Hard Masking
* xfce-extra/xfce4-systray removed Keyword masking
* xfce-base/xfce4-panel removed Hard Masking
* xfce-base/xfce4-panel removed Keyword masking
* xfce-base/xfce-utils removed Hard Masking
* xfce-base/xfce-utils removed Keyword masking
* dev-libs/dbh removed Keyword masking
* xfce-extra/xfce4-trigger-launcher removed Hard Masking
* xfce-extra/xfce4-trigger-launcher removed Keyword masking
* xfce-extra/xfwm4-themes removed Hard Masking
* xfce-extra/xfwm4-themes removed Keyword masking
* xfce-base/xfwm4 removed Hard Masking
* xfce-base/xfwm4 removed Keyword masking
* x11-themes/gtk-engines-xfce removed Keyword masking
* xfce-extra/xfce4-appfinder removed Hard Masking
* xfce-extra/xfce4-appfinder removed Keyword masking
* xfce-base/xffm removed Hard Masking
* xfce-base/xffm removed Keyword masking
* xfce-extra/xfcalendar removed Hard Masking
* xfce-extra/xfcalendar removed Keyword masking
* xfce-base/xfdesktop removed Hard Masking
* xfce-base/xfdesktop removed Keyword masking
* xfce-base/xfce-mcs-plugins removed Hard Masking
* xfce-base/xfce-mcs-plugins removed Keyword masking
* xfce-base/xfce4-session removed Hard Masking
* xfce-base/xfce4-session removed Keyword masking
* xfce-extra/xfce4-toys removed Hard Masking
* xfce-extra/xfce4-toys removed Keyword masking
* xfce-base/xfprint removed Hard Masking
* xfce-base/xfprint removed Keyword masking
* xfce-extra/xfce4-icon-theme removed Hard Masking
* xfce-extra/xfce4-icon-theme removed Keyword masking
* xfce-extra/xfce4-cpugraph removed Keyword masking
* xfce-extra/xfce4-windowlist removed Keyword masking
* Your ebuild is emergeable!
|
_________________ while True:Gentoo()
Last edited by xchris on Wed Oct 27, 2004 8:22 am; edited 1 time in total |
|
Back to top |
|
 |
fedeliallalinea Administrator


Joined: 08 Mar 2003 Posts: 31526 Location: here
|
Posted: Tue Oct 26, 2004 8:16 am Post subject: |
|
|
xchris wrote: | Dato uno o piu' pacchetti da emerge (con,senza versione) prepara i file package.unmask e package.keyword |
Vedi il tuo fa anche i pacchetti hard masked il mio no _________________ Questions are guaranteed in life; Answers aren't. |
|
Back to top |
|
 |
xchris Advocate


Joined: 10 Jul 2003 Posts: 2824
|
Posted: Tue Oct 26, 2004 8:20 am Post subject: |
|
|
si andrebbe comunque sistemato.. non fa un granche' di controlli.
Utilizza il metodo che si fa manualmente...
e' lento perche' richiama sempre emerge.. fino a quando non e' tutto smascherato...
ciao _________________ while True:Gentoo() |
|
Back to top |
|
 |
fedeliallalinea Administrator


Joined: 08 Mar 2003 Posts: 31526 Location: here
|
Posted: Tue Oct 26, 2004 8:22 am Post subject: |
|
|
E fare come faccio io, cioe' fare un ACCEPT_KEYWORDS e prendere quei pacchetti da mettere in package.keywords (addirittura ACCEPT piu' path cosi' dovrebbe anche funzionare per gli hard masked)? _________________ Questions are guaranteed in life; Answers aren't. |
|
Back to top |
|
 |
xchris Advocate


Joined: 10 Jul 2003 Posts: 2824
|
Posted: Tue Oct 26, 2004 8:25 am Post subject: |
|
|
credo...ma non vorrei dire cavolate..
che con un solo emerge non puoi farlo...
mi spiego..
se dai ACCEPT_KEYWORDS="~x86 -x86" per fare entrambi (forse basta l'ultimo...nn so) cmq ti mette tutte le ultime versioni in assoluto.
zorro tende a mettere il minimo indispensabile per farlo andare (cioe' la versione masked (hard o meno) + bassa)
Diciamo che cosi' e' come faccio io di solito...
ciao _________________ while True:Gentoo() |
|
Back to top |
|
 |
fedeliallalinea Administrator


Joined: 08 Mar 2003 Posts: 31526 Location: here
|
Posted: Tue Oct 26, 2004 8:43 am Post subject: |
|
|
xchris wrote: | se dai ACCEPT_KEYWORDS="~x86 -x86" per fare entrambi (forse basta l'ultimo...nn so) cmq ti mette tutte le ultime versioni in assoluto. |
Sei sicuro? Probabilmente hai ragione _________________ Questions are guaranteed in life; Answers aren't. |
|
Back to top |
|
 |
xchris Advocate


Joined: 10 Jul 2003 Posts: 2824
|
Posted: Tue Oct 26, 2004 8:45 am Post subject: |
|
|
"credo" di si...
purtroppo oggi e' una giornataccia per provare...ma a logica direi di si.
ciao _________________ while True:Gentoo() |
|
Back to top |
|
 |
fedeliallalinea Administrator


Joined: 08 Mar 2003 Posts: 31526 Location: here
|
Posted: Tue Oct 26, 2004 8:50 am Post subject: |
|
|
xchris wrote: | purtroppo oggi e' una giornataccia per provare...ma a logica direi di si. |
Provo io stasera a vedere se mi ricordo  _________________ Questions are guaranteed in life; Answers aren't. |
|
Back to top |
|
 |
mrfree Veteran


Joined: 15 Mar 2003 Posts: 1303 Location: Europe.Italy.Sulmona
|
Posted: Tue Oct 26, 2004 10:13 am Post subject: |
|
|
Azz xchris, mi hai anticipato
Dopo aver esaminato lo scriptino di fedeli ho notato che effettivamente sarebbe stato meglio seguire un approccio più conservativo, se così si può dire, cioè cercare di minimizzare i pacchetti masked (hard e non) da emergere.
Conto di provare zorro il prima possibile _________________ Please EU, pimp my country!
ICE: /etc/init.d/iptables panic |
|
Back to top |
|
 |
xchris Advocate


Joined: 10 Jul 2003 Posts: 2824
|
Posted: Wed Oct 27, 2004 5:19 am Post subject: |
|
|
in realta' il tool iniziale e' conservativo...+ di zorro.
Era la eventuale versione modificata ad "avere problemi"...
Unica cosa in + che fa zorro e' quella di gestire anche gli hard masked.
ciao _________________ while True:Gentoo() |
|
Back to top |
|
 |
xchris Advocate


Joined: 10 Jul 2003 Posts: 2824
|
Posted: Wed Oct 27, 2004 8:23 am Post subject: |
|
|
ho aggiornato lo scriptino...
ora e' + veloce perche' per i pacchetti che devono essere smascherati sia hard che keywords viene fatto contemporaneamente.
ciao _________________ while True:Gentoo() |
|
Back to top |
|
 |
Raffo Veteran


Joined: 23 Apr 2004 Posts: 1019 Location: Berlin
|
Posted: Wed Oct 27, 2004 2:04 pm Post subject: |
|
|
sto leggendo il tuo script ed è in codice quello che stavo cercando di fare ieri, maledetto
penso che prenderò spunto per completare il mio script.... |
|
Back to top |
|
 |
fedeliallalinea Administrator


Joined: 08 Mar 2003 Posts: 31526 Location: here
|
Posted: Wed Oct 27, 2004 2:04 pm Post subject: |
|
|
Raffo wrote: | penso che prenderò spunto per completare il mio script.... |
E se invece aiutiamo xchris a migliorare il suo? _________________ Questions are guaranteed in life; Answers aren't. |
|
Back to top |
|
 |
xchris Advocate


Joined: 10 Jul 2003 Posts: 2824
|
Posted: Wed Oct 27, 2004 2:12 pm Post subject: |
|
|
se qualcuno vuole completare zorro non ci sono problemi...
basta avere un tool funzionante
ciao _________________ while True:Gentoo() |
|
Back to top |
|
 |
Raffo Veteran


Joined: 23 Apr 2004 Posts: 1019 Location: Berlin
|
Posted: Wed Oct 27, 2004 2:14 pm Post subject: |
|
|
@fedeli: mah, per quello che volevo fare io lo script di xchris nn va proprio bene, diciamo che punta ad un diverso obiettivo. cmq per me va bene di cercare di migliorare il suo, ma lo sviluppo del mio script andrà avanti in parallelo  |
|
Back to top |
|
 |
xchris Advocate


Joined: 10 Jul 2003 Posts: 2824
|
Posted: Wed Oct 27, 2004 2:16 pm Post subject: |
|
|
direi che se integri quello che fa ora zorro e le altre "misteriose" features...
bhe aspettiamo il tuo tool
Vorremmo rilasciare un gekit aggiornato per meta' di sett prox.
Pensi di riuscire?
ciao _________________ while True:Gentoo() |
|
Back to top |
|
 |
|