From 8c45c7d481e611752c996d4f543cf3a9f25b165a Mon Sep 17 00:00:00 2001 From: Francois Pons Date: Tue, 7 Dec 1999 18:14:34 +0000 Subject: *** empty log message *** --- perl-install/c/stuff.xs.pm | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) (limited to 'perl-install/c') 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 @@ -344,6 +344,31 @@ rpmtransAddPackage(rpmdep, header, key, update) OUTPUT: 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 -- cgit v1.2.1