0

Overview

I have a program that generates an OS image. This image is later loaded onto a physical system such that when the system boots up, it is ready to go with all the software it needs pre-installed. The code that generates this image needs to be able to run over and over and produce the same result each time. Part of the job is to install packages into the generated image using apt-get.

Issue at Hand

Simply specifying something like apt-get install less is not good enough because the official published version of the less package might change over time, causing my generated image to be different.

Attempted Solution

I tried to get around this by using a command like apt-get install less=487-0.1, which specifies the exact version of the package that I want. I gathered up all the versions of all the packages I was using via apt-cache policy and "locked" all the versions by specifying them in the install commands.

Problem

Today I got this message: E: Version '487-0.1' for 'less' was not found. So it seems that even though I specified the version, and I don't want to get any updates, apt-get is not allowing me to use this old version anymore.

Desired Outcome

I want to be able to install the same version of all the packages I want over and over again into my generated image no matter if there are newer published versions on apt-get.

1 Answer 1

0

Apt looks through the repositories defined in its sources.list file, likely stored at /etc/apt/sources.list for available package versions. The way to get the version you want once those official/included repositories no longer carry it is to find (or create) a repository that DOES have the version(s) you want.

How to add a new repository source may depend on your OS, so look that up.

You may also consider creating your own repository to more completely control this, which I think is probably a good idea given what you've told us so far.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .