Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index International Gentoo Users Forum italiano (Italian) Risorse italiane (documentazione e tools)
  • Search

[TOOL] addkeywords

Forum riservato alla documentazione in italiano.

Moderator: ago

Locked
  • Print view
Advanced search
54 posts
  • 1
  • 2
  • 3
  • Next
Author
Message
fedeliallalinea
Administrator
Administrator
User avatar
Posts: 31985
Joined: Sat Mar 08, 2003 11:15 pm
Location: here
Contact:
Contact fedeliallalinea
Website

[TOOL] addkeywords

Post by fedeliallalinea » Fri Oct 15, 2004 7:10 pm

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: Select all

#!/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: Select all

# addkeywords ~ARCH PACKAGE
esempio pratico

Code: Select all

# addkeywords ~x86 gnome
Last edited by fedeliallalinea on Sat Oct 16, 2004 2:11 pm, edited 1 time in total.
Questions are guaranteed in life; Answers aren't.

"Those who would give up essential liberty to purchase a little temporary safety,
deserve neither liberty nor safety."
- Ben Franklin
https://www.news.admin.ch/it/nsb?id=103968
Top
mrfree
Veteran
Veteran
User avatar
Posts: 1303
Joined: Sat Mar 15, 2003 6:31 pm
Location: Europe.Italy.Sulmona

Post by mrfree » Fri Oct 15, 2004 10:00 pm

Grande fedeli, thz :D

Proverò lo script appena possibile.

PS: prima o poi dovrò decidermi a diventare bashscript-autonomo :wink:
Please EU, pimp my country!

ICE: /etc/init.d/iptables panic
Top
sorchino
Apprentice
Apprentice
User avatar
Posts: 242
Joined: Tue Jul 08, 2003 12:21 pm
Location: Bologna/Treno/Fano

Post by sorchino » Sat Oct 16, 2004 9:59 am

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.
Top
fedeliallalinea
Administrator
Administrator
User avatar
Posts: 31985
Joined: Sat Mar 08, 2003 11:15 pm
Location: here
Contact:
Contact fedeliallalinea
Website

Post by fedeliallalinea » Sat Oct 16, 2004 2:02 pm

Spero solo che funzioni a dovere visto che non ho fatto molti test
Questions are guaranteed in life; Answers aren't.

"Those who would give up essential liberty to purchase a little temporary safety,
deserve neither liberty nor safety."
- Ben Franklin
https://www.news.admin.ch/it/nsb?id=103968
Top
fedeliallalinea
Administrator
Administrator
User avatar
Posts: 31985
Joined: Sat Mar 08, 2003 11:15 pm
Location: here
Contact:
Contact fedeliallalinea
Website

Post by fedeliallalinea » Sat Oct 16, 2004 2:10 pm

Post splittatto da questo
Questions are guaranteed in life; Answers aren't.

"Those who would give up essential liberty to purchase a little temporary safety,
deserve neither liberty nor safety."
- Ben Franklin
https://www.news.admin.ch/it/nsb?id=103968
Top
gutter
Bodhisattva
Bodhisattva
User avatar
Posts: 7162
Joined: Sat Mar 13, 2004 10:37 pm
Location: Aarau, Aargau, Switzerland
Contact:
Contact gutter
Website

Post by gutter » Sat Oct 16, 2004 2:18 pm

Una cosa utile :wink:
Registered as User #281564 and Machines #163761
Top
Raffo
Veteran
Veteran
User avatar
Posts: 1019
Joined: Fri Apr 23, 2004 6:05 pm
Location: Berlin

Post by Raffo » Sat Oct 16, 2004 2:22 pm

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 :lol:
Top
xchris
Advocate
Advocate
User avatar
Posts: 2824
Joined: Thu Jul 10, 2003 10:21 pm

Post by xchris » Mon Oct 25, 2004 11:41 pm

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()
Top
fedeliallalinea
Administrator
Administrator
User avatar
Posts: 31985
Joined: Sat Mar 08, 2003 11:15 pm
Location: here
Contact:
Contact fedeliallalinea
Website

Post by fedeliallalinea » Tue Oct 26, 2004 7:20 am

xchris wrote:utilizza pero' un approccio diverso (+ lento...decisamente)
Non vale la pena di postarlo comunque?
Questions are guaranteed in life; Answers aren't.

"Those who would give up essential liberty to purchase a little temporary safety,
deserve neither liberty nor safety."
- Ben Franklin
https://www.news.admin.ch/it/nsb?id=103968
Top
xchris
Advocate
Advocate
User avatar
Posts: 2824
Joined: Thu Jul 10, 2003 10:21 pm

Post by xchris » Tue Oct 26, 2004 8:15 am

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 :lol:)

Code: Select all

#!/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: Select all

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!


Last edited by xchris on Wed Oct 27, 2004 8:22 am, edited 1 time in total.
while True:Gentoo()
Top
fedeliallalinea
Administrator
Administrator
User avatar
Posts: 31985
Joined: Sat Mar 08, 2003 11:15 pm
Location: here
Contact:
Contact fedeliallalinea
Website

Post by fedeliallalinea » Tue Oct 26, 2004 8:16 am

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.

"Those who would give up essential liberty to purchase a little temporary safety,
deserve neither liberty nor safety."
- Ben Franklin
https://www.news.admin.ch/it/nsb?id=103968
Top
xchris
Advocate
Advocate
User avatar
Posts: 2824
Joined: Thu Jul 10, 2003 10:21 pm

Post by xchris » Tue Oct 26, 2004 8:20 am

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()
Top
fedeliallalinea
Administrator
Administrator
User avatar
Posts: 31985
Joined: Sat Mar 08, 2003 11:15 pm
Location: here
Contact:
Contact fedeliallalinea
Website

Post by fedeliallalinea » Tue Oct 26, 2004 8:22 am

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.

"Those who would give up essential liberty to purchase a little temporary safety,
deserve neither liberty nor safety."
- Ben Franklin
https://www.news.admin.ch/it/nsb?id=103968
Top
xchris
Advocate
Advocate
User avatar
Posts: 2824
Joined: Thu Jul 10, 2003 10:21 pm

Post by xchris » Tue Oct 26, 2004 8:25 am

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()
Top
fedeliallalinea
Administrator
Administrator
User avatar
Posts: 31985
Joined: Sat Mar 08, 2003 11:15 pm
Location: here
Contact:
Contact fedeliallalinea
Website

Post by fedeliallalinea » Tue Oct 26, 2004 8:43 am

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.

"Those who would give up essential liberty to purchase a little temporary safety,
deserve neither liberty nor safety."
- Ben Franklin
https://www.news.admin.ch/it/nsb?id=103968
Top
xchris
Advocate
Advocate
User avatar
Posts: 2824
Joined: Thu Jul 10, 2003 10:21 pm

Post by xchris » Tue Oct 26, 2004 8:45 am

"credo" di si...
purtroppo oggi e' una giornataccia per provare...ma a logica direi di si.

ciao
while True:Gentoo()
Top
fedeliallalinea
Administrator
Administrator
User avatar
Posts: 31985
Joined: Sat Mar 08, 2003 11:15 pm
Location: here
Contact:
Contact fedeliallalinea
Website

Post by fedeliallalinea » Tue Oct 26, 2004 8:50 am

xchris wrote:purtroppo oggi e' una giornataccia per provare...ma a logica direi di si.
Provo io stasera a vedere se mi ricordo :D
Questions are guaranteed in life; Answers aren't.

"Those who would give up essential liberty to purchase a little temporary safety,
deserve neither liberty nor safety."
- Ben Franklin
https://www.news.admin.ch/it/nsb?id=103968
Top
mrfree
Veteran
Veteran
User avatar
Posts: 1303
Joined: Sat Mar 15, 2003 6:31 pm
Location: Europe.Italy.Sulmona

Post by mrfree » Tue Oct 26, 2004 10:13 am

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
Top
xchris
Advocate
Advocate
User avatar
Posts: 2824
Joined: Thu Jul 10, 2003 10:21 pm

Post by xchris » Wed Oct 27, 2004 5:19 am

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()
Top
xchris
Advocate
Advocate
User avatar
Posts: 2824
Joined: Thu Jul 10, 2003 10:21 pm

Post by xchris » Wed Oct 27, 2004 8:23 am

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()
Top
Raffo
Veteran
Veteran
User avatar
Posts: 1019
Joined: Fri Apr 23, 2004 6:05 pm
Location: Berlin

Post by Raffo » Wed Oct 27, 2004 2:04 pm

sto leggendo il tuo script ed è in codice quello che stavo cercando di fare ieri, maledetto :evil: :lol:
penso che prenderò spunto per completare il mio script....
Top
fedeliallalinea
Administrator
Administrator
User avatar
Posts: 31985
Joined: Sat Mar 08, 2003 11:15 pm
Location: here
Contact:
Contact fedeliallalinea
Website

Post by fedeliallalinea » Wed Oct 27, 2004 2:04 pm

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.

"Those who would give up essential liberty to purchase a little temporary safety,
deserve neither liberty nor safety."
- Ben Franklin
https://www.news.admin.ch/it/nsb?id=103968
Top
xchris
Advocate
Advocate
User avatar
Posts: 2824
Joined: Thu Jul 10, 2003 10:21 pm

Post by xchris » Wed Oct 27, 2004 2:12 pm

se qualcuno vuole completare zorro non ci sono problemi...
basta avere un tool funzionante :)
ciao
while True:Gentoo()
Top
Raffo
Veteran
Veteran
User avatar
Posts: 1019
Joined: Fri Apr 23, 2004 6:05 pm
Location: Berlin

Post by Raffo » Wed Oct 27, 2004 2:14 pm

@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 :wink:
Top
xchris
Advocate
Advocate
User avatar
Posts: 2824
Joined: Thu Jul 10, 2003 10:21 pm

Post by xchris » Wed Oct 27, 2004 2:16 pm

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()
Top
Locked
  • Print view

54 posts
  • 1
  • 2
  • 3
  • Next

Return to “Risorse italiane (documentazione e tools)”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic