diff options
Diffstat (limited to 'perl-install/c/stuff.xs.pm')
-rw-r--r-- | perl-install/c/stuff.xs.pm | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/perl-install/c/stuff.xs.pm b/perl-install/c/stuff.xs.pm index 831b0c1c1..092b136d3 100644 --- a/perl-install/c/stuff.xs.pm +++ b/perl-install/c/stuff.xs.pm @@ -345,6 +345,31 @@ rpmtransAddPackage(rpmdep, header, key, update) RETVAL int +rpmtransRemovePackages(db, rpmdep, p) + void *db + void *rpmdep + char *p + CODE: + rpmdb d = db; + rpmTransactionSet r = rpmdep; + dbiIndexSet matches; + int i; + int count = 0; + if (!rpmdbFindByLabel(d, p, &matches)) { + for (i = 0; i < dbiIndexSetCount(matches); ++i) { + unsigned int recOffset = dbiIndexRecordOffset(matches, i); + if (recOffset) { + rpmtransRemovePackage(rpmdep, recOffset); + ++count; + } + } + RETVAL=count; + } else + RETVAL=0; + OUTPUT: + RETVAL + +int rpmdepOrder(order) void *order CODE: |