20 #ifndef __RPM_HELPER__ 21 #define __RPM_HELPER__ 27 #include <rpm/rpmdb.h> 28 #include <rpm/rpmfi.h> 29 #include <rpm/rpmlib.h> 30 #include <rpm/rpmts.h> 31 #include <rpm/rpmmacro.h> 32 #include <rpm/rpmlog.h> 33 #include <rpm/header.h> 36 #include "common/util.h" 42 pthread_mutex_t mutex;
45 #ifndef HAVE_HEADERFORMAT 46 # define HAVE_LIBRPM44 1 47 # define headerFormat(_h, _fmt, _emsg) headerSprintf((_h),( _fmt), rpmTagTable, rpmHeaderFormats, (_emsg)) 50 #ifndef HAVE_RPMFREECRYPTO 51 # define rpmFreeCrypto() while(0) 54 #ifndef HAVE_RPMFREEFILESYSTEMS 55 # define rpmFreeFilesystems() while(0) 58 #define RPM_MUTEX_LOCK(mutex_ptr) \ 60 int prev_cancel_state = -1; \ 61 if (pthread_mutex_lock(mutex_ptr) != 0) { \ 62 dE("Can't lock mutex"); \ 65 pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, &prev_cancel_state); \ 68 #define RPM_MUTEX_UNLOCK(mutex_ptr) \ 70 int prev_cancel_state = -1; \ 71 if (pthread_mutex_unlock(mutex_ptr) != 0) { \ 72 dE("Can't unlock mutex. Aborting..."); \ 75 pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, &prev_cancel_state); \ 79 int rpmErrorCb (rpmlogRec rec, rpmlogCallbackData data);
85 #define DISABLE_PLUGINS(ts) rpmtsSetFlags(ts, RPMTRANS_FLAG_NOPLUGINS) 87 #define DISABLE_PLUGINS(ts) rpmDefineMacro(NULL,"__plugindir \"\"", 0); 94 void rpmLibsPreload(
void);
Definition: rpm-helper.h:40
oscap debug helpers private header