11 #include <rpm/rpmtypes.h>
12 #include <rpm/rpmps.h>
57 #define RPMSENSE_SENSEMASK 15
60 #define RPMSENSE_TRIGGER \
61 (RPMSENSE_TRIGGERPREIN | RPMSENSE_TRIGGERIN | RPMSENSE_TRIGGERUN | RPMSENSE_TRIGGERPOSTUN)
63 #define _ALL_REQUIRES_MASK (\
65 RPMSENSE_SCRIPT_PRE | \
66 RPMSENSE_SCRIPT_POST | \
67 RPMSENSE_SCRIPT_PREUN | \
68 RPMSENSE_SCRIPT_POSTUN | \
69 RPMSENSE_SCRIPT_VERIFY | \
70 RPMSENSE_FIND_REQUIRES | \
74 RPMSENSE_POSTTRANS | \
78 #define _notpre(_x) ((_x) & ~RPMSENSE_PREREQ)
79 #define _INSTALL_ONLY_MASK \
80 _notpre(RPMSENSE_SCRIPT_PRE|RPMSENSE_SCRIPT_POST|RPMSENSE_RPMLIB|RPMSENSE_KEYRING|RPMSENSE_PRETRANS|RPMSENSE_POSTTRANS)
81 #define _ERASE_ONLY_MASK \
82 _notpre(RPMSENSE_SCRIPT_PREUN|RPMSENSE_SCRIPT_POSTUN)
84 #define isLegacyPreReq(_x) (((_x) & _ALL_REQUIRES_MASK) == RPMSENSE_PREREQ)
85 #define isInstallPreReq(_x) ((_x) & _INSTALL_ONLY_MASK)
86 #define isErasePreReq(_x) ((_x) & _ERASE_ONLY_MASK)
372 const char * N,
const char * EVR, rpmsenseFlags Flags);
rpmds rpmdsCurrent(rpmds ds)
Return a new dependency set of size 1 from the current iteration index.
int rpmdsNext(rpmds ds)
Return next dependency set iterator index.
int rpmdsMatchesDep(const Header h, int ix, const rpmds req, int nopromote)
Compare package provides dependencies from header with a single dependency.
rpmds rpmdsNewPool(rpmstrPool pool, Header h, rpmTagVal tagN, int flags)
Create and load a dependency set.
rpmTagVal rpmdsTagN(const rpmds ds)
Return current dependency type.
char * rpmdsNewDNEVR(const char *dspfx, const rpmds ds)
Return new formatted dependency string.
int rpmdsFind(rpmds ds, const rpmds ods)
Find a dependency set element using binary search.
int rpmdsMerge(rpmds *dsp, rpmds ods)
Merge a dependency set maintaining (N,EVR,Flags) sorted order.
int rpmdsIx(const rpmds ds)
Return dependency set index.
int rpmdsNVRMatchesDep(const Header h, const rpmds req, int nopromote)
Compare package name-version-release from header with a single dependency.
rpmds rpmdsLink(rpmds ds)
Reference a dependency set instance.
int rpmdsRpmlib(rpmds *dsp, const void *tblp)
Load rpmlib provides into a dependency set.
int rpmdsRpmlibPool(rpmstrPool pool, rpmds *dsp, const void *tblp)
Load rpmlib provides into a dependency set.
rpmsenseFlags rpmdsFlags(const rpmds ds)
Return current dependency flags.
rpmsenseFlags_e
Dependency Attributes.
void rpmdsNotify(rpmds ds, const char *where, int rc)
Notify of results of dependency match.
int rpmdsSetIx(rpmds ds, int ix)
Set dependency set index.
const char * rpmdsN(const rpmds ds)
Return current dependency name.
int rpmdsSearch(rpmds ds, rpmds ods)
Search a sorted dependency set for an element that overlaps.
struct rpmstrPool_s * rpmstrPool
int rpmdsAnyMatchesDep(const Header h, const rpmds req, int nopromote)
Compare package provides dependencies from header with a single dependency.
rpmds rpmdsThisPool(rpmstrPool pool, Header h, rpmTagVal tagN, rpmsenseFlags Flags)
Create, load and initialize a dependency for this header.
int rpmdsNoPromote(const rpmds ds)
Return current "Don't promote Epoch:" flag.
rpmds rpmdsThis(Header h, rpmTagVal tagN, rpmsenseFlags Flags)
Create, load and initialize a dependency for this header.
struct headerToken_s * Header
RPM header and data retrieval types.
int rpmdsCount(const rpmds ds)
Return dependency set count.
rpmds rpmdsSinglePool(rpmstrPool pool, rpmTagVal tagN, const char *N, const char *EVR, rpmsenseFlags Flags)
Create, load and initialize a dependency set of size 1.
rpmds rpmdsSingle(rpmTagVal tagN, const char *N, const char *EVR, rpmsenseFlags Flags)
Create, load and initialize a dependency set of size 1.
rpmds rpmdsFree(rpmds ds)
Destroy a dependency set.
rpmds rpmdsNew(Header h, rpmTagVal tagN, int flags)
Create and load a dependency set.
rpm_color_t rpmdsColor(const rpmds ds)
Return current dependency color.
int rpmdsCompare(const rpmds A, const rpmds B)
Compare two versioned dependency ranges, looking for overlap.
rpmds rpmdsInit(rpmds ds)
Initialize dependency set iterator.
const char * rpmdsEVR(const rpmds ds)
Return current dependency epoch-version-release.
const char * rpmdsDNEVR(const rpmds ds)
Return current formatted dependency string.
unsigned int rpmdsInstance(rpmds ds)
Return dependency header instance, ie whether the dependency comes from an installed header or not...
rpm_color_t rpmdsSetColor(const rpmds ds, rpm_color_t color)
Return current dependency color.
int rpmdsSetNoPromote(rpmds ds, int nopromote)
Set "Don't promote Epoch:" flag.