diff options
author | Francois Pons <fpons@mandriva.com> | 2002-07-22 17:53:25 +0000 |
---|---|---|
committer | Francois Pons <fpons@mandriva.com> | 2002-07-22 17:53:25 +0000 |
commit | 8231d7aa523b8514d9a931654dc4d9952492c7f0 (patch) | |
tree | 9806991006405aa58d23de1c2c037e022f9ac7a0 /URPM.xs | |
parent | 7751516aff4ed7abbaa5eb0f4585ac6567167189 (diff) | |
download | perl-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.xs | 6 |
1 files changed, 2 insertions, 4 deletions
@@ -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; |