10 #include <sys/types.h>
15 #define _RPMNS_INTERNAL
38 #if defined(_RPMDS_INTERNAL)
65 int (*EVRparse) (
const char *evrstr,
EVR_t evr);
66 int (*EVRcmp) (
const char *a,
const char *
b);
83 #if defined(__LCLINT__)
90 #if defined(_RPMPRCO_INTERNAL)
126 #if defined(__LCLINT__)
150 #define rpmdsUnlink(_ds, _msg) \
151 ((rpmds)rpmioUnlinkPoolItem((rpmioItem)(_ds), _msg, __FILE__, __LINE__))
162 #define rpmdsLink(_ds, _msg) \
163 ((rpmds)rpmioLinkPoolItem((rpmioItem)(_ds), _msg, __FILE__, __LINE__))
173 #define rpmdsFree(_ds) \
174 ((rpmds)rpmioFreePoolItem((rpmioItem)(_ds), __FUNCTION__, __FILE__, __LINE__))
368 int (*EVRparse)(
const char *everstr,
EVR_t evr))
379 int (*EVRcmp)(
const char *a,
const char *
b))
617 int (*add) (
void * context,
rpmds ds),
void * context)
620 #define RPMELF_FLAG_SKIPPROVIDES 0x1
621 #define RPMELF_FLAG_SKIPREQUIRES 0x2
rpmuint32_t rpmdsSetRefs(const rpmds ds, rpmuint32_t refs)
Set current dependency file refs.
int rpmdsNext(rpmds ds)
Return next dependency set iterator index.
int rpmdsNInclude(const rpmds ds)
Return no.
int rpmdsNegateRC(const rpmds ds, int rc)
Negate return code for negated comparisons.
enum nsType_e nsType
Dependency types.
static int rpmdsPrint(rpmds ds, FILE *fp)
Print current dependency set contents.
struct rpmPRCO_s * rpmPRCO
Container for commonly extracted dependency set(s).
int rpmdsFind(rpmds ds, const rpmds ods)
Find a dependency set element using binary search.
evrFlags rpmdsFlags(const rpmds ds)
Return current dependency flags.
void * rpmdsSetEVRcmp(rpmds ds, int(*EVRcmp)(const char *a, const char *b))
Set EVR comparison function.
static int rpmdsPrintClosure(rpmds P, rpmds R, FILE *fp)
Check Provides: against Requires: and print closure results.
int rpmdsPipe(rpmds *dsp, rpmTag tagN, const char *cmd)
Load provides from a pipe into a dependency set.
int rpmdsMerge(rpmds *dsp, rpmds ods)
Merge a dependency set maintaining (N,EVR,Flags) sorted order.
int rpmdsSysinfo(rpmPRCO PRCO, const char *fn)
Load sysinfo dependencies into a dependency set.
int rpmdsIx(const rpmds ds)
Return dependency set index.
int rpmdsLdconfig(rpmPRCO PRCO, const char *fn)
Load /etc/ld.so.cache provides into a dependency set.
void * rpmdsExclude(const rpmds ds)
Return dependency exclude patterns.
rpmPRCO rpmdsNewPRCO(Header h)
Create dependency set(s) container.
struct rpmps_s * rpmps
Transaction problems found while processing a transaction set/.
int rpmdsNVRMatchesDep(const Header h, const rpmds req, int nopromote)
Compare package name-version-release from header with a single dependency.
int rpmdsGetconf(rpmds *dsp, const char *path)
Load getconf provides into a dependency set.
rpmds rpmdsNew(Header h, rpmTag tagN, int flags)
Create and load a dependency set.
char * rpmdsNewDNEVR(const char *dspfx, rpmds ds)
Return new formatted dependency string.
rpmuint32_t rpmdsRefs(const rpmds ds)
Return current dependency file refs.
rpmPRCO rpmdsFreePRCO(rpmPRCO PRCO)
Free dependency set(s) container.
rpmint32_t rpmdsSetResult(const rpmds ds, rpmint32_t result)
Set current dependency comparison result.
enum evrFlags_e evrFlags
Dependency Attributes.
rpmds rpmdsSingle(rpmTag tagN, const char *N, const char *EVR, evrFlags Flags)
Create, load and initialize a dependency set of size 1.
void rpmdsNotify(rpmds ds, const char *where, int rc)
Notify of results of dependency match.
#define rpmdsLink(_ds, _msg)
int rpmdsSetIx(rpmds ds, int ix)
Set dependency set index.
Structures and prototypes used for an "rpmps" problem set.
fprintf(stderr,"--> %s(%p,%p,%p) sig %p sigp %p\n", __FUNCTION__, dig, t, rsactx, sig, sigp)
int rpmdsSearch(rpmds ds, rpmds ods)
Search a sorted dependency set for an element that overlaps.
int rpmdsCpuinfo(rpmds *dsp, const char *fn)
Load /proc/cpuinfo provides into a dependency set.
#define rpmdsUnlink(_ds, _msg)
rpmds rpmdsFromPRCO(rpmPRCO PRCO, rpmTag tagN)
Retrieve a dependency set from container.
int rpmdsAnyMatchesDep(const Header h, const rpmds req, int nopromote)
Compare package provides dependencies from header with a single dependency.
rpmTag rpmdsTagN(const rpmds ds)
Return current dependency type.
int rpmdsMatch(const rpmds A, rpmds B)
Compare A against every member of B, looking for 1st match.
time_t rpmdsBT(const rpmds ds)
Return dependency build time.
void * rpmdsSetEVRparse(rpmds ds, int(*EVRparse)(const char *evrstr, EVR_t evr))
const char * rpmdsNewN(rpmds ds)
Return N string, expanded if necessary.
void * rpmdsInclude(const rpmds ds)
Return dependency include patterns.
int rpmdsNoPromote(const rpmds ds)
Return current "Don't promote Epoch:" flag.
const char * rpmdsType(const rpmds ds)
Return current dependency type name.
int rpmdsCount(const rpmds ds)
Return dependency set count.
const char * _sysinfo_path
const char * rpmdsA(const rpmds ds)
Return current dependency arch.
int rpmdsMergePRCO(void *context, rpmds ds)
Merge provides/requires/conflicts/obsoletes dependencies.
rpmint32_t rpmdsResult(const rpmds ds)
Return current dependency comparison result.
rpmuint32_t rpmdsSetColor(const rpmds ds, rpmuint32_t color)
Set current dependency color.
struct rpmds_s * rpmds
Dependency tag sets from a header, so that a header can be discarded early.
static int rpmdsPrintResults(rpmds ds, FILE *fp)
Print current dependency set results.
const char * _cpuinfo_path
nsType rpmdsNSType(const rpmds ds)
Return dependency class type.
int rpmdsNExclude(const rpmds ds)
Return no.
int rpmdsCompare(const rpmds A, const rpmds B)
Compare two versioned dependency ranges, looking for overlap.
rpmds rpmdsInit(rpmds ds)
Initialize dependency set iterator.
int rpmdsRpmlib(rpmds *dsp, void *tblp)
Load rpmlib provides into a dependency set.
rpmuint32_t rpmdsColor(const rpmds ds)
Return current dependency color.
const char * rpmdsEVR(const rpmds ds)
Return current dependency epoch-version-release.
const char * rpmdsDNEVR(const rpmds ds)
Return current formatted dependency string.
int rpmdsUname(rpmds *dsp, const struct utsname *un)
static void
Print copy of spec file, filling in Group/Description/Summary from specspo.
int rpmdsELF(const char *fn, int flags, int(*add)(void *context, rpmds ds), void *context)
Return a soname dependency constructed from an elf string.
int
Save source and expand field into target.
const char * rpmdsN(const rpmds ds)
Return current dependency name.
rpmds rpmdsThis(Header h, rpmTag tagN, evrFlags Flags)
Create, load and initialize a dependency for this header.
time_t rpmdsSetBT(const rpmds ds, time_t BT)
Set dependency build time.
void rpmdsProblem(rpmps ps, const char *pkgNEVR, const rpmds ds, const fnpyKey *suggestedKeys, int adding)
Report a Requires: or Conflicts: dependency problem.
int rpmdsSetNoPromote(rpmds ds, int nopromote)
Set "Don't promote Epoch:" flag.
static PyObject *rpmds ds