Debian Package Management – Is It Safe to Install Packages from Older Repository Versions?

aptdebiandependenciespackage-management

I'm currently running Debian testing (Wheezy) and am trying to get SCIM working. I want to install the scim-pinyin package, but there is no such package available in the testing repository, although there was one in the previous stable (Squeeze) repository. There is a copy of the package in unstable but not for my architecture (amd64).

Looking at the package versions, I notice that the version in the stable repositories is the same as that in unstable. This being the case, I have two questions:

  1. Is there any reason why I can't install a package from an older repository since I would assume that most Squeeze packages will probably have their dependencies met by the package versions currently in testing?

  2. What is the best way to achieve this? (Add the Squeeze repository to sources.list? Download the Squeeze package and install it manually?)

Best Answer

In this case, yes, it's possible and safe.

As debian keep dependences tree for each requested package.

At all there is still a risk that some libraries could not exist in two different version together in same installation, due to conflict (port reservation, device driver and so). In this kind of situation, apt would prevent you and ask for what to do. (Come back with another UL question in this case;-)

You could add squeeze.list to source.list.d

(Care! New versions of APT will ignore filename not ending by ".list".):

cat <<eof >/etc/apt/sources.list.d/squeeze.list
deb http://ftp.be.debian.org/debian/ squeeze-updates main contrib
deb-src http://security.debian.org/ squeeze/updates main contrib
eof

add a default directive to /etc/apt/apt.conf.d/

cat <<eof >/etc/apt/apt.conf.d/99squeeze
APT::Default-Release "wheezy";

Than use -t switch to apt-get for overriding default config:

apt-get -t squeeze install scim-pinyin
Related Question