Re: Downloading packages with AptPkg (libapt-pkg-perl)

2008-08-22 Thread Mark de Vries

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 [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Downloading packages with AptPkg (libapt-pkg-perl)

2008-08-21 Thread Mark de Vries

[ 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 [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: Downloading packages with AptPkg (libapt-pkg-perl)

2008-08-21 Thread Neil Williams
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/




signature.asc
Description: This is a digitally signed message part