aboutsummaryrefslogtreecommitdiffstats
path: root/URPM.xs
diff options
context:
space:
mode:
authorFrancois Pons <fpons@mandriva.com>2002-07-22 17:53:25 +0000
committerFrancois Pons <fpons@mandriva.com>2002-07-22 17:53:25 +0000
commit8231d7aa523b8514d9a931654dc4d9952492c7f0 (patch)
tree9806991006405aa58d23de1c2c037e022f9ac7a0 /URPM.xs
parent7751516aff4ed7abbaa5eb0f4585ac6567167189 (diff)
downloadperl-URPM-8231d7aa523b8514d9a931654dc4d9952492c7f0.tar
perl-URPM-8231d7aa523b8514d9a931654dc4d9952492c7f0.tar.gz
perl-URPM-8231d7aa523b8514d9a931654dc4d9952492c7f0.tar.bz2
perl-URPM-8231d7aa523b8514d9a931654dc4d9952492c7f0.tar.xz
perl-URPM-8231d7aa523b8514d9a931654dc4d9952492c7f0.zip
0.20-1mdk0.20
Diffstat (limited to 'URPM.xs')
-rw-r--r--URPM.xs6
1 files changed, 2 insertions, 4 deletions
diff --git a/URPM.xs b/URPM.xs
index cbe081f..b87f7d5 100644
--- a/URPM.xs
+++ b/URPM.xs
@@ -1826,6 +1826,7 @@ Db_create_transaction(db, prefix="/")
char *prefix
CODE:
if ((RETVAL = calloc(1, sizeof(struct s_Transaction))) != NULL) {
+ /* rpmSetVerbosity(RPMMESS_DEBUG); TODO check remove and add in same transaction */
RETVAL->db = db;
RETVAL->ts = rpmtransCreateSet(db, prefix);
}
@@ -1875,10 +1876,7 @@ Trans_remove(trans, name)
mi = rpmdbInitIterator(trans->db, RPMDBI_LABEL, name, 0);
while (h = rpmdbNextIterator(mi)) {
unsigned int recOffset = rpmdbGetIteratorOffset(mi);
- if (recOffset) {
- rpmtransRemovePackage(trans->ts, recOffset);
- ++count;
- }
+ count += recOffset != 0 && rpmtransRemovePackage(trans->ts, recOffset) == 0;
}
rpmdbFreeIterator(mi);
RETVAL=count;