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


Groups > comp.lang.python > #21861 > unrolled thread

Re: dpkg status

Started byadmin lewis <adminlewis@gmail.com>
First post2012-03-18 17:43 +0100
Last post2012-03-18 17:43 +0100
Articles 1 — 1 participant

Back to article view | Back to comp.lang.python

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

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

#21861 — Re: dpkg status

Fromadmin lewis <adminlewis@gmail.com>
Date2012-03-18 17:43 +0100
SubjectRe: dpkg status
Message-ID<mailman.785.1332089034.3037.python-list@python.org>
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/

[toc] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web