FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian Development

 
 
LinkBack Thread Tools
 
Old 08-21-2008, 07:18 PM
Mark de Vries
 
Default Downloading packages with AptPkg (libapt-pkg-perl)

[ I'm not subscribed to the list, will look at archives, but if you ]
[ can please cc me in replies. Thanks ]

Hi,

I'm trying to use libapt-pkg-perl to [log story short] and then download
the packages but I can't find a way to get the actual URI to download
the .deb files.

The closest I've come is to try to parse/match values from an
AptPkg::Cache::PkgFile object and AptPkg::PkgRecords->lookup() results
into a URI but this seems like a big hack.

In contrast it's trivial to get URI to the .dsc, orig.tar.gz, diff.gz
files using AptPkg::Source. Why is there no such thing for binary (.deb)
files?

What would be the best way (using as little as possible besides AptPkg)
to get the URI to download a .deb?

Cheers,
Mark.



--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 08-21-2008, 07:51 PM
Neil Williams
 
Default Downloading packages with AptPkg (libapt-pkg-perl)

On Thu, 2008-08-21 at 21:18 +0200, Mark de Vries wrote:
> [ I'm not subscribed to the list, will look at archives, but if you ]
> [ can please cc me in replies. Thanks ]
>
> Hi,
>
> I'm trying to use libapt-pkg-perl to [log story short] and then download
> the packages but I can't find a way to get the actual URI to download
> the .deb files.

Take a look at the source of libcache-apt-perl - which provides an
Object-Oriented interface to the apt bindings and the source of
apt-cross which parses the URL out of the apt data.

That code is based on NorthernCross, developed for embedded usage.

--


Neil Williams
=============
http://www.data-freedom.org/
http://www.nosoftwarepatents.com/
http://www.linux.codehelp.co.uk/
 
Old 08-22-2008, 10:24 AM
Mark de Vries
 
Default Downloading packages with AptPkg (libapt-pkg-perl)

On Thu, 21 Aug 2008, Neil Williams wrote:


On Thu, 2008-08-21 at 21:18 +0200, Mark de Vries wrote:

[ I'm not subscribed to the list, will look at archives, but if you ]
[ can please cc me in replies. Thanks ]

Hi,

I'm trying to use libapt-pkg-perl to [log story short] and then download
the packages but I can't find a way to get the actual URI to download
the .deb files.


Take a look at the source of libcache-apt-perl - which provides an
Object-Oriented interface to the apt bindings and the source of
apt-cross which parses the URL out of the apt data.


Thanks, I took a look and it looks like it does magic simmilar to what
I've already been resorting too. I was still hoping there would be a more
direct way, like for the source packages.


Cheers,
Mark.



--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 

Thread Tools




All times are GMT. The time now is 08:48 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org