From: ewt Date: Fri, 5 Jan 1996 18:19:48 +0000 (+0000) Subject: added search and removal functions X-Git-Tag: tznext/4.11.0.1.tizen20130304~11822 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=8d0f3b67e95fbe5077c94b99d061a363582e052e;p=tools%2Flibrpm-tizen.git added search and removal functions CVS patchset: 138 CVS date: 1996/01/05 18:19:48 --- diff --git a/lib/rpmlib.h b/lib/rpmlib.h index 39bcb52..e1e34dc 100644 --- a/lib/rpmlib.h +++ b/lib/rpmlib.h @@ -8,6 +8,7 @@ /* it shouldn't need these :-( */ #include "dbindex.h" #include "header.h" +#include "messages.h" /* these tags are for both the database and packages */ /* none of these can be 0 !! */ @@ -61,6 +62,11 @@ #define RPMFILE_CONFIG 1 #define RPMFILE_DOC 2 +#define INSTALL_REPLACEPKG 1 +#define INSTALL_REPLACEFILE 2 +#define INSTALL_TEST 4 +#define INSTALL_UPGRADE 8 + typedef struct rpmdb * rpmdb; int rpmdbOpen (char * prefix, rpmdb * dbp, int mode, int perms); @@ -74,9 +80,11 @@ unsigned int rpmdbNextRecNum(rpmdb db, unsigned int lastOffset); /* 0 at end */ Header rpmdbGetRecord(rpmdb db, unsigned int offset); -int rpmdbFindByFile(rpmdb db, char * filespec, - dbIndexSet * matches); - +int rpmdbFindByFile(rpmdb db, char * filespec, dbIndexSet * matches); +int rpmdbFindByGroup(rpmdb db, char * group, dbIndexSet * matches); +int rpmdbFindPackage(rpmdb db, char * name, dbIndexSet * matches); +int rpmRemovePackage(char * prefix, rpmdb db, unsigned int offset, int test); +int rpmdbRemove(rpmdb db, unsigned int offset, int tolerant); #endif