Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #21861

Re: dpkg status

References <CAKD_BxHpxDDUz1KXr2zBaBygDuaYegTAy5QWwSH_5QdnN6wBFA@mail.gmail.com> <4F65EA66.8000509@swing.be> <CAKD_BxHbU3fTRecEP6MDVG3T5O9UC1BmKN6Je-Aq22ddMmUYXA@mail.gmail.com> <4F65FCA5.8090504@swing.be>
Date 2012-03-18 17:43 +0100
Subject Re: dpkg status
From admin lewis <adminlewis@gmail.com>
Newsgroups comp.lang.python
Message-ID <mailman.785.1332089034.3037.python-list@python.org> (permalink)

Show all headers | View raw


2012/3/18 Vincent Vande Vyvre <vincent.vandevyvre@swing.be>:
>
>
> OK, you know apt, I see (your blog).
>
> But packages have no url, just repositery.
>
> I see your link python-apt, this doc is very minimalistic, maybe you can
> find repositeries infos of packages with aptsources.distinfo, but methods
> are not documented.
>
> http://apt.alioth.debian.org/python-apt-doc/library/aptsources.distinfo.html#module-aptsources.distinfo
>

Well no, I need something like the following:

import apt_pkg

tagf = apt_pkg.TagFile(open('/home/lightbox/status'))
for section in tagf:
	indirizzo="http://it.archive.ubuntu.com/ubuntu/pool/main/"+section['Package'][0]+'/'+section['Package']+'/'+section['Package']+'_'+section['Version']+'_'+section['Architecture']+'.deb'+'\n'
	print indirizzo

with the following output:
http://it.archive.ubuntu.com/ubuntu/pool/main/t/texlive-lang-all/texlive-lang-all_2009-3_all.deb
http://it.archive.ubuntu.com/ubuntu/pool/main/x/xserver-xorg-input-vmmouse/xserver-xorg-input-vmmouse_1:12.7.0-2_i386.deb
http://it.archive.ubuntu.com/ubuntu/pool/main/l/libmono-system-data4.0-cil/libmono-system-data4.0-cil_2.10.5-1_all.deb

but the best sould be that the script make the download of deb automatically..
infact if u see the output u will see that is not correct.. because the section
texlive-lang-all doesn't exist and the correct one is texlive-lang
I dont know if i have to connect to the cache of apt or simply i need
of source.list..
thanks for any help
luigi

P.S. the /home/lightbox/status is a partial file of /var/lib/dpkg/status

-- 
Linux Server, Microsoft Windows 2003/2008 Server, Exchange 2007
http://predellino.blogspot.com/

Back to comp.lang.python | Previous | Next | Find similar | Unroll thread


Thread

Re: dpkg status admin lewis <adminlewis@gmail.com> - 2012-03-18 17:43 +0100

csiph-web