Moderator: ago
Code: Select all
find /var/db/pkg/sys-kernel/ | grep ".ebuild"
Code: Select all
$ find /var/db/pkg/sys-kernel/ | grep ".ebuild"
/var/db/pkg/sys-kernel/gentoo-dev-sources-2.6.9-r1/gentoo-dev-sources-2.6.9-r1.ebuild
/var/db/pkg/sys-kernel/gentoo-dev-sources-2.6.8-r10/gentoo-dev-sources-2.6.8-r10.ebuild
/var/db/pkg/sys-kernel/linux-headers-2.4.21-r1/linux-headers-2.4.21-r1.ebuild
Si è un bug che ho trovato tempo fa. Ho aggiunto l'opzione -g proprio per questo prova con quella...Manuelixm wrote:Io lo stavo provando, ho riscontrato uno strano comportamento con i kernel, ossia mi scarica tutti i kernel anche i 2.4.x e me li compila.
Purtroppo è dovuto al fatto che se sono stati installati si trovano nel db anche dopo essere stati rimossi. Fare un ulteriore controllo sui pacchetti in db ma non installati renderebbe il programma moooolto lento. Per ora consiglio di provare -gxchris wrote:questo perche' hai ancora dei kernel vecchi installati credo...
controlla Smile
ciao
Azz, vero. Correggo subito, il fatto è che li compila senza versione ma li mostra con. Che sbadatoxchris wrote:- se lanciato con -g in visualizzazione non funziona. (mostra le versioni)
Detto fatto. Nella prossima versione ci sarà anche questo.xchris wrote:Farebbe comodo --no-color
Non ho ancora inserito alcun controllo sugli slot e per ora non è in programma. Dopo aver corretto alcune cosette magari =)xchris wrote:Su sistemi vecchi in automatico non funziona bene per le versioni slotted in particolare. (se uso -g mi ricompila solo l'ultima...)
Grazie a te, il tuo è stato uno dei report più dettagliati che ho ricevuto. (insieme a quelli di fonderia)xchris wrote:A parte queste critiche (del tutto personali e non condivisibili) reputo il gufo uno strumento essenziale! Grazie!
Code: Select all
./gufo.py --cflags="-malign-double"Code: Select all
./gufo.py --cflags="-malign-double" --recompileCode: Select all
Please wait a moment, scanning database...
Code: Select all
./gufo.py --cflags="-malign-double" --recompileE' in programma un file di config tipo gufo.mask in cui mettere i pacchetti (stile categoria/pacchetto-versione) ma ultimamente lo sviluppo è fermo.mrfree wrote:Un'altra cosetta IMHO utile, potrebbe essere un'opzione che permette di skippare determinati pacchetti.
[...]
Insomma un --no-pkg "glibc" mi farebbe comodo
Code: Select all
# python -VCode: Select all
# dialog --versionOttimoE' in programma un file di config tipo gufo.mask in cui mettere i pacchetti (stile categoria/pacchetto-versione)
Code: Select all
# python -V
Python 2.3.4
# dialog --version
Version: 1.0-20040731E' lui... non so cosa abbiano cambiato ma con questa versione non funziona.mrfree wrote:Code: Select all
# dialog --version Version: 1.0-20040731
Code: Select all
emerge =dialog-0.9_beta20030308-r1Code: Select all
def emerge():
global selected, options
print selected
# out = ""
# for i in selected:
# if options["GENERIC"]:
# out += " " + pkgsplit(i["NAME"])[0]
# else:
# out += "=" + i["NAME"] + " "
# if out:
# os.system("emerge --oneshot " + out)
Code: Select all
#! /usr/bin/env python
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
# Gufo 0.2 Copyright 2003 Luca Marra <annoiato@aliceposta.it>
#
# Thanks to: Lorenz B. and Nicola F.
import os.path, re, sys, getopt, commands
from output import bold, green, darkgreen
from portage import pkgsplit
dir = "/var/db/pkg/"
options = {"CFLAGS":"", "COMPACT":False, "INVERT":False, "COMP":False, "AUTO":False, "GENERIC":False, "FETCHONLY":False, "PRETEND":False}
ebuilds = []
selected = []
def printUsage():
print "usage: ./gufo.py [options]"
print """
-h, --help this message
-C, --cflags=cflags cflags to search
-v, --invert-match invert the sense of matching
-r, --recompile recompiles selected packages
-a, --auto auto (impilies recompile)
-g, --generic compiles the generic package
(not the specific version)
-c, --compact compact output
--fetchonly fetches only packages
--pretend executes pretend to evaluate the number of packages to be compiled
"""
def getOpt():
global options
opts, args = getopt.getopt(sys.argv[1:], "harvcgC:", ["help", "auto", "recompile", "invert-match", "cflags=", "compact", "generic", "fetchonly", "pretend"])
for o, a in opts:
if o == "-h" or o == "--help":
printUsage()
sys.exit()
if o == "-r" or o == "--recompile":
options["COMP"] = True
if o == "-a" or o == "--auto":
options["COMP"] = True
options["AUTO"] = True
if o == "-v" or o == "--invert-match":
options["INVERT"] = True
if o == "-C" or o == "--cflags":
options["CFLAGS"] = a
if o == "-c" or o == "--compact":
options["COMPACT"] = True
if o == "-g" or o == "--generic":
options["GENERIC"] = True
if o == "-f" or o == "--fetchonly":
options["FETCHONLY"] = True
if o == "-p" or o == "--pretend":
options["PRETEND"] = True
if options["CFLAGS"] == "":
options["INVERT"] = True
options["CFLAGS"] = getMakeFlags()
return
def find(string, sub):
p = re.compile(sub)
result = p.findall(string)
return result
def grep(file, string):
global ebuilds, options
f = open(file)
cflags = f.read()
f.close
result = find(cflags, string)
name = file[12:-7]
cflags = cflags[:-1]
ebuild = {"NAME":name, "CFLAGS":cflags}
if result:
if options["INVERT"] == False:
ebuilds.append(ebuild)
else:
if options["INVERT"]:
ebuilds.append(ebuild)
def getFiles(arg, dirname, files):
for file in files:
if file == "CFLAGS":
grep(dirname + "/" + file, arg)
def getMakeFlags():
f = open("/etc/make.conf")
mconf = f.read()
f.close
result = re.compile("\nCFLAGS=.+").search(mconf)
result = result.group()[9:-1]
return result
def doSomething():
global ebuilds, selected, options
if options["COMP"]:
if options["AUTO"]:
selected = ebuilds
emerge()
else:
pack = selectOutput()
emerge()
else:
printOutput(ebuilds, options["COMPACT"])
def selectOutput():
global ebuilds, selected
out = ""
for i in ebuilds:
out += "\"" + i["NAME"] + "\" \"" + i["CFLAGS"] + "\" off "
cmd = "dialog --clear --separate-output --title \"Gufo Selector\" \
--checklist \"Select packages to recompile\" 0 0 0 " + out
pack = commands.getoutput(cmd)
if pack:
pack = pack.split("\n")
for i in pack:
ebuild = {"NAME":i}
selected.append(ebuild)
return 1
return 0
def printOutput(list, compact=False):
print
if compact:
for i in list:
print bold(i["NAME"] + ": ") + i["CFLAGS"]
else:
for i in list:
print green("*") + bold(" " + i["NAME"])
print darkgreen(" CFLAGS: ") + i["CFLAGS"]
print
def emerge():
global selected, options
out = ""
for i in selected:
if options["GENERIC"]:
out += " " + pkgsplit(i["NAME"])[0]
else:
out += "=" + i["NAME"] + " "
#Added fetchonly feature [ivan]
if options["FETCHONLY"]:
out += " -f "
#Added pretend feature [ivan]
if options["PRETEND"]:
out += " -p "
if out:
os.system("emerge " + out)
getOpt()
if options["CFLAGS"]:
print "Please wait a moment, scanning database..."
os.path.walk(dir, getFiles, options["CFLAGS"])
if ebuilds:
doSomething()
else:
print "Error: no packages found"
Wow, figata... non lo sapevo mica (ahahahahahahahahahah)codarin wrote:Grazzie... bello sia equery che un cat sul pacchetto!
Grazie, ora ho più coraggio a ricompilare!
Tra le altre cose gufo (BY GEKIT) ho visto che mi fa il parsing anche dei GRP e quindi gufo stesso estrae le cflag con cui le cose sono state compilate!
Code: Select all
thorium gufo-kiss # gufo-kiss.py
Please wait: Scanning portage db
* x11-misc/gtodo-0.14
CFLAGS: -Os -march=athlon-xp -pipe
* sys-devel/patch-2.5.9-r1
CFLAGS: -Os -march=athlon-xp -pipe -DLINUX -D_XOPEN_SOURCE=500
* sys-devel/binutils-2.16.1
CFLAGS: -Os -march=athlon-xp -pipe
* net-libs/gecko-sdk-1.7.8
CFLAGS: -march=athlon-xp -pipe -Wno-return-type -w
re-emerge listed packages? (y/n) n
Ok, bye ;)Code: Select all
CFLAGS="-Os -march=athlon-xp -pipe -fomit-frame-pointer"Esatto.fctk wrote:con ogni probabilità si tratta di pacchetti che filtrano alcune CFLAGS e quindi non potranno mai essere compilate con tutte le CFLAGS correnti
Il problema e' quello di cui parlo nell'altro post, al momento gufo filtra gcc e gli ebuilds che contengono le stringhe "replace-flags" e "filter-flags", il problema e' che alcuni ebuild (che io chiamo magici ma semplicemente non ho capito come funzionano) pur non contenendo queste funzioni filtrano le CFLAGS ad esempio binutils-2.15.92.0.2-r10.ebuild:fctk wrote:ad esempio... binutils non viene compilato con -fomit-frame-pointer, ma a parte quella tutte le altre cflags con cui è stato compilato corrispondono esattamente a quelle che ho settato in make... quindi secondo me gufo non dovrebbe chiederne la ricompilazione...
Code: Select all
# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/sys-devel/binutils/binutils-2.15.92.0.2-r10.ebuild,v 1.5 2005/05/31 22:04:27 vapier Exp $
PATCHVER="2.5"
UCLIBC_PATCHVER="1.1"
inherit toolchain-binutils
KEYWORDS="-* alpha amd64 -arm hppa ia64 m68k ~mips -ppc ~ppc64 sparc x86"
~
No chiedi il giusto ma sinceramente conosco a stento il 5% del codice di portage ed al momento non ho idee brillanti...fctk wrote:chiedo troppo?