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

Re: [APT] rollback functionality for apt



On Tue, Dec 26, 2006 at 05:49:00PM +0000, João Abecasis wrote:
> Hi!
Hi,
 
> I'm a developer with Caixa Mágica (the portuguese distribution of
> Linux!). We are using a modified apt-rpm as our main package manager.
> Our changes amount to a "rollback" functionality, which we're trying
> to integrate upstream in apt-rpm. I've now ported the patch to
> Debian's apt codebase and I'd like to hear your feedback on the patch
> and to understand what it'd take to merge the code, in case you're
> interested. Also, if there's a better venue for this discussion I'd
> appreciate if you can point me to it. Thanks.
> 
> You will find the original thread for our submission to apt-rpm at
> 
>    http://lists.laiskiainen.org/pipermail/apt-rpm-laiskiainen.org/2006-November/000542.html
> 
> A log of apt-get transactions (install, remove, ...) is maintained.
> This allows transactions to be reviewed and individually rolled back.
> A backup of configuration files is also kept locally, while we rely on
> the apt repository to provide the non-mutating files. Of course this
> requires that old versions of relevant packages be available in the
> repository for proper rollback functionality. Another possibility that
> has been proposed is to (optionally) keep copies of all files locally.
[..]
 
Thanks for your patch! Rollback is a really useful feature and I would
love to see it in apt. 

One problem with it is that the deb package maintainer scripts
(postinst/preinst/postrm/prerm etc) can modify anything one the system
(my understanding is that this is the case for rpm scripts as
well). So in the general case a rollback would have to take a snapshot
of the system as e.g. a package could rewrite /etc/fstab to support
mount-by-UUID or a package could convert its (internal) database to a
new format during the upgrade. From my understanding of the patch, a
rollback would install the old packages that can't read the updated
database format and the application would no longer work. This is
certainly a corner case, but it seems to be happening often enough to
be a real concern.

This is probably something that needs to be adressed by policy and not
by technical means. So I would be interessted if this is a issue on
rpm based systems too and/or if there is a policy that helps
preventing the problem there.

Cheers,
 Michael



Reply to: