[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Retrieving latest version of a file for a specified distribution



Hi,

Given a file name (e.g. "/etc/dhclient.conf") and a distribution name
(e.g. "etch"), I would like to programmatically retrieve the file's
latest version for that distribution.

If the local machine is running the distribution in question, the start
is probably relatively simple. I can find out which package the file
belongs to (e.g. "dhcp-client") using dpkg -S. I could then download the
file with apt-get -d install (But there probably is a more suitable
utility, as I would like to download it to a temporary directory.) And
finally, I can extract the file I need by using dpkg-deb --fsys-tarfile.

But what if the the local machine is running a different distribution
(e.g. "lenny")? And how do I make sure I get the "latest" version
distributed, including security updates?

Hoping for your help,
Malte





Reply to: