Rollback functionality for apt-rpm

Gary L. Greene, Jr. greeneg at phoenuxos.com
Thu Nov 30 06:58:04 PST 2006


On Thursday 30 November 2006 07:33, Panu Matilainen wrote:
> On Wed, 29 Nov 2006, Vincent Danen wrote:
> > * Gary L. Greene, Jr. <greeneg at phoenuxos.com> [2006-11-29 09:08:29 -0500]:
> >>> 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.
> >>
> >> [snip]
> >>
> >> This looks like a rather interesting feature. While I can't speak for
> >> Panu, I can definitely see adding this to PhoeNUX OS' build... (Now if
> >> only we could get scriptlet postponing, looks like I have to add it as a
> >> lua hook for now :| )
>
> You can't really postpone scriptlets without breaking the rpm scriptlet
> ordering assumptions - eg %preun needs to run with the old
> package still installed, which is it is not when the transaction has
> completed. I don't even want to think about triggers in that scenario :)

wrong. If I cache the order of installation, I _can_ reorder them exactly how 
rpm expects it. and no, I'm not talking about postponing %pre or %preun 
scripts, in fact imo, those should occur before the file deletion transaction 
begins. The ones I want to specifically postpone are %post scriptlets. The 
others are less of a concern for me, as the %post scriptlets are causing 
issues with clean installations for our Phinos installer.

> > ooh!  ooh!  You mean like postponing all %post scripts and such until
> > after the entire transaction is complete?  Are you serious?  If you
> > implement something like that *please* share!  With Annvix (and Mandriva
> > and possibly other distros) we tend to restart apache on every new
> > module that gets installed, but if you upgrade apache to a new version,
> > that's a lot of modules and a lot of useless apache restarts.
> >
> > I've wanted a post-transaction handler in urpmi for ages but they never
> > seemed to get how useful it would be, so if you have eyes to implement
> > something like this in apt, I'm very very willing to use your work... =)
> > Sorry, I'd be willing to help, but I don't know the first thing about
> > lua and have very little time to learn.
>
> There are already three different ways to execute stuff post-transaction:
> 1) post-transaction scriptlets in rpm itself (at least later rpm versions)
> 2) post-transaction scripts in apt-rpm (set via RPM::Post-Invoke config
> item) 3) post-transaction Lua scripts in apt-rpm where there's quite a bit
> more information available about the transaction etc compared to 2)
>
> For a simple example of 3) check out the logger script in apt-rpm contrib:
> http://svn.laiskiainen.org/apt-rpm/trunk/contrib/log/
>
> Anyway, postponing scripts is going to require some distro-specific
> conventions in packaging, and when you're down that route ... you can
> already do that via various mechanisms. Especially with Lua hooks which
> have access to the actual transaction information, things like "was any
> package requiring apache restart installed/upgraded/removed in this
> transaction, do the restart if so" are quite feasible. Obviously those
> "service needs restart" etc items need to be stored someplace, and there's
> no readymade script-framework-whatever for it. But it's certainly possible
> (and if somebody writes something like that, it's more than welcome to the
> contrib script collection :)
>
>  	- Panu -
> _______________________________________________
> apt-rpm mailing list
> apt-rpm at lists.laiskiainen.org
> http://lists.laiskiainen.org/listinfo.cgi/apt-rpm-laiskiainen.org

-- 
Gary L. Greene, Jr.
Sent from: uriel.tolharadys.net
 09:54:54 up 1 day, 21:23,  8 users,  load average: 0.02, 0.05, 0.01
=========================================================================
Volunteer Developer for the PhoeNUX OS open source project
    See http://www.phoenuxos.com/ for more information
=========================================================================

Please avoid sending me Word or PowerPoint attachments.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 190 bytes
Desc: not available
URL: <http://lists.laiskiainen.org/pipermail/apt-rpm-laiskiainen.org/attachments/20061130/8d89a172/attachment-0003.pgp>


More information about the Apt-Rpm mailing list