1.1 --- a/librazor/transaction.c Thu Nov 10 10:35:21 2011 +0000
1.2 +++ b/librazor/transaction.c Fri Mar 23 20:24:09 2012 +0000
1.3 @@ -1,7 +1,7 @@
1.4 /*
1.5 * Copyright (C) 2008 Kristian Høgsberg <krh@redhat.com>
1.6 * Copyright (C) 2008 Red Hat, Inc
1.7 - * Copyright (C) 2009, 2011 J. Ali Harlow <ali@juiblex.co.uk>
1.8 + * Copyright (C) 2009, 2011, 2012 J. Ali Harlow <ali@juiblex.co.uk>
1.9 *
1.10 * This program is free software; you can redistribute it and/or modify
1.11 * it under the terms of the GNU General Public License as published by
1.12 @@ -31,7 +31,6 @@
1.13 #include <fcntl.h>
1.14 #include <errno.h>
1.15 #include <ctype.h>
1.16 -#include <fnmatch.h>
1.17 #include <assert.h>
1.18
1.19 #include "razor-internal.h"
1.20 @@ -134,10 +133,10 @@
1.21
1.22 pkgs = ts->set->packages.data;
1.23 i = package - pkgs;
1.24 - if (ts->packages[i] == TRANS_PACKAGE_PRESENT)
1.25 + if (ts->packages[i] & TRANS_PACKAGE_PRESENT)
1.26 return;
1.27
1.28 - ts->packages[i] = TRANS_PACKAGE_PRESENT;
1.29 + ts->packages[i] |= TRANS_PACKAGE_PRESENT;
1.30
1.31 prop = list_first(&package->properties, &ts->set->property_pool);
1.32 while (prop) {
1.33 @@ -156,10 +155,10 @@
1.34
1.35 pkgs = ts->set->packages.data;
1.36 i = package - pkgs;
1.37 - if (ts->packages[i] == 0)
1.38 + if (!(ts->packages[i] & TRANS_PACKAGE_PRESENT))
1.39 return;
1.40
1.41 - ts->packages[i] = 0;
1.42 + ts->packages[i] &= ~TRANS_PACKAGE_PRESENT;
1.43
1.44 prop = list_first(&package->properties, &ts->set->property_pool);
1.45 while (prop) {
1.46 @@ -547,6 +546,9 @@
1.47 while (razor_package_iterator_next(&pkg_iter, &pkg,
1.48 RAZOR_DETAIL_NAME, &name,
1.49 RAZOR_DETAIL_LAST)) {
1.50 + if (!(trans->system.packages[pkg - spkgs] & TRANS_PACKAGE_PRESENT))
1.51 + continue;
1.52 +
1.53 #if 0
1.54 fprintf(stderr, "updating %s because %s %s %s "
1.55 "isn't satisfied\n",
1.56 @@ -699,6 +701,7 @@
1.57 RAZOR_DETAIL_LAST)) {
1.58 if (!(trans->system.packages[p - spkgs] & TRANS_PACKAGE_UPDATE))
1.59 continue;
1.60 + trans->system.packages[p - spkgs] &= ~TRANS_PACKAGE_UPDATE;
1.61
1.62 if (!prop_iter_seek_to(&ppi, RAZOR_PROPERTY_PROVIDES, name))
1.63 continue;
1.64 @@ -740,6 +743,7 @@
1.65 RAZOR_DETAIL_LAST)) {
1.66 if (!(trans->upstream.packages[p - upkgs] & TRANS_PACKAGE_UPDATE))
1.67 continue;
1.68 + trans->upstream.packages[p - upkgs] &= ~TRANS_PACKAGE_UPDATE;
1.69
1.70 if (prop_iter_seek_to(&spi, RAZOR_PROPERTY_PROVIDES, name))
1.71 remove_matching_providers(trans,