Rollback functionality for apt-rpm

João Abecasis jpra at caixamagica.pt
Tue Jan 30 04:37:21 PST 2007


Hi everyone!

I'm writing this to report on the state of affairs wrt to the rollback
functionality. We are currently maintaining two ports of the patch I
initially submitted here, one for apt-rpm and another for Debian's
apt. To that end, I've set up two branches in our svn repository,
containing patched versions of the upstream trees, respectively
apt-0.5.15lorg3.2 and apt-0.6.46.4.

The svn branches can be found at:

    * http://aptrpm.caixamagica.pt/repo/aptrpm/branches/rollback@apt-rpm
    * http://aptrpm.caixamagica.pt/repo/aptrpm/branches/rollback@apt

(after creating the branches I realized the use of '@' in the folder
name was unfortunate because the svn client interprets that as a
repository revision. This can be worked around in the command line
either by substituting the @ for %40 or by adding an explicit
revision, e.g. @HEAD, to the URLs above.)

And browsed at:

    * http://aptrpm.caixamagica.pt/trac/browser/aptrpm/branches/rollback@apt-rpm
    * http://aptrpm.caixamagica.pt/trac/browser/aptrpm/branches/rollback@apt

Panu Matilainen wrote:
> - You certainly do NOT want to store rollback database in /var/cache/apt,
> that data is supposed to be just a cache that can be recreated at any time
> from information available elsewhere. 'rm -f /var/cache/apt/*.bin' is
> a common method for cleaning up the package cache if it has gotten screwed
> somehow. The package data can be restored from package indexes, the
> rollback history not. So I'd suggest moving it to /var/lib/apt (or rather,
> Dir::State) instead.

This has been changed in svn. A new option has also been added to the
configure scripts, such that rollback functionality is now disabled by
default. It can be enabled with,

    ./configure --enable-rollback

Disabling rollback also removes dependencies on sqlite3 libraries. For
the time being, this was accomplished by locally defining stub
versions of the sqlite functions in use. A better option, for the
future, is to separate the database access functionality from
pkgRollbackManager, allowing different database implementations (at
least a dummy and an sqlite3 would be implemented in this scenario).

I appreciate any comments and suggestions you may have.

Best regards,


João Abecasis



More information about the Apt-Rpm mailing list