summaryrefslogtreecommitdiffstats
path: root/perl-install/c/stuff.xs.pm
diff options
context:
space:
mode:
authorFrancois Pons <fpons@mandriva.com>1999-12-07 18:14:34 +0000
committerFrancois Pons <fpons@mandriva.com>1999-12-07 18:14:34 +0000
commit8c45c7d481e611752c996d4f543cf3a9f25b165a (patch)
tree09bf1a7b75d06be04a723a419b5ce487adceef99 /perl-install/c/stuff.xs.pm
parent27e6b80900b2b3a724e95be3192faecc60954427 (diff)
downloaddrakx-8c45c7d481e611752c996d4f543cf3a9f25b165a.tar
drakx-8c45c7d481e611752c996d4f543cf3a9f25b165a.tar.gz
drakx-8c45c7d481e611752c996d4f543cf3a9f25b165a.tar.bz2
drakx-8c45c7d481e611752c996d4f543cf3a9f25b165a.tar.xz
drakx-8c45c7d481e611752c996d4f543cf3a9f25b165a.zip
*** empty log message ***
Diffstat (limited to 'perl-install/c/stuff.xs.pm')
-rw-r--r--perl-install/c/stuff.xs.pm25
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: