From 6afe3a8b72977c7d9cc1fedde960e3f2bf20e3a5 Mon Sep 17 00:00:00 2001 From: J. Ali Harlow Date: Thu, 9 Feb 2012 20:45:27 +0000 Subject: [PATCH] Add transaction barriers These allow packages to be installed and removed which have scripts that depend on each other when atomic transactions are involved. Note that yum supports pre, but not other requires flags. post will need similar support to the post scripts themselves pulling in the requires flags from the rpms. Likewise preun and postun will need similar handling to those scrips since the requires flags will need to be stored in the razor database. --- configure.ac | 4 +- librazor/razor.c | 218 +++++++++++++++++++++++++++++++++++++++++++++- librazor/razor.h | 17 ++++- src/import-yum.c | 6 +- src/main.c | 254 +++++++++++++++++++++++------------------------------- test/zip.spec | 1 + test/zsh.spec | 1 + 7 files changed, 344 insertions(+), 157 deletions(-) diff --git a/configure.ac b/configure.ac index 88911de..edf7b96 100644 --- a/configure.ac +++ b/configure.ac @@ -10,9 +10,9 @@ AM_MAINTAINER_MODE # # See http://sources.redhat.com/autobook/autobook/autobook_91.html#SEC91 for details # -LT_CURRENT=2 +LT_CURRENT=3 LT_REVISION=0 -LT_AGE=0 +LT_AGE=1 AC_SUBST(LT_CURRENT) AC_SUBST(LT_REVISION) AC_SUBST(LT_AGE) diff --git a/librazor/razor.c b/librazor/razor.c index d7684b4..45c9fef 100644 --- a/librazor/razor.c +++ b/librazor/razor.c @@ -1,7 +1,7 @@ /* * Copyright (C) 2008 Kristian Høgsberg * Copyright (C) 2008 Red Hat, Inc - * Copyright (C) 2009-2011 J. Ali Harlow + * Copyright (C) 2009-2012 J. Ali Harlow * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -992,6 +992,32 @@ add_action(enum razor_diff_action action, } } +/* + * Does have a requirement for