/var/lib/portage/world<br><br clear="all">Atentamente,<br>David<br>
<br><br><div class="gmail_quote">On Thu, Mar 18, 2010 at 7:16 PM, <a href="mailto:pizted@...">pizted@...</a> <span dir="ltr"><<a href="mailto:pizted@...">pizted@...</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
El 18/03/2010, a las 18:29, Lluís Forns escribió:<div class="im"><br>
<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
hace un año que no trabajo con gentoo, pero en el sistema había un<br>
fichero llamado "world" con todos los paquetes instalados<br>
especificamente (no contiene las dependencias instaladas).<br>
<br>
</blockquote>
<br></div>
Cierto, creo que se encuentra en el directorio de portage, en /usr/portage.<br>
<br>
De todas formas, se puede obtener un listado exacto de todas los programas instalados parseando la salida del programa "eix". Hace algunos meses yo hice un pequeño parser para obtener los programas que necesitaban actualizarse (world no es muy fiable a veces). El código es este, está en python, con unas pequeñas modificaciones se podría obtener un listado legible de todos los programas instalados y sus respectivas versiones. Si a alguien le interesa el programa ese, se llama GUAU y está en <a href="http://halcyon.zapto.org/projects/guau" target="_blank">http://halcyon.zapto.org/projects/guau</a> aunque no está terminado, tiene un par de bugs.<br>
<br>
def make_report(file):<br>
from components import eix<br>
# Open and save the eix result in the file specified in the<br>
# configuration<br>
# NOTE: We must sync eix first to get an updated list<br>
eix.sync()<br>
eix = Popen('eix -uc >>' + file, shell=True)<br>
# Wait for the process to end<br>
eix.wait()<br>
# Start counting packages<br>
p = 0<br>
print _('* Making update report...')<br>
# We iterate over the object<br>
for line in fileinput.input(file, inplace=1):<br>
package = line.split(' ')<br>
if len(line.strip()) and not line.startswith('Found') and not line[1].isdigit():<br>
try:<br>
# Count a new package<br>
p += 1<br>
# Write package name, since output<br>
# is redirected to file, print is<br>
# enough. We insert a space<br>
# see the update function<br>
print package[1]<br>
except:<br>
log.error('Couldn\'t write the reportfile. Aborting')<br>
print ERROR<br>
sys.exit(1)<br>
# Open the packages file<br>
mssg = open(file, 'r').read()<br>
externalmail.send(_('Portage tree and eix database updated. There are') + str(p) + _(' packages to update:\n\n') + mssg + _('\nGenerated by Gentoo Universal Automatic Updater v.') + VERSION)<br>
log.debug('Report made succesfully.')<br>
print _('* Report sent by email.')<br>
<br>
<br>
</blockquote></div><br>
|