Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[TIP] - eix - la ricerca veloce
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

Goto page Previous  1, 2, 3  Next  
Reply to topic    Gentoo Forums Forum Index Forum italiano (Italian) Risorse italiane (documentazione e tools)
View previous topic :: View next topic  
Author Message
Sparker
l33t
l33t


Joined: 28 Aug 2003
Posts: 992

PostPosted: Fri Jan 28, 2005 9:53 pm    Post subject: Reply with quote

alexzndr wrote:
Da un po' di tempo quando faccio fare una qualsiasi ricerca mi da come risultato tutti i pacchetti di portage..
Da che puo' dipendere?

Hanno cambiato la sintassi, ora ci va un - davanti alle opzioni:
eix s gcc diventa eix -s gcc

stessa cosa per eix -u
Back to top
View user's profile Send private message
Cerberos86
Guru
Guru


Joined: 13 Dec 2003
Posts: 581
Location: Padova

PostPosted: Fri Jan 28, 2005 10:02 pm    Post subject: Reply with quote

Sparker wrote:
Hanno cambiato la sintassi, ora ci va un - davanti alle opzioni

adesso ho capito .... :lol: :wink:
_________________
Account jabber: cerberos@jabber.org
"I'm using the hand..." ~ Guybrush Threepwood ~
Back to top
View user's profile Send private message
randomaze
Bodhisattva
Bodhisattva


Joined: 21 Oct 2003
Posts: 9985

PostPosted: Fri Jan 28, 2005 10:27 pm    Post subject: Reply with quote

Sparker wrote:
Hanno cambiato la sintassi, ora ci va un - davanti alle opzioni:
eix s gcc diventa eix -s gcc


Ah ok, allora non sono io che all'improvviso sono diventato scemo... hanno cambiato loro!
_________________
Ciao da me!
Back to top
View user's profile Send private message
Dhaki
Guru
Guru


Joined: 16 Jun 2004
Posts: 325
Location: Ticino - CH

PostPosted: Sat Jan 29, 2005 5:44 pm    Post subject: Reply with quote

Girovagando disperso per i gentoo forums ho trovato questo interessantissimo tip di pjp. In pratica é uno script python che visualizza dopo un emerge sync i cambiamenti, esattamente come fa esync per intenderci (anche se non visualizza se é un aggiornamento). Aggiungendo una piccola modifica adesso fa un emerge sync, eix -u, e vi mostra i cambiamenti. Ecco il codice:
Code:
#!/usr/bin/env python

import sys,portage,os
from output import *

if (not sys.stdout.isatty()) or (portage.settings["NOCOLOR"] in ["yes","true"]):
        nocolor()

def portTree():
        return portage.portdb.cp_all()


print green("*")+" Recording tree information before syncing."
before = portTree()

os.system("/usr/bin/emerge sync")

print green("*")+" Recording tree information after syncing.\n"
after = portTree()

rmd = before
new = after
matches = []

# Find common elements in before & after.
for pos in range(len(before)):
        if after.count(before[pos]):
                matched = after.index(before[pos])
                matches.append(after[matched])

# Remove common elements (matches) from before & after, creating "new" and "removed" packages.
for pos in range(len(matches)):
        new.remove(matches[pos])
        rmd.remove(matches[pos])

#Aggiorna il database eix

print green("*")+" Updating eix database.\n"
os.system("/usr/bin/eix -u")
print ""

# Report results
print "- - - ---------------------------------------------------------------------"
print "New packages [%s]" % (len(new))
print "- - - ---------------------------------------------------------------------"
if (len(new)):
        for what in new:
                full_pkg = portage.best(portage.portdb.xmatch("match-all", (what.split("/")[1]) ))
                print green("*")+" "+what
                print "\t"+portage.portdb.aux_get(full_pkg, ["DESCRIPTION"])[0]
else:
        print yellow("*")+" No new packages."

print
print "- - - ---------------------------------------------------------------------"
print "Removed packages [%s]" % (len(rmd))
print "- - - ---------------------------------------------------------------------"
if (len(rmd)):
        for what in rmd:
                print yellow("*")+" "+what
else:
        print green("*")+" No packages removed."

print
print green("*")+" Done."


Attendo risposte di python guru per migliorare l'output dei cambiamenti :D
Back to top
View user's profile Send private message
thoeni
n00b
n00b


Joined: 23 Nov 2004
Posts: 69
Location: Italy

PostPosted: Sat Jan 29, 2005 6:27 pm    Post subject: Reply with quote

uhm, interessante! vorrei capirne bene le potenzialità... io per cercare pacchetti ho sempre fatto
Code:
emerge -s nome

e poi facevo
Code:
emerge -pv nome

per vedere le dipendenze...
Brevemente esearch e eix, cosa sono?
_________________
'][' ]-[ () [- ]\[ ][

"Fuggi quello studio, del quale la resultante opera muore insieme coll'operante d'essa."
Back to top
View user's profile Send private message
fedeliallalinea
Administrator
Administrator


Joined: 08 Mar 2003
Posts: 30822
Location: here

PostPosted: Sat Jan 29, 2005 6:32 pm    Post subject: Reply with quote

thoeni wrote:
Brevemente esearch e eix, cosa sono?

Sono esattamente come emerge -s o -S ma visto che ha un sio db indicizzato ci mette molto meno a fare un ricerca
_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
thoeni
n00b
n00b


Joined: 23 Nov 2004
Posts: 69
Location: Italy

PostPosted: Sat Jan 29, 2005 6:41 pm    Post subject: Reply with quote

chiarissimo, grazie ;)
_________________
'][' ]-[ () [- ]\[ ][

"Fuggi quello studio, del quale la resultante opera muore insieme coll'operante d'essa."
Back to top
View user's profile Send private message
thoeni
n00b
n00b


Joined: 23 Nov 2004
Posts: 69
Location: Italy

PostPosted: Sat Jan 29, 2005 7:13 pm    Post subject: Reply with quote

l'ho provato, in effetti è molto veloce... ma con eix --help ho letto le options... non esiste un comando x controllare le dipendeze tipo
Code:
emerge -pv nome
:?:
_________________
'][' ]-[ () [- ]\[ ][

"Fuggi quello studio, del quale la resultante opera muore insieme coll'operante d'essa."
Back to top
View user's profile Send private message
fedeliallalinea
Administrator
Administrator


Joined: 08 Mar 2003
Posts: 30822
Location: here

PostPosted: Sat Jan 29, 2005 7:15 pm    Post subject: Reply with quote

thoeni wrote:
ma con eix --help ho letto le options... non esiste un comando x controllare le dipendeze tipo

E' solo per fare ricerche non ha nulla a che fare con il resto
_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
lavish
Bodhisattva
Bodhisattva


Joined: 13 Sep 2004
Posts: 4296

PostPosted: Sat Jan 29, 2005 7:16 pm    Post subject: Reply with quote

Io sto iniziando a incasinarmi di brutto ocn tutti questi script... (ma di brutto brutto!)

emerge
eix
qpkg
equery
esearch
unclepine
ecc...

8O
_________________
minimalblue.com | secgroup.github.io/
Back to top
View user's profile Send private message
thoeni
n00b
n00b


Joined: 23 Nov 2004
Posts: 69
Location: Italy

PostPosted: Sat Jan 29, 2005 7:17 pm    Post subject: Reply with quote

...e questo che vuol dire?

Code:
root@elnath thoeni # emerge -s gaim-encryption
Searching...
[ Results for search key : gaim-encryption ]
[ Applications found : 1 ]

*  x11-plugins/gaim-encryption
      Latest version available: 2.32-r1
      Latest version installed: 2.33
      Size of downloaded files: 509 kB
      Homepage:    http://gaim-encryption.sourceforge.net/
      Description: GAIM Encryption PlugIn
      License:     GPL-2


Code:
root@elnath thoeni # eix -vs gaim-encryption
* x11-plugins/gaim-encryption
     Available versions:  2.32  2.32-r1  ~2.34
     Installed:           no
     Homepage:            http://gaim-encryption.sourceforge.net/
     Description:         GAIM Encryption PlugIn
     License:             GPL-2


ce l'ho o no gaim encryption??? Io so di averlo, ma perchè eix non lo segnala?
_________________
'][' ]-[ () [- ]\[ ][

"Fuggi quello studio, del quale la resultante opera muore insieme coll'operante d'essa."
Back to top
View user's profile Send private message
fedeliallalinea
Administrator
Administrator


Joined: 08 Mar 2003
Posts: 30822
Location: here

PostPosted: Sat Jan 29, 2005 7:20 pm    Post subject: Reply with quote

Prova a lanciare un
Code:
# eix u

e poi
Code:
# eix -vs gaim-encryption

_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
thoeni
n00b
n00b


Joined: 23 Nov 2004
Posts: 69
Location: Italy

PostPosted: Sat Jan 29, 2005 7:21 pm    Post subject: Reply with quote

...riproverò ma lo avevo appena fatto...
ho fatto emerge sync, poi ho emerso il portage nuovo, ho fatto emerge metadata e poi ho fatto emerge eix... dopodichè ho fatto eix -u e ha aggiornato il db... di seguito ho fatto la ricerca che ho postato... forse non conosce quella versione?
_________________
'][' ]-[ () [- ]\[ ][

"Fuggi quello studio, del quale la resultante opera muore insieme coll'operante d'essa."
Back to top
View user's profile Send private message
fedeliallalinea
Administrator
Administrator


Joined: 08 Mar 2003
Posts: 30822
Location: here

PostPosted: Sat Jan 29, 2005 7:23 pm    Post subject: Reply with quote

Ho la tua stessa versione e mi dice che e' installato a me
Code:
$ eix -vs gaim-encryption
* x11-plugins/gaim-encryption
     Available versions:  2.32  2.32-r1  ~2.34 
     Installed:           2.32-r1
     Homepage:            http://gaim-encryption.sourceforge.net/
     Description:         GAIM Encryption PlugIn
     License:             GPL-2

_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
thoeni
n00b
n00b


Joined: 23 Nov 2004
Posts: 69
Location: Italy

PostPosted: Sat Jan 29, 2005 7:24 pm    Post subject: Reply with quote

no, io ho la 2.33, che era masked... forse x quello nn la riconosce :roll: vabbè, fa nulla, era tanto x soddisfare le mie manie di perfezione ;)
_________________
'][' ]-[ () [- ]\[ ][

"Fuggi quello studio, del quale la resultante opera muore insieme coll'operante d'essa."
Back to top
View user's profile Send private message
fedeliallalinea
Administrator
Administrator


Joined: 08 Mar 2003
Posts: 30822
Location: here

PostPosted: Sat Jan 29, 2005 7:31 pm    Post subject: Reply with quote

Allora e' normale visto che non esiste piu' nel portage-tree
_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
FonderiaDigitale
Veteran
Veteran


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

PostPosted: Mon Jan 31, 2005 1:17 am    Post subject: Reply with quote

sarebbe a dire? 8O
_________________
Come disse un amico, i sistemisti sono un po' come gli artigiani per l'informatica :)
Back to top
View user's profile Send private message
fedeliallalinea
Administrator
Administrator


Joined: 08 Mar 2003
Posts: 30822
Location: here

PostPosted: Mon Jan 31, 2005 8:58 am    Post subject: Reply with quote

FonderiaDigitale wrote:
sarebbe a dire? 8O

No nulla pensavo nelle Available versions: invece lui intende in quella installata. Scusate
_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
Sparker
l33t
l33t


Joined: 28 Aug 2003
Posts: 992

PostPosted: Mon Jan 31, 2005 2:26 pm    Post subject: Reply with quote

Fedeliallalinea, potresti avere ragione
Forse se qualcosa attualmente installato non e' piu' in portage, non lo trova e allora segna il pachetto come non installato.

Si potrebbe fare qualche prova ed eventualmente segnalarlo come bug (purtroppo ora non posso)
Back to top
View user's profile Send private message
Mistobaan
Tux's lil' helper
Tux's lil' helper


Joined: 07 May 2004
Posts: 76

PostPosted: Mon Jan 31, 2005 4:23 pm    Post subject: Reply with quote

Certo che la seleziona naturale e' cattivissima...:roll:
ciao ciao esearch...
_________________
God is real until declared integer
Back to top
View user's profile Send private message
Sparker
l33t
l33t


Joined: 28 Aug 2003
Posts: 992

PostPosted: Mon Jan 31, 2005 7:23 pm    Post subject: Reply with quote

Sparker wrote:

Forse se qualcosa attualmente installato non e' piu' in portage, non lo trova e allora segna il pachetto come non installato.


Ho fatto una prova ed il problema è proprio questo:
Code:

arcadia ~ # eix -s amarok
* media-sound/amarok
     Available versions:  1.0.2  ~1.1.1  ~1.2_beta2  ~1.2_beta3
     Installed:           1.2_beta3
     Homepage:            http://amarok.kde.org/
     Description:         amaroK is a media player for KDE

rm /usr/portage/metadata/cache/media-sound/amarok-1.2_beta3
eix -u

arcadia ~ # eix -s amarok
* media-sound/amarok
     Available versions:  1.0.2  ~1.1.1  ~1.2_beta2
     Installed:           no
     Homepage:            http://amarok.kde.org/
     Description:         amaroK is a media player for KDE


Mando un bug-report allo sviluppatore
Back to top
View user's profile Send private message
xchris
Advocate
Advocate


Joined: 10 Jul 2003
Posts: 2824

PostPosted: Tue Feb 01, 2005 7:32 am    Post subject: Reply with quote

effettivamente facendo la cache sui metadata di portage....

potevano pero' dare un occhio a /var/db/pkg...

Speriamoo che sia prevista una correzione.
Ciao
_________________
while True:Gentoo()
Back to top
View user's profile Send private message
federico
Advocate
Advocate


Joined: 18 Feb 2003
Posts: 3272
Location: Italy, Milano

PostPosted: Tue Feb 01, 2005 9:36 am    Post subject: Reply with quote

Al limite nello programma py che e' apparso in questo thread aggiungerei solo una cosa del genere
Code:

user=os.getuid()
if user:
 print "Sorry: Only the user \"root\" can run this program.\n\n"
 sys.exit(1)


per verificare se il programma e' avviato da root o meno (cavoli non mi piace pero' questa soluzione per leggere l'utente root, sono sicuro che ne sapevo una + bellina ma stamattina mi sfugge :) )

Quote:

[100%] blackman@altair ~ $ python prova.py
Sorry: Only the user "root" can run this program.


[100%] blackman@altair ~ $

_________________
Sideralis www.sideralis.org
Pic http://blackman.amicofigo.com/gallery
Arduino http://www.arduino.cc
Chi aveva potuto aveva spaccato
2000 pezzi buttati là
Molti saluti,qualche domanda
Semplice come musica punk
Back to top
View user's profile Send private message
alexzndr
n00b
n00b


Joined: 11 Jan 2005
Posts: 55
Location: Somewhere in Time

PostPosted: Fri Feb 11, 2005 1:55 pm    Post subject: Reply with quote

Date un occhio qua:
Code:
# eix -s firefox
Search results: 2
* net-www/mozilla-firefox
     Available versions:  0.9.3  ~1.0_pre-r2  ~1.0_rc1  ~1.0_rc2  ~1.0  ~1.0-r1  ~1.0-r2  ~1.0-r3
     Installed:           1.0
     Homepage:            http://www.mozilla.org/projects/firefox/
     Description:         The Mozilla Firefox Web Browser


Come mai mette la versione 1.0 come masked?
Back to top
View user's profile Send private message
Raffo
Veteran
Veteran


Joined: 23 Apr 2004
Posts: 1019
Location: Berlin

PostPosted: Mon Feb 28, 2005 6:02 pm    Post subject: Reply with quote

emerso, quando sono andato a fare "eix -u" ho avuto questo errore:
Code:
Reading Portage settings
Updating eix database in /var/cache/eix
Using portage cache: /usr/portage/metadata/cache/
Reading metadata cache
[app] [dev] [games] [gnome] [gnustep] [kde] [mail] [media] [net] [rox] [sci] [sec] [sys] [www] [x11] [xfce]
Reading portage overlays
[/usr/local/portage/]
version.cc:95 Invalid gentoo release number in "1-rc1"

che vuol dire??
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
Goto page Previous  1, 2, 3  Next
Page 2 of 3

 
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