Hi,
In case this is still an issue:
Answering in reverse:
On Wednesday 27 February 2013, jdtangney wrote:
> But Debian packages don't really support multiple versions so we can't just
> install both version 1.1 and 1.2 in separate directories and switch
> between them.
You just can't have multiple versions installed at the same time, but you can
install/reinstall. In theory it is similar to repointing a link and running
some scripts. Maybe you're misinterpreting what "package" and "version" means
as it is impossible to have multiple versions of the same package since they
will conflict by definition.
If your packages don't conflict with each other and you don't need only one
installed at any time (i.e. other packages don't depend on just one) then you
don't have a single package but multiple packages. The version-in-package-name
will work here as others suggested. Just like how Debian handle libraries.
You can also have a single package with all your "current" versions if that's
what you want and manage just that package. Then you can add/remove directory
trees from that as you see fit.
> We use Debian packages to deploy our services to our CI, QA and prod
> environments. Each release consists of multiple packages. We need to
> provide the ability to roll back/forward in production across several
> releases in a very small time window, ideally something like switching a
> symlink between release.
(Is this a repository problem or an installation problem?)
If you do have multiple versions in the repository then apt can be asked to
install a specific version with (e.g. apt-get -s install ssh=1:6.0p1-4) and
this can be also handled by puppet.
If your problem has to do with the dependencies then you'll have to use strict
dependencies between your package sets. Try using equality within the control
file. Then you should be able to rollback by installing the head package of a
specific version which should also bring all the dependencies to their
required version.
If your problem is the repository then I believe it gets a bit more trickier.
Here's a guess: If your current method for creating the repo does not support
multiple versions you can manage your own repo by copying to the pool from the
master repo (you current one) without deleting old versions and then using -m
with dpkg-scanpackages.
In short, if your problem is the repository then the solution depends on the
way you're managing it. Any pool based method may support multiple versions
and most probably non-pool based as well. I believe dak is able to do that and
much more but it's also a huge pain to fully setup and requires some crystal
ball skills.
Cheers,
Stefanos