Showing posts with label apt. Show all posts
Showing posts with label apt. Show all posts

Sunday, July 06, 2008

Configuring APT

I've been using APT for the past couple of years to update my Fedora system from releases 5 to 9.

There is always this $(VERSION) variable that I did not know how to set. Recently, apt-get update has been failing to get some repomd (repository meta-data) files, and I realized the $(VERSION) was expanding to 9.90.

Of course the repositories did not have a directory called 9.90, there was 7, 8, 9, but no decimals.

Getting off my lazy bum to do some research at long last (I was replacing $(VERSION) with 9 manually), I found http://apt-rpm.org/options.shtml which documented two variables in the APT:: namespace - DistroVersion and DistroVerPkg.

In the first place, this information should have been more up-front and visible in the documentation. Googling "apt-get $(VERSION)" didn't turn up any good hits at all.

DistroVerPkg is the default value for deriving $(VERSION), and it has a value of "fedora-release" (/etc/fedora-release). This file looks like this:
Fedora release 9.90.1 (Rawhide)
This causes $(VERSION) to expand by default to 9.90, since DistroVersion is not defined.

Hence, in my /etc/apt.conf, I've added the following line:

APT::DistroVersion "9";

which expands $(VERSION) to the correct value.