[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: utility to downgrade a package with its dependencies?

On 2012-01-05 16:38:04 +0000, Darac Marjal wrote:
> On Thu, Jan 05, 2012 at 03:43:22PM +0100, Vincent Lefevre wrote:
> > For Debian/unstable:
> > 
> > Does there exist a utility to downgrade a package with its
> > dependencies and reverse-dependencies? The old packages would
> > be taken from /var/cache/apt/archives, and the tool should be
> > able to find automatically which packages/versions are needed
> > to satisfy all the dependencies (with minimum change) and
> > should be able to handle virtual packages.
> Typically there isn't.
> The big problem with rolling back packages is the maintainer scripts
> (post-install, pre-remove etc). These are generally written in such a
> way as to facilitate UPgrades.

I know, but I assumed that here, there weren't such problems
(this was more or less Xorg downgrades to detect when a bug
appeared, and this consists mostly of libraries and drivers,
so that the maintainer scripts probably do almost nothing).

> I was in this situation myself a while ago and decided that the best
> solution was as follows:
> 	* Before upgrading, take an LVM snapshot (this, of course, assumes
> 	  you ARE on LVM).
> 	* Perform the package upgrade and then test the new version.
> 	* If happy, delete the snapshot (this is a cheap operation)
> 	* If unhappy, rollback the snapshot (which takes a bit of time, but
> 	  gets you back to where you were).

The problem here is that I didn't find the bug immediately.
Fortunately I commit the "dpkg -l" output to my personal SVN
repository from time to time. So, this helped a bit: I grepped
xserver related packages, and wrote a script to convert the
output to a list of .deb files. However I had to do various
manual corrections. I had to go back to the 2010-10-10 version
to make the bug disappear.

Vincent Lefèvre <vincent@vinc17.net> - Web: <http://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <http://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / Arénaire project (LIP, ENS-Lyon)

Reply to: