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
.