rpm
5.4.14
|
![]() |
Files | |
file | rpmds.c |
file | rpmds.h |
Structure(s) used for dependency tag sets. | |
file | rpmlib.h |
In Memoriam: Steve Taylor stayl was here, now he's not. or@r edhat .com | |
file | rpmevr.c |
file | rpmds.c |
Typedefs | |
typedef struct rpmds_s * | rpmds |
Dependency tag sets from a header, so that a header can be discarded early. More... | |
typedef struct rpmPRCO_s * | rpmPRCO |
Container for commonly extracted dependency set(s). More... | |
Functions | |
int | dpkgEVRcmp (const char *a, const char *b) |
Segmented string compare. More... | |
int | dpkgEVRparse (const char *evrstr, EVR_t evr) |
Split EVR string into epoch, version, and release components. More... | |
int | dpkgEVRcompare (const EVR_t a, const EVR_t b) |
Compare EVR containers. More... | |
EVR_t | rpmEVRnew (uint32_t Flags, int initialize) |
Create a new EVR container. More... | |
int | rpmEVRcmp (const char *a, const char *b) |
Segmented string compare. More... | |
int | rpmEVRparse (const char *evrstr, EVR_t evr) |
Split EVR string into epoch, version, and release components. More... | |
int | rpmEVRcompare (const EVR_t a, const EVR_t b) |
Compare EVR containers for equality. More... | |
int | rpmEVRoverlap (EVR_t a, EVR_t b) |
Compare EVR containers for overlap. More... | |
nsType | rpmnsArch (const char *str) |
Is string a known arch suffix? More... | |
nsType | rpmnsProbe (const char *s, size_t slen) |
Is string a known probe namespace? More... | |
nsType | rpmnsClassify (const char *s, size_t slen) |
Classify a string as a dependency type. More... | |
int | rpmnsParse (const char *str, rpmns ns) |
Expand and split NS(N).A string into namespace, name and arch components. More... | |
Variables | |
int | _rpmds_debug |
const char * | _sysinfo_path |
int | _rpmds_nopromote |
int(* | rpmvercmp )(const char *a, const char *b) |
Segmented string compare vector. More... | |
RPMDS | |
rpmds | rpmdsUnlink (rpmds ds, const char *msg) |
Unreference a dependency set instance. More... | |
rpmds | rpmdsLink (rpmds ds, const char *msg) |
Reference a dependency set instance. More... | |
rpmds | rpmdsFree (rpmds ds) |
Destroy a dependency set. More... | |
rpmds | rpmdsNew (Header h, rpmTag tagN, int flags) |
Create and load a dependency set. More... | |
const char * | rpmdsNewN (rpmds ds) |
Return N string, expanded if necessary. More... | |
char * | rpmdsNewDNEVR (const char *dspfx, rpmds ds) |
Return new formatted dependency string. More... | |
rpmds | rpmdsThis (Header h, rpmTag tagN, evrFlags Flags) |
Create, load and initialize a dependency for this header. More... | |
rpmds | rpmdsSingle (rpmTag tagN, const char *N, const char *EVR, evrFlags Flags) |
Create, load and initialize a dependency set of size 1. More... | |
int | rpmdsCount (const rpmds ds) |
Return dependency set count. More... | |
int | rpmdsIx (const rpmds ds) |
Return dependency set index. More... | |
int | rpmdsSetIx (rpmds ds, int ix) |
Set dependency set index. More... | |
const char * | rpmdsDNEVR (const rpmds ds) |
Return current formatted dependency string. More... | |
const char * | rpmdsN (rpmds ds) |
Return current dependency name. More... | |
const char * | rpmdsEVR (const rpmds ds) |
Return current dependency epoch-version-release. More... | |
evrFlags | rpmdsFlags (const rpmds ds) |
Return current dependency flags. More... | |
rpmTag | rpmdsTagN (const rpmds ds) |
Return current dependency type. More... | |
const char * | rpmdsA (const rpmds ds) |
Return current dependency arch. More... | |
time_t | rpmdsBT (const rpmds ds) |
Return dependency build time. More... | |
time_t | rpmdsSetBT (const rpmds ds, time_t BT) |
Set dependency build time. More... | |
nsType | rpmdsNSType (const rpmds ds) |
Return dependency class type. More... | |
int | rpmdsNoPromote (const rpmds ds) |
Return current "Don't promote Epoch:" flag. More... | |
int | rpmdsSetNoPromote (rpmds ds, int nopromote) |
Set "Don't promote Epoch:" flag. More... | |
void * | rpmdsSetEVRparse (rpmds ds, int(*EVRparse)(const char *everstr, EVR_t evr)) |
Set EVR parsing function. More... | |
void * | rpmdsSetEVRcmp (rpmds ds, int(*EVRcmp)(const char *a, const char *b)) |
Set EVR comparison function. More... | |
rpmuint32_t | rpmdsColor (const rpmds ds) |
Return current dependency color. More... | |
rpmuint32_t | rpmdsSetColor (const rpmds ds, rpmuint32_t color) |
Set current dependency color. More... | |
void * | rpmdsExclude (const rpmds ds) |
Return dependency exclude patterns. More... | |
int | rpmdsNExclude (const rpmds ds) |
Return no. More... | |
void * | rpmdsInclude (const rpmds ds) |
Return dependency include patterns. More... | |
int | rpmdsNInclude (const rpmds ds) |
Return no. More... | |
rpmuint32_t | rpmdsRefs (const rpmds ds) |
Return current dependency file refs. More... | |
rpmuint32_t | rpmdsSetRefs (const rpmds ds, rpmuint32_t refs) |
Set current dependency file refs. More... | |
rpmint32_t | rpmdsResult (const rpmds ds) |
Return current dependency comparison result. More... | |
rpmint32_t | rpmdsSetResult (const rpmds ds, rpmint32_t result) |
Set current dependency comparison result. More... | |
void | rpmdsNotify (rpmds ds, const char *where, int rc) |
Notify of results of dependency match. More... | |
int | rpmdsNext (rpmds ds) |
Return next dependency set iterator index. More... | |
rpmds | rpmdsInit (rpmds ds) |
Initialize dependency set iterator. More... | |
int | rpmdsFind (rpmds ds, const rpmds ods) |
Find a dependency set element using binary search. More... | |
int | rpmdsMerge (rpmds *dsp, rpmds ods) |
Merge a dependency set maintaining (N,EVR,Flags) sorted order. More... | |
int | rpmdsSearch (rpmds ds, rpmds ods) |
Search a sorted dependency set for an element that overlaps. More... | |
int | rpmdsCpuinfo (rpmds *dsp, const char *fn) |
Load /proc/cpuinfo provides into a dependency set. More... | |
int | rpmdsRpmlib (rpmds *dsp, void *tblp) |
Load rpmlib provides into a dependency set. More... | |
int | rpmdsSysinfo (rpmPRCO PRCO, const char *fn) |
Load sysinfo dependencies into a dependency set. More... | |
int | rpmdsGetconf (rpmds *dsp, const char *path) |
Load getconf provides into a dependency set. More... | |
int | rpmdsMergePRCO (void *context, rpmds ds) |
Merge provides/requires/conflicts/obsoletes dependencies. More... | |
rpmPRCO | rpmdsFreePRCO (rpmPRCO PRCO) |
Free dependency set(s) container. More... | |
rpmPRCO | rpmdsNewPRCO (Header h) |
Create dependency set(s) container. More... | |
rpmds | rpmdsFromPRCO (rpmPRCO PRCO, rpmTag tagN) |
Retrieve a dependency set from container. More... | |
int | rpmdsELF (const char *fn, int flags, int(*add)(void *context, rpmds ds), void *context) |
Extract ELF dependencies from a file. More... | |
int | rpmdsLdconfig (rpmPRCO PRCO, const char *fn) |
Load /etc/ld.so.cache provides into a dependency set. More... | |
int | rpmdsPipe (rpmds *dsp, rpmTag tagN, const char *cmd) |
Load provides from a pipe into a dependency set. More... | |
int | rpmdsCompare (const rpmds A, const rpmds B) |
Compare two versioned dependency ranges, looking for overlap. More... | |
int | rpmdsMatch (const rpmds A, rpmds B) |
Compare A against every member of B, looking for 1st match. More... | |
void | rpmdsProblem (rpmps ps, const char *pkgNEVR, const rpmds ds, const fnpyKey *suggestedKeys, int adding) |
Report a Requires: or Conflicts: dependency problem. More... | |
int | rpmdsAnyMatchesDep (const Header h, const rpmds req, int nopromote) |
Compare package provides dependencies from header with a single dependency. More... | |
int | rpmdsNVRMatchesDep (const Header h, const rpmds req, int nopromote) |
Compare package name-version-release from header with a single dependency. More... | |
int | rpmdsNegateRC (const rpmds ds, int rc) |
Negate return code for negated comparisons. More... | |
const char * | rpmdsType (const rpmds ds) |
Return current dependency type name. More... | |
static int | rpmdsPrint (rpmds ds, FILE *fp) |
Print current dependency set contents. More... | |
static int | rpmdsPrintResults (rpmds ds, FILE *fp) |
Print current dependency set results. More... | |
static int | rpmdsPrintClosure (rpmds P, rpmds R, FILE *fp) |
Check Provides: against Requires: and print closure results. More... | |
typedef struct rpmds_s* rpmds |
Dependency tag sets from a header, so that a header can be discarded early.
Definition at line 28 of file rpmtypes.h.
typedef struct rpmPRCO_s* rpmPRCO |
Container for commonly extracted dependency set(s).
Definition at line 33 of file rpmtypes.h.
int dpkgEVRcmp | ( | const char * | a, |
const char * | b | ||
) |
Segmented string compare.
a | 1st string |
b | 2nd string |
Definition at line 33 of file rpmdpkg.c.
References dpkgEVRctype(), int, NULL, rc, and xisdigit().
Referenced by dpkgEVRcompare().
Compare EVR containers.
a | 1st EVR container |
b | 2nd EVR container |
Definition at line 66 of file rpmdpkg.c.
References dpkgEVRcmp().
Split EVR string into epoch, version, and release components.
evrstr | [epoch:]version[-release] string |
*evr | parse results |
Definition at line 61 of file rpmdpkg.c.
References rpmEVRparse().
const char* rpmdsA | ( | const rpmds | ds | ) |
Compare package provides dependencies from header with a single dependency.
h | header |
req | dependency set |
nopromote | Don't promote Epoch: in comparison? |
Definition at line 4209 of file rpmds.c.
References assert(), exit, NULL, result, rpmdsCompare(), rpmdsFlags(), rpmdsFree(), rpmdsInit(), rpmdsNew(), rpmdsNext(), rpmdsSetNoPromote(), RPMNS_TYPE_ARCH, RPMSENSE_SENSEMASK, RPMTAG_PROVIDENAME, and void.
Referenced by rpmtsAddObsoletes(), rpmtsSolve(), and unsatisfiedDepend().
time_t rpmdsBT | ( | const rpmds | ds | ) |
Return dependency build time.
ds | dependency set |
Definition at line 720 of file rpmds.c.
References NULL.
Referenced by rpmds_BT_get(), and rpmds_BT_set().
rpmuint32_t rpmdsColor | ( | const rpmds | ds | ) |
Return current dependency color.
ds | dependency set |
Definition at line 789 of file rpmds.c.
References NULL.
Referenced by checkPackageDeps(), rpmalAddProvides(), rpmds_Color_get(), rpmds_Color_set(), and rpmtsAddObsoletes().
Compare two versioned dependency ranges, looking for overlap.
A | 1st dependency |
B | 2nd dependency |
Definition at line 4025 of file rpmds.c.
References _, _free(), alloca(), assert(), b, D_, exit, for(), int, ix, memset(), result, rpmdsEVRorder(), rpmdsFlags(), rpmdsNAcmp(), rpmEVRparse(), rpmlog(), RPMLOG_DEBUG, RPMLOG_WARNING, RPMSENSE_EQUAL, RPMSENSE_GREATER, RPMSENSE_LESS, RPMSENSE_NOTEQUAL, RPMSENSE_SENSEMASK, rpmvercmp, s, strcmp(), xstrdup(), and xx.
Referenced by cacheStashLatest(), rpmalAllSatisfiesDepend(), rpmdsAnyMatchesDep(), rpmdsMatch(), rpmdsNVRMatchesDep(), rpmdsSearch(), rpmHeadersIdentical(), rpmtsAddInstallElement(), and switch().
Return dependency set count.
ds | dependency set |
Definition at line 636 of file rpmds.c.
References NULL.
Referenced by main(), rpmalMakeIndex(), rpmds_Count_get(), rpmfcGenerateDepends(), rpmfcPrint(), and rpmteColorDS().
Load /proc/cpuinfo provides into a dependency set.
*dsp | (loaded) depedency set |
fn | path to file (NULL uses /proc/cpuinfo) |
Definition at line 1316 of file rpmds.c.
References _cpuinfo_path, _free(), _isspace, _PROC_CPUINFO, av, cpuinfo_s::done, exit, f, fe, g, ge, i, cpuinfo_s::name, NULL, rc, rpmdsCpuinfoCtagFlags(), rpmdsNSAdd(), rpmExpand(), rpmiobFree(), rpmiobSlurp(), RPMSENSE_EQUAL, strcmp(), t, xstrdup(), and xx.
Referenced by main(), rpmShowRC(), and unsatisfiedDepend().
const char* rpmdsDNEVR | ( | const rpmds | ds | ) |
Return current formatted dependency string.
ds | dependency set |
Definition at line 657 of file rpmds.c.
References NULL.
Referenced by missingokTag(), printDeps(), removeSillyDeps(), rpmdepPrint(), rpmds_DNEVR_get(), rpmdsPrint(), rpmdsPrintResults(), rpmdsProblem(), rpmfcPrint(), rpmfiBuildFDeps(), rpmShowRC(), rpmtsAddInstallElement(), rpmtsAddObsoletes(), and unsatisfiedDepend().
Extract ELF dependencies from a file.
fn | file name |
flags | 1: skip provides 2: skip requires |
*add | add(arg, ds) saves next provide/require elf dependency. |
context | add() callback context |
Extract ELF dependencies from a file.
t | soname dependency |
s | elf string (NULL uses "") |
isElf64 | is this an ELF64 symbol? |
Definition at line 2935 of file rpmds.c.
References _free(), assert(), buf, ds, DT_GNU_HASH, exit, fdno, fn, fprintf(), i, int, memchr(), name, NULL, offset, rpmdsFree(), rpmdsSingle(), RPMELF_FLAG_SKIPPROVIDES, RPMELF_FLAG_SKIPREQUIRES, rpmExpandNumeric(), RPMSENSE_EQUAL, RPMTAG_PROVIDENAME, RPMTAG_PROVIDES, RPMTAG_REQUIRENAME, s, st, stpcpy(), strcmp(), t, unsigned, void, xstrdup(), and xx.
Referenced by main(), rpmdsLdconfig(), rpmfcELF(), and unsatisfiedDepend().
const char* rpmdsEVR | ( | const rpmds | ds | ) |
Return current dependency epoch-version-release.
ds | dependency set |
Definition at line 680 of file rpmds.c.
Referenced by _rpmtsCheck(), rpmds_EVR_get(), rpmdsProblem(), rpmfcFileDep(), rpmfcGenerateDepends(), rpmfcHelper(), rpmtsAddObsoletes(), rpmtsSolve(), runImmedTriggers(), and unsatisfiedDepend().
Find a dependency set element using binary search.
ds | dependency set to search |
ods | dependency set element to find. |
Definition at line 998 of file rpmds.c.
References NULL, and strcmp().
Referenced by rpmdsMerge(), and rpmfcApply().
Return current dependency flags.
ds | dependency set |
Definition at line 691 of file rpmds.c.
Referenced by handleOneTrigger(), missingokTag(), printDeps(), rpmds_Flags_get(), rpmdsAnyMatchesDep(), rpmdsCompare(), rpmdsNVRMatchesDep(), rpmfcFileDep(), rpmfcHelper(), rpmtsSolve(), runImmedTriggers(), and unsatisfiedDepend().
Destroy a dependency set.
ds | dependency set |
Referenced by cacheStashLatest(), checkPackageSet(), ensureOlder(), freeItem(), handleOneTrigger(), if(), main(), missingokTag(), pkgFini(), printDeps(), removeSillyDeps(), rpmalDel(), rpmalFini(), rpmds_free(), rpmdsAnyMatchesDep(), rpmdsELF(), rpmdsFreePRCO(), rpmdsLdconfig(), rpmdsNSAdd(), rpmdsNVRMatchesDep(), rpmdsPipe(), rpmdsRpmlib(), rpmdsSysinfoFile(), rpmfcApply(), rpmfcFini(), rpmfcGenerateDepends(), rpmfcHelper(), rpmfcSCRIPT(), rpmfiBuildFDeps(), rpmHeadersIdentical(), rpmnsClean(), rpmpsmFini(), rpmShowRC(), rpmtsAddInstallElement(), rpmtsAddObsoletes(), runImmedTriggers(), runTriggersLoop(), and unsatisfiedDepend().
Free dependency set(s) container.
PRCO | dependency set(s) container |
Definition at line 2841 of file rpmds.c.
References _free(), memset(), NULL, rpmdsFree(), and void.
Referenced by main(), rpmShowRC(), rpmteCleanDS(), rpmtsFini(), and unsatisfiedDepend().
Retrieve a dependency set from container.
PRCO | dependency set(s) container |
tagN | type of dependency set |
Definition at line 2891 of file rpmds.c.
References NULL, RPMTAG_CONFLICTNAME, RPMTAG_DIRNAMES, RPMTAG_FILELINKTOS, RPMTAG_NAME, RPMTAG_OBSOLETENAME, RPMTAG_PROVIDENAME, RPMTAG_REQUIRENAME, and RPMTAG_TRIGGERNAME.
Referenced by _rpmtsCheck(), main(), rpmShowRC(), rpmteDS(), and unsatisfiedDepend().
Load getconf provides into a dependency set.
*dsp | (loaded) depedency set |
path | getconf path (NULL uses /) |
Referenced by main(), rpmShowRC(), and unsatisfiedDepend().
Initialize dependency set iterator.
ds | dependency set |
Definition at line 943 of file rpmds.c.
Referenced by _rpmtsCheck(), checkPackageDeps(), handleOneTrigger(), missingokTag(), printDeps(), rpmalAddProvides(), rpmdepPrint(), rpmdsAnyMatchesDep(), rpmdsMatch(), rpmdsMerge(), rpmdsPrint(), rpmdsPrintClosure(), rpmdsPrintResults(), rpmShowRC(), rpmteColorDS(), rpmtsAddObsoletes(), runImmedTriggers(), and runTriggersLoop().
Return dependency set index.
ds | dependency set |
Definition at line 641 of file rpmds.c.
References NULL.
Referenced by rpmalAddProvides(), rpmalAllSatisfiesDepend(), rpmdepPrint(), rpmds_Ix_get(), rpmds_Ix_set(), rpmdsPrint(), rpmdsPrintResults(), and rpmdsSearch().
Load /etc/ld.so.cache provides into a dependency set.
*PRCO | provides/requires/conflicts/obsoletes depedency set(s) |
fn | cache file name (NULL uses /etc/ld.so.cache) |
Definition at line 3491 of file rpmds.c.
References _free(), _isspace, _LD_SO_CACHE, _ldconfig_cache, _SBIN_LDCONFIG_P, ds, EVR, exit, f, fe, fprintf(), g, ge, N, NULL, pclose(), rc, rpmdsELF(), rpmdsFree(), rpmdsMerge(), rpmdsMergePRCO(), rpmdsSingle(), rpmExpand(), RPMTAG_PROVIDENAME, t, void, xstrdup(), and xx.
Referenced by main().
Reference a dependency set instance.
ds | dependency set |
msg |
Referenced by handleOneTrigger(), main(), rpmalAdd(), rpmdsDup(), rpmdsNew(), rpmdsSingle(), rpmdsThis(), rpmShowRC(), rpmtsAddObsoletes(), and runImmedTriggers().
Compare A against every member of B, looking for 1st match.
A | 1st dependency |
B | 2nd dependency |
Definition at line 4169 of file rpmds.c.
References result, rpmdsCompare(), rpmdsInit(), and rpmdsNext().
Referenced by handleOneTrigger(), and removeSillyDeps().
Merge a dependency set maintaining (N,EVR,Flags) sorted order.
*dsp | (merged) dependency set |
ods | dependency set to merge |
Definition at line 1030 of file rpmds.c.
References _free(), assert(), ds, EVR, Flags, j, N, NULL, rpmdsDup(), rpmdsDupArgv(), rpmdsFind(), rpmdsInit(), rpmdsNext(), and xmalloc.
Referenced by rpmdsLdconfig(), rpmdsMergePRCO(), rpmdsNSAdd(), rpmdsPipe(), rpmdsRpmlib(), rpmfcGenerateDepends(), rpmfcHelper(), rpmfcMergePR(), and rpmfcSCRIPT().
Merge provides/requires/conflicts/obsoletes dependencies.
context | merge dependency set(s) container |
ds | dependency set to merge |
Definition at line 2804 of file rpmds.c.
References fprintf(), PRCO, rc, rpmdsMerge(), rpmdsTagN(), rpmdsTagName(), RPMTAG_CONFLICTNAME, RPMTAG_DIRNAMES, RPMTAG_FILELINKTOS, RPMTAG_OBSOLETENAME, RPMTAG_PROVIDENAME, RPMTAG_REQUIRENAME, and RPMTAG_TRIGGERNAME.
Referenced by main(), rpmdsLdconfig(), rpmdsSysinfoFile(), and unsatisfiedDepend().
const char* rpmdsN | ( | rpmds | ds | ) |
Return current dependency name.
ds | dependency set |
Definition at line 668 of file rpmds.c.
References N, NULL, and rpmdsNewN().
Referenced by _rpmtsCheck(), checkPackageDeps(), cmpItem(), handleOneTrigger(), rpmalAllFileSatisfiesDepend(), rpmalAllSatisfiesDepend(), rpmds_N_get(), rpmdsProblem(), rpmfcFileDep(), rpmfcGenerateDepends(), rpmtsAddObsoletes(), rpmtsSolve(), runImmedTriggers(), runTriggersLoop(), and unsatisfiedDepend().
Negate return code for negated comparisons.
ds | dependency set |
rc | positive return code |
Definition at line 4342 of file rpmds.c.
References rc.
Referenced by _rpmtsCheck(), handleOneTrigger(), and unsatisfiedDepend().
Create and load a dependency set.
h | header |
tagN | type of dependency |
flags | scareMem(0x1), nofilter(0x2) |
Definition at line 238 of file rpmds.c.
References _free(), _rpmds_nopromote, alloca(), rpmDataType_u::argv, argvFree(), assert(), av, _HE_s::c, ds, exit, fprintf(), headerGet(), i, len, memset(), N, NULL, _HE_s::p, rpmDataType_u::ptr, rpmdsDupArgv(), rpmdsGetPool(), rpmdsLink(), rpmdsTagName(), rpmdsThis(), rpmGenPath(), RPMSENSE_EQUAL, RPMTAG_ARCH, RPMTAG_BASENAMES, RPMTAG_BUILDTIME, RPMTAG_CONFLICTFLAGS, RPMTAG_CONFLICTNAME, RPMTAG_CONFLICTVERSION, RPMTAG_DIRINDEXES, RPMTAG_DIRNAMES, RPMTAG_ENHANCESFLAGS, RPMTAG_ENHANCESNAME, RPMTAG_ENHANCESVERSION, RPMTAG_FILELINKTOS, RPMTAG_NAME, RPMTAG_OBSOLETEFLAGS, RPMTAG_OBSOLETENAME, RPMTAG_OBSOLETEVERSION, RPMTAG_PROVIDEFLAGS, RPMTAG_PROVIDENAME, RPMTAG_PROVIDEVERSION, RPMTAG_REQUIREFLAGS, RPMTAG_REQUIRENAME, RPMTAG_REQUIREVERSION, RPMTAG_SUGGESTSFLAGS, RPMTAG_SUGGESTSNAME, RPMTAG_SUGGESTSVERSION, RPMTAG_TRIGGERFLAGS, RPMTAG_TRIGGERNAME, RPMTAG_TRIGGERVERSION, rpmDataType_u::str, _HE_s::tag, rpmDataType_u::ui32p, urlPath(), void, xcalloc(), xstrdup(), and xx.
Referenced by checkPackageSet(), handleOneTrigger(), hdr_dsFromHeader(), missingokTag(), printDeps(), removeSillyDeps(), rpmds_init(), rpmds_new(), rpmdsAnyMatchesDep(), rpmdsNewPRCO(), rpmfcGenerateDepends(), rpmfiBuildFDeps(), rpmhdr_ds(), rpmpsmStage(), and runTriggersLoop().
char* rpmdsNewDNEVR | ( | const char * | dspfx, |
rpmds | ds | ||
) |
Return new formatted dependency string.
dspfx | formatted dependency string prefix |
ds | dependency set |
Definition at line 434 of file rpmds.c.
References _rpmns_N_at_A, A, N, nb, NS, NULL, rpmdsNewN(), RPMSENSE_EQUAL, RPMSENSE_GREATER, RPMSENSE_LESS, RPMSENSE_NOTEQUAL, RPMSENSE_SENSEMASK, stpcpy(), t, tbuf, and xmalloc.
Referenced by rpmdsNext(), rpmdsSingle(), and rpmdsThis().
const char* rpmdsNewN | ( | rpmds | ds | ) |
Return N string, expanded if necessary.
ds | dependency set |
Definition at line 421 of file rpmds.c.
References ns, rpmnsParse(), and xx.
Referenced by rpmdsN(), and rpmdsNewDNEVR().
Create dependency set(s) container.
h | header |
Definition at line 2866 of file rpmds.c.
References PRCO, rpmdsNew(), RPMTAG_CONFLICTNAME, RPMTAG_DIRNAMES, RPMTAG_FILELINKTOS, RPMTAG_NAME, RPMTAG_OBSOLETENAME, RPMTAG_PROVIDENAME, RPMTAG_REQUIRENAME, RPMTAG_TRIGGERNAME, and xcalloc().
Referenced by addTE(), main(), rpmShowRC(), rpmtsPRCO(), and unsatisfiedDepend().
Return next dependency set iterator index.
ds | dependency set |
Definition at line 912 of file rpmds.c.
References _free(), fprintf(), i, memset(), NULL, rpmdsNewDNEVR(), and t.
Referenced by _rpmtsCheck(), checkPackageDeps(), handleOneTrigger(), missingokTag(), printDeps(), rpmalAddProvides(), rpmalAllSatisfiesDepend(), rpmdepPrint(), rpmds_Ix_set(), rpmdsAnyMatchesDep(), rpmdsMatch(), rpmdsMerge(), rpmdsPrint(), rpmdsPrintClosure(), rpmdsPrintResults(), rpmdsSearch(), rpmfcPrint(), rpmfiBuildFDeps(), rpmShowRC(), rpmteColorDS(), rpmtsAddObsoletes(), runImmedTriggers(), and runTriggersLoop().
Return current "Don't promote Epoch:" flag.
This flag controls for Epoch: promotion when a dependency set is compared. If the flag is set (for already installed packages), then an unspecified value will be treated as Epoch: 0. Otherwise (for added packages), the Epoch: portion of the comparison is skipped if the value is not specified, i.e. an unspecified Epoch: is assumed to be equal in dependency comparisons.
ds | dependency set |
Definition at line 746 of file rpmds.c.
References NULL.
Referenced by rpmds_NoPromote_get(), and rpmds_NoPromote_set().
Notify of results of dependency match.
ds | dependency set |
where | where dependency was resolved (or NULL) |
rc | 0 == YES, otherwise NO |
Definition at line 899 of file rpmds.c.
References _, NULL, rpmdsTagName(), rpmlog(), RPMLOG_DEBUG, and strcmp().
Referenced by rpmalAllFileSatisfiesDepend(), rpmalAllSatisfiesDepend(), and unsatisfiedDepend().
Return dependency class type.
ds | dependency set |
Definition at line 738 of file rpmds.c.
References NULL, and RPMNS_TYPE_UNKNOWN.
Referenced by _rpmtsCheck(), checkPackageDeps(), and unsatisfiedDepend().
Compare package name-version-release from header with a single dependency.
h | header |
req | dependency set |
nopromote | Don't promote Epoch: in comparison? |
Definition at line 4262 of file rpmds.c.
References _free(), alloca(), assert(), exit, headerGet(), headerNEVRA(), memset(), nb, NULL, _HE_s::p, rpmDataType_u::ptr, result, rpmdsCompare(), rpmdsFlags(), rpmdsFree(), rpmdsSetNoPromote(), rpmdsSingle(), RPMSENSE_EQUAL, RPMSENSE_SENSEMASK, RPMTAG_DISTEPOCH, RPMTAG_EPOCH, RPMTAG_PROVIDENAME, sprintf(), stpcpy(), rpmDataType_u::str, t, _HE_s::tag, rpmDataType_u::ui32p, void, and xstrdup().
Referenced by ensureOlder().
Load provides from a pipe into a dependency set.
*dsp | (loaded) depedency set |
tagN | rpmds tag (0 uses RPMTAG_PROVIDENAME). |
cmd | popen cmd to run (NULL loads perl provides) |
Definition at line 3839 of file rpmds.c.
References _, _free(), _isspace, _PERL_PROVIDES, _perldeps_cmd, buf, ds, EVR, exit, f, fe, fprintf(), g, ge, N, NULL, pclose(), rc, rpmdsFree(), rpmdsMerge(), rpmdsSingle(), rpmEVRflags(), rpmExpand(), RPMTAG_PROVIDENAME, void, xisalnum(), xstrdup(), and xx.
Referenced by main().
Print current dependency set contents.
ds | dependency set |
fp | file handle (NULL uses stderr) |
Definition at line 764 of file rpmds.h.
References fprintf(), NULL, rpmdsDNEVR(), rpmdsInit(), rpmdsIx(), rpmdsNext(), and rpmdsType().
Check Provides: against Requires: and print closure results.
P | Provides: dependency set |
R | Requires: dependency set |
fp | file handle (NULL uses stderr) |
Definition at line 808 of file rpmds.h.
References rc, rpmdsInit(), rpmdsNext(), rpmdsPrintResults(), rpmdsSearch(), rpmdsSetResult(), and void.
Referenced by main().
Print current dependency set results.
ds | dependency set |
fp | file handle (NULL uses stderr) |
Definition at line 783 of file rpmds.h.
References fprintf(), NULL, rc, rpmdsDNEVR(), rpmdsInit(), rpmdsIx(), rpmdsNext(), rpmdsResult(), and rpmdsType().
Referenced by rpmdsPrintClosure().
void rpmdsProblem | ( | rpmps | ps, |
const char * | pkgNEVR, | ||
const rpmds | ds, | ||
const fnpyKey * | suggestedKeys, | ||
int | adding | ||
) |
Report a Requires: or Conflicts: dependency problem.
ps | transaction set problems |
pkgNEVR | package name/epoch/version/release |
ds | dependency set |
suggestedKeys | filename or python object address |
adding | dependency problem is from added package set? |
Definition at line 4181 of file rpmds.c.
References D_, key, NULL, rpmdsDNEVR(), rpmdsEVR(), rpmdsN(), rpmlog(), RPMLOG_DEBUG, RPMPROB_CONFLICT, RPMPROB_REQUIRES, rpmpsAppend(), and type.
Referenced by checkPackageDeps().
rpmuint32_t rpmdsRefs | ( | const rpmds | ds | ) |
rpmint32_t rpmdsResult | ( | const rpmds | ds | ) |
Return current dependency comparison result.
ds | dependency set |
Definition at line 869 of file rpmds.c.
Referenced by rpmdsPrintResults().
Load rpmlib provides into a dependency set.
*dsp | (loaded) depedency set |
tblp | rpmlib provides table (NULL uses internal table) |
Definition at line 1577 of file rpmds.c.
References rpmlibProvides_s::featureEVR, rpmlibProvides_s::featureFlags, rpmlibProvides_s::featureName, NULL, rpmdsFree(), rpmdsMerge(), rpmdsSingle(), rpmlibProvides, RPMTAG_PROVIDENAME, void, and xx.
Referenced by main(), rpmds_new(), rpmShowRC(), and unsatisfiedDepend().
Search a sorted dependency set for an element that overlaps.
A boolean result is saved (if allocated) and accessible through rpmdsResult(ods) afterwards.
ds | dependency set to search |
ods | dependency set element to find. |
Definition at line 1108 of file rpmds.c.
References i, NULL, rpmdsCompare(), rpmdsIx(), rpmdsNext(), rpmdsSetIx(), rpmdsSetResult(), strcmp(), u, and void.
Referenced by rpmdsPrintClosure(), rpmfcHelper(), and unsatisfiedDepend().
time_t rpmdsSetBT | ( | const rpmds | ds, |
time_t | BT | ||
) |
Set dependency build time.
ds | dependency set |
BT | build time |
Definition at line 728 of file rpmds.c.
References NULL.
Referenced by rpmds_BT_set().
rpmuint32_t rpmdsSetColor | ( | const rpmds | ds, |
rpmuint32_t | color | ||
) |
Set current dependency color.
ds | dependency set |
color | new dependency color |
Definition at line 800 of file rpmds.c.
References NULL, and xcalloc().
Referenced by rpmds_Color_set(), and rpmteColorDS().
Set EVR parsing function.
ds | dependency set |
EVRparse | EVR parsing function (NULL uses default) |
Set dependency set index.
ds | dependency set |
ix | new index |
Definition at line 646 of file rpmds.c.
Referenced by rpmalAllSatisfiesDepend(), rpmds_Ix_set(), rpmdsSearch(), rpmfcHelper(), rpmfcPrint(), and rpmfiBuildFDeps().
Set "Don't promote Epoch:" flag.
ds | dependency set |
nopromote | Should an unspecified Epoch: be treated as Epoch: 0? |
Definition at line 755 of file rpmds.c.
References NULL.
Referenced by checkPackageSet(), handleOneTrigger(), rpmds_NoPromote_set(), rpmdsAnyMatchesDep(), and rpmdsNVRMatchesDep().
rpmuint32_t rpmdsSetRefs | ( | const rpmds | ds, |
rpmuint32_t | refs | ||
) |
Set current dependency file refs.
ds | dependency set |
refs | new dependency refs |
Definition at line 850 of file rpmds.c.
References NULL, and xcalloc().
Referenced by rpmteColorDS().
rpmint32_t rpmdsSetResult | ( | const rpmds | ds, |
rpmint32_t | result | ||
) |
Set current dependency comparison result.
ds | dependency set |
result | new dependency result |
Definition at line 880 of file rpmds.c.
References NULL, result, and xcalloc().
Referenced by rpmdsPrintClosure(), and rpmdsSearch().
Create, load and initialize a dependency set of size 1.
tagN | type of dependency |
N | name |
EVR | epoch:version-release |
Flags | comparison/context flags |
Definition at line 609 of file rpmds.c.
References ds, EVR, Flags, N, NULL, rpmdsGetPool(), rpmdsLink(), rpmdsNewDNEVR(), rpmdsTagName(), t, xcalloc(), and xmalloc.
Referenced by ensureOlder(), removeSillyDeps(), rpmds_Single(), rpmdsELF(), rpmdsLdconfig(), rpmdsNSAdd(), rpmdsNVRMatchesDep(), rpmdsPipe(), rpmdsRpmlib(), rpmdsSysinfoFile(), rpmfcApply(), rpmfcGenerateDepends(), rpmfcHelper(), rpmfcSCRIPT(), and unsatisfiedDepend().
Load sysinfo dependencies into a dependency set.
*PRCO | provides/requires/conflicts/obsoletes depedency set(s) |
fn | path to file (NULL uses /etc/rpm/sysinfo) |
Definition at line 1746 of file rpmds.c.
References _ETC_RPM_SYSINFO, _free(), _sysinfo_path, alloca(), av, exit, fn, memset(), rc, rpmdsSysinfoFile(), rpmExpand(), rpmGetPath(), RPMTAG_PROVIDENAME, st, Stat(), tagValue(), xstrdup(), and xx.
Referenced by main(), rpmShowRC(), and rpmtsPRCO().
Return current dependency type.
ds | dependency set |
Definition at line 702 of file rpmds.c.
References NULL.
Referenced by rpmdsMergePRCO(), rpmdsType(), rpmfcFileDep(), rpmfcMergePR(), rpmtsSolve(), and unsatisfiedDepend().
Create, load and initialize a dependency for this header.
h | header |
tagN | type of dependency |
Flags | comparison flags |
Definition at line 513 of file rpmds.c.
References _free(), alloca(), ds, EVR, Flags, headerGet(), headerNEVRA(), memset(), N, nb, NULL, _HE_s::p, rpmDataType_u::ptr, rpmdsGetPool(), rpmdsLink(), rpmdsNewDNEVR(), rpmdsTagName(), RPMTAG_ARCH, RPMTAG_BUILDTIME, RPMTAG_DISTEPOCH, RPMTAG_EPOCH, RPMTAG_NAME, RPMTAG_PROVIDENAME, sprintf(), stpcpy(), rpmDataType_u::str, t, _HE_s::tag, rpmDataType_u::ui32p, xmalloc, xstrdup(), and xx.
Referenced by cacheStashLatest(), hdr_dsOfHeader(), parseSpec(), rpmdsNew(), rpmHeadersIdentical(), and rpmtsAddInstallElement().
const char* rpmdsType | ( | const rpmds | ds | ) |
Return current dependency type name.
ds | dependency set |
Definition at line 162 of file rpmds.c.
References rpmdsTagN(), and rpmdsTagName().
Referenced by rpmdepPrint(), rpmds_Type_get(), rpmdsPrint(), and rpmdsPrintResults().
Unreference a dependency set instance.
ds | dependency set |
msg |
int rpmEVRcmp | ( | const char * | a, |
const char * | b | ||
) |
Segmented string compare.
a | 1st string |
b | 2nd string |
Definition at line 87 of file rpmevr.c.
References _invert_digits_alphas_comparison, assert(), b, be, int, MAX, NULL, rc, xisdigit(), and xisrpmalpha().
Compare EVR containers for equality.
a | 1st EVR container |
b | 2nd EVR container |
Definition at line 280 of file rpmevr.c.
References _, assert(), compare_values(), ix, NULL, rc, rpmEVRorder(), rpmlog(), RPMLOG_WARNING, RPMSENSE_EQUAL, RPMSENSE_GREATER, RPMSENSE_LESS, and s.
Referenced by evrCompare(), labelCompare(), pointRpmEVR(), rpmEVRoverlap(), and rpmfcHelper().
Create a new EVR container.
Flags | EVR inequality flags |
initialize | Should empty defaults be initialized? |
Definition at line 31 of file rpmevr.c.
References xcalloc().
Referenced by addReqProv(), evrCompare(), evrSplit(), labelCompare(), nwlookupTag(), PRCOsqlTag(), rpmfcHelper(), and wnlookupTag().
Compare EVR containers for overlap.
a | 1st EVR container |
b | 2nd EVR container |
Definition at line 339 of file rpmevr.c.
References NULL, result, rpmEVRcompare(), RPMSENSE_EQUAL, RPMSENSE_GREATER, RPMSENSE_LESS, and RPMSENSE_NOTEQUAL.
Referenced by addReqProv(), nwlookupTag(), and wnlookupTag().
Split EVR string into epoch, version, and release components.
evrstr | [epoch:]version[-release] string |
*evr | parse results |
Definition at line 181 of file rpmevr.c.
References assert(), i, ix, memset(), mireRegexec(), mireSetEOptions(), nb, NULL, rpmEVRmire(), te, xstrdup(), and xx.
Referenced by addReqProv(), dpkgEVRparse(), evrCompare(), evrSplit(), nwlookupTag(), parseRCPOT(), pointRpmEVR(), PRCOsqlTag(), rpmdsCompare(), rpmfcHelper(), and wnlookupTag().
nsType rpmnsArch | ( | const char * | str | ) |
Is string a known arch suffix?
str | string |
Definition at line 70 of file rpmns.c.
References _free(), av, NULL, p, rc, rpmExpand(), RPMNS_TYPE_ARCH, RPMNS_TYPE_UNKNOWN, strcmp(), t, and xisspace().
Referenced by rpmnsClassify().
nsType rpmnsClassify | ( | const char * | s, |
size_t | slen | ||
) |
Classify a string as a dependency type.
s | string like "bing(bang).boom" |
slen | string length (0 uses strlen(s)) |
Definition at line 197 of file rpmns.c.
References RPMNS_TYPE_ARCH, RPMNS_TYPE_COMPOUND, RPMNS_TYPE_DSO, RPMNS_TYPE_FUNCTION, RPMNS_TYPE_NAMESPACE, RPMNS_TYPE_PATH, RPMNS_TYPE_STRING, RPMNS_TYPE_UNKNOWN, RPMNS_TYPE_VERSION, rpmnsArch(), rpmnsProbe(), se, _rpmnsProbes_s::Type, and xisdigit().
Referenced by rpmnsParse().
Expand and split NS(N).A string into namespace, name and arch components.
s | string like "bing(bang).boom" |
*ns | parse results |
Definition at line 236 of file rpmns.c.
References NULL, rpmExpand(), RPMNS_TYPE_ACCESS, RPMNS_TYPE_ARCH, RPMNS_TYPE_COMPOUND, RPMNS_TYPE_CONFIG, RPMNS_TYPE_CPUINFO, RPMNS_TYPE_DIGEST, RPMNS_TYPE_DISKSPACE, RPMNS_TYPE_DSO, RPMNS_TYPE_ENVVAR, RPMNS_TYPE_FUNCTION, RPMNS_TYPE_GETCONF, RPMNS_TYPE_GNUPG, RPMNS_TYPE_GROUP, RPMNS_TYPE_MACRO, RPMNS_TYPE_MOUNTED, RPMNS_TYPE_NAMESPACE, RPMNS_TYPE_PATH, RPMNS_TYPE_RPMLIB, RPMNS_TYPE_RUNNING, RPMNS_TYPE_SANITY, RPMNS_TYPE_SIGNATURE, RPMNS_TYPE_SONAME, RPMNS_TYPE_STRING, RPMNS_TYPE_TAG, RPMNS_TYPE_UNAME, RPMNS_TYPE_UNKNOWN, RPMNS_TYPE_USER, RPMNS_TYPE_VCHECK, RPMNS_TYPE_VERIFY, RPMNS_TYPE_VERSION, rpmnsClassify(), and t.
Referenced by rpmdsNewN().
nsType rpmnsProbe | ( | const char * | s, |
size_t | slen | ||
) |
Is string a known probe namespace?
s | string |
slen | string length (0 uses strlen(s)) |
Definition at line 170 of file rpmns.c.
References av, i, _rpmnsProbes_s::NS, _rpmnsProbes_s::NSlen, NULL, rc, RPMNS_TYPE_UNKNOWN, rpmnsProbes, rpmnsProbesCount, se, _rpmnsProbes_s::Type, and u.
Referenced by rpmnsClassify().
const char* _sysinfo_path |
Definition at line 1731 of file rpmds.c.
Referenced by rpmdsSysinfo(), rpmnsClean(), and rpmShowRC().
Segmented string compare vector.
a | 1st string |
b | 2nd string |
Definition at line 379 of file rpmevr.c.
Referenced by compare_values(), rpmdsCompare(), and rpmVersionCompare().