Rollback functionality for apt-rpm

João Abecasis jpra at caixamagica.pt
Wed Nov 29 04:49:07 PST 2006


Hi everyone!

I'm a developer with Caixa Mágica (the portuguese distribution of
Linux!), where we use a customized version of apt-rpm as our main
package manager. Our customizations amount to a "rollback" feature,
which we'd like to contribute back into (your) mainline. To get the
ball rolling, I've prepared a patch against current svn (revision 272)
and hopefully, it's attached to this message... I'd like to hear your
feedback on the patch and to understand what it'll take to merge the
code.

To apply the patch,

    svn checkout -r 272 http://svn.laiskiainen.org/apt-rpm/trunk apt-rpm
    cd apt-rpm
    patch -p0 < ../rollback-laiskiainen.org\[272\].diff

Then, compile with the usual

    autoreconf
    ./configure
    make
    make install (optional)

So what is this rollback feature, anyway? Basically we keep an
activity log of apt-get transactions (install, remove, upgrade, etc.)
and it allows transactions to be rolled back by ID. A backup of
configuration files is kept on upgrades so they too can be rolled
back. This feature was originally developed by David Pinheiro as part
of the EDOS project (http://edos-project.org). David is no longer
working with us, but he is always at the distance of an e-mail (I'm
CC'ing him, btw).

Here's some sample output, taken from my system, checking the rollback history

    > apt-get rollback-hist
    Reading Package Lists...
    Building Dependency Tree...
    +---------------------------------------------------------+
    Transaction ID: 1
    Packages:
        ncurses(5.5-16)   INSTALL
        bash(3.1-24.3)   INSTALL
        filesystem(10.1-5)   INSTALL
        glibc(2.4-31.1)   INSTALL
        readline(5.1-22)   INSTALL

[...snipped...]

    +---------------------------------------------------------+
    Transaction ID: 69
    Packages:
        flash-player(9.0.21.55-1.0 => 9.0.21.78-1.0)   UPGRADE
    +---------------------------------------------------------+
    Transaction ID: 70
    Packages:
        nano(1.3.10-10)   INSTALL
    +---------------------------------------------------------+
    Transaction ID: 71
    Packages:
        epiphany(1.8.5-14)   INSTALL
    +---------------------------------------------------------+
    >

and rolling back that nano install, I much prefer vim ;-)

    > apt-get rollback 70
    Reading Package Lists... Done
    Building Dependency Tree... Done
    Starting Rollback
    The following packages will be REMOVED:
      nano
    0 upgraded, 0 newly installed, 1 removed and 0 not upgraded.
    Need to get 0B of archives.
    After unpacking 1217kB disk space will be freed.
    Do you want to continue? [Y/n] y
    Committing changes...
    Preparing...
########################################### [100%]
    Removing / Cleaning up...
       1:nano.i586
########################################### [100%]
    Done.
    >

The website for our fork can be found at http://aptrpm.caixamagica.pt.

Best regards,


João Abecasis
-------------- next part --------------
A non-text attachment was scrubbed...
Name: rollback-laiskiainen.org[272].diff
Type: text/x-patch
Size: 39834 bytes
Desc: not available
URL: <http://lists.laiskiainen.org/pipermail/apt-rpm-laiskiainen.org/attachments/20061129/d8a2db2b/attachment-0002.bin>


More information about the Apt-Rpm mailing list