|
rpm
4.12.90
|
Structure(s) used for dependency tag sets. More...
#include <time.h>#include <rpm/rpmtypes.h>#include <rpm/rpmps.h>Go to the source code of this file.
Macros | |
| #define | RPMSENSE_SENSEMASK 15 /* Mask to get senses, ie serial, */ |
| #define | RPMSENSE_TRIGGER (RPMSENSE_TRIGGERPREIN | RPMSENSE_TRIGGERIN | RPMSENSE_TRIGGERUN | RPMSENSE_TRIGGERPOSTUN) |
| #define | _ALL_REQUIRES_MASK |
| #define | _notpre(_x) ((_x) & ~RPMSENSE_PREREQ) |
| #define | _INSTALL_ONLY_MASK _notpre(RPMSENSE_SCRIPT_PRE|RPMSENSE_SCRIPT_POST|RPMSENSE_RPMLIB|RPMSENSE_KEYRING|RPMSENSE_PRETRANS|RPMSENSE_POSTTRANS) |
| #define | _ERASE_ONLY_MASK _notpre(RPMSENSE_SCRIPT_PREUN|RPMSENSE_SCRIPT_POSTUN) |
| #define | isLegacyPreReq(_x) (((_x) & _ALL_REQUIRES_MASK) == RPMSENSE_PREREQ) |
| #define | isInstallPreReq(_x) ((_x) & _INSTALL_ONLY_MASK) |
| #define | isErasePreReq(_x) ((_x) & _ERASE_ONLY_MASK) |
Typedefs | |
| typedef rpmFlags | rpmsenseFlags |
| typedef enum rpmrichOp_e | rpmrichOp |
| typedef enum rpmrichParseType_e | rpmrichParseType |
| typedef rpmRC(* | rpmrichParseFunction) (void *cbdata, rpmrichParseType type, const char *n, int nl, const char *e, int el, rpmsenseFlags sense, rpmrichOp op, char **emsg) |
Functions | |
| rpmsenseFlags | rpmSanitizeDSFlags (rpmTagVal tagN, rpmsenseFlags Flags) |
| Return only those flags allowed for given type of dependencies. More... | |
| rpmsenseFlags | rpmParseDSFlags (const char *str, size_t len) |
| Convert a string to the sense flags. More... | |
| rpmds | rpmdsLink (rpmds ds) |
| Reference a dependency set instance. More... | |
| rpmds | rpmdsFree (rpmds ds) |
| Destroy a dependency set. More... | |
| rpmds | rpmdsNew (Header h, rpmTagVal tagN, int flags) |
| Create and load a dependency set. More... | |
| char * | rpmdsNewDNEVR (const char *dspfx, const rpmds ds) |
| Return new formatted dependency string. More... | |
| rpmds | rpmdsThis (Header h, rpmTagVal tagN, rpmsenseFlags Flags) |
| Create, load and initialize a dependency for this header. More... | |
| rpmds | rpmdsSingle (rpmTagVal tagN, const char *N, const char *EVR, rpmsenseFlags Flags) |
| Create, load and initialize a dependency set of size 1. More... | |
| rpmds | rpmdsCurrent (rpmds ds) |
| Return a new dependency set of size 1 from the current iteration index. More... | |
| int | rpmdsPutToHeader (rpmds ds, Header h) |
| Write content of the dependency set to the header. 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... | |
| char | rpmdsD (const rpmds ds) |
| Return one char indicating the type of the dependency. More... | |
| rpmTagVal | rpmdsDToTagN (char deptype) |
| Return matching tagN for one char dependency type description. More... | |
| const char * | rpmdsN (const rpmds ds) |
| Return current dependency name. More... | |
| const char * | rpmdsEVR (const rpmds ds) |
| Return current dependency epoch-version-release. More... | |
| int | rpmdsTi (const rpmds ds) |
| Return current dependency triggerindex. More... | |
| rpmsenseFlags | rpmdsFlags (const rpmds ds) |
| Return current dependency flags. More... | |
| rpmTagVal | rpmdsTagN (const rpmds ds) |
| Return current dependency type. More... | |
| rpmTagVal | rpmdsTagEVR (const rpmds ds) |
| Return current dependency type. More... | |
| rpmTagVal | rpmdsTagF (const rpmds ds) |
| Return current dependency type. More... | |
| rpmTagVal | rpmdsTagTi (const rpmds ds) |
| Return current dependency type. More... | |
| unsigned int | rpmdsInstance (rpmds ds) |
| Return dependency header instance, ie whether the dependency comes from an installed header or not. 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... | |
| rpm_color_t | rpmdsColor (const rpmds ds) |
| Return current dependency color. More... | |
| rpm_color_t | rpmdsSetColor (const rpmds ds, rpm_color_t color) |
| Return current dependency color. 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 | rpmdsCompare (const rpmds A, const rpmds B) |
| Compare two versioned dependency ranges, looking for overlap. More... | |
| int | rpmdsAnyMatchesDep (const Header h, const rpmds req, int nopromote) |
| Compare package provides dependencies from header with a single dependency. More... | |
| int | rpmdsMatchesDep (const Header h, int ix, 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 | rpmdsRpmlib (rpmds *dsp, const void *tblp) |
| Load rpmlib provides into a dependency set. More... | |
| rpmds | rpmdsNewPool (rpmstrPool pool, Header h, rpmTagVal tagN, int flags) |
| Create and load a dependency set. More... | |
| rpmds | rpmdsThisPool (rpmstrPool pool, Header h, rpmTagVal tagN, rpmsenseFlags Flags) |
| Create, load and initialize a dependency for this header. More... | |
| rpmds | rpmdsSinglePool (rpmstrPool pool, rpmTagVal tagN, const char *N, const char *EVR, rpmsenseFlags Flags) |
| Create, load and initialize a dependency set of size 1. More... | |
| rpmds | rpmdsSinglePoolTix (rpmstrPool pool, rpmTagVal tagN, const char *N, const char *EVR, rpmsenseFlags Flags, int triggerIndex) |
| Create, load and initialize a trigger dependency set of size 1. More... | |
| int | rpmdsRpmlibPool (rpmstrPool pool, rpmds *dsp, const void *tblp) |
| Load rpmlib provides into a dependency set. More... | |
| rpmRC | rpmrichParse (const char **dstrp, char **emsg, rpmrichParseFunction cb, void *cbdata) |
| Parse a rich dependency string. More... | |
| int | rpmdsIsRich (rpmds dep) |
| Return if current depenency is rich. More... | |
| const char * | rpmrichOpStr (rpmrichOp op) |
| Return a string representation of the rich dependency op. More... | |
| rpmRC | rpmdsParseRichDep (rpmds dep, rpmds *leftds, rpmds *rightds, rpmrichOp *op, char **emsg) |
| Parse a rich dependency string. More... | |
Variables | |
| int | _rpmds_nopromote |
Structure(s) used for dependency tag sets.
Definition in file rpmds.h.
| #define _ALL_REQUIRES_MASK |
| #define _ERASE_ONLY_MASK _notpre(RPMSENSE_SCRIPT_PREUN|RPMSENSE_SCRIPT_POSTUN) |
| #define _INSTALL_ONLY_MASK _notpre(RPMSENSE_SCRIPT_PRE|RPMSENSE_SCRIPT_POST|RPMSENSE_RPMLIB|RPMSENSE_KEYRING|RPMSENSE_PRETRANS|RPMSENSE_POSTTRANS) |
| #define _notpre | ( | _x | ) | ((_x) & ~RPMSENSE_PREREQ) |
| #define isErasePreReq | ( | _x | ) | ((_x) & _ERASE_ONLY_MASK) |
| #define isInstallPreReq | ( | _x | ) | ((_x) & _INSTALL_ONLY_MASK) |
| #define isLegacyPreReq | ( | _x | ) | (((_x) & _ALL_REQUIRES_MASK) == RPMSENSE_PREREQ) |
| #define RPMSENSE_SENSEMASK 15 /* Mask to get senses, ie serial, */ |
| #define RPMSENSE_TRIGGER (RPMSENSE_TRIGGERPREIN | RPMSENSE_TRIGGERIN | RPMSENSE_TRIGGERUN | RPMSENSE_TRIGGERPOSTUN) |
| typedef enum rpmrichOp_e rpmrichOp |
| typedef rpmRC(* rpmrichParseFunction) (void *cbdata, rpmrichParseType type, const char *n, int nl, const char *e, int el, rpmsenseFlags sense, rpmrichOp op, char **emsg) |
| typedef enum rpmrichParseType_e rpmrichParseType |
| typedef rpmFlags rpmsenseFlags |
| enum rpmrichOp_e |
| enum rpmrichParseType_e |
| enum rpmsenseFlags_e |
Dependency Attributes.
Compare package provides dependencies from header with a single dependency.
| h | header |
| req | dependency set |
| nopromote | Don't promote Epoch: in comparison? |
| rpm_color_t rpmdsColor | ( | const rpmds | ds | ) |
Return current dependency color.
| ds | dependency set |
Compare two versioned dependency ranges, looking for overlap.
| A | 1st dependency |
| B | 2nd dependency |
| int rpmdsCount | ( | const rpmds | ds | ) |
Return dependency set count.
| ds | dependency set |
Return a new dependency set of size 1 from the current iteration index.
| ds | dependency set |
| char rpmdsD | ( | const rpmds | ds | ) |
Return one char indicating the type of the dependency.
| ds | dependency set |
| const char* rpmdsDNEVR | ( | const rpmds | ds | ) |
Return current formatted dependency string.
| ds | dependency set |
| rpmTagVal rpmdsDToTagN | ( | char | deptype | ) |
Return matching tagN for one char dependency type description.
| deptype | character |
| const char* rpmdsEVR | ( | const rpmds | ds | ) |
Return current dependency epoch-version-release.
| ds | dependency set |
Find a dependency set element using binary search.
| ds | dependency set to search |
| ods | dependency set element to find. |
| rpmsenseFlags rpmdsFlags | ( | const rpmds | ds | ) |
Return current dependency flags.
| ds | dependency set |
Destroy a dependency set.
| ds | dependency set |
Initialize dependency set iterator.
| ds | dependency set |
| unsigned int rpmdsInstance | ( | rpmds | ds | ) |
Return dependency header instance, ie whether the dependency comes from an installed header or not.
| ds | dependency set |
| int rpmdsIsRich | ( | rpmds | dep | ) |
Return if current depenency is rich.
| dep | the dependency |
| int rpmdsIx | ( | const rpmds | ds | ) |
Return dependency set index.
| ds | dependency set |
Reference a dependency set instance.
| ds | dependency set |
Compare package provides dependencies from header with a single dependency.
| h | header |
| ix | index in header provides |
| req | dependency set |
| nopromote | Don't promote Epoch: in comparison? |
Merge a dependency set maintaining (N,EVR,Flags) sorted order.
| *dsp | (merged) dependency set |
| ods | dependency set to merge |
| const char* rpmdsN | ( | const rpmds | ds | ) |
Return current dependency name.
| ds | dependency set |
Create and load a dependency set.
| h | header |
| tagN | type of dependency |
| flags | unused |
| char* rpmdsNewDNEVR | ( | const char * | dspfx, |
| const rpmds | ds | ||
| ) |
Return new formatted dependency string.
| dspfx | formatted dependency string prefix |
| ds | dependency set |
| rpmds rpmdsNewPool | ( | rpmstrPool | pool, |
| Header | h, | ||
| rpmTagVal | tagN, | ||
| int | flags | ||
| ) |
Create and load a dependency set.
| pool | shared string pool (or NULL for private pool) |
| h | header |
| tagN | type of dependency |
| flags | unused |
| int rpmdsNext | ( | rpmds | ds | ) |
Return next dependency set iterator index.
| ds | dependency set |
| int rpmdsNoPromote | ( | const rpmds | ds | ) |
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 |
| void rpmdsNotify | ( | rpmds | ds, |
| const char * | where, | ||
| int | rc | ||
| ) |
Notify of results of dependency match.
| ds | dependency set |
| where | where dependency was resolved (or NULL) |
| rc | 0 == YES, otherwise NO |
Compare package name-version-release from header with a single dependency.
| h | header |
| req | dependency set |
| nopromote | Don't promote Epoch: in comparison? |
| rpmRC rpmdsParseRichDep | ( | rpmds | dep, |
| rpmds * | leftds, | ||
| rpmds * | rightds, | ||
| rpmrichOp * | op, | ||
| char ** | emsg | ||
| ) |
Parse a rich dependency string.
| dep | the dependency |
| leftds | returns the left dependency |
| rightds | returns the right dependency |
| op | returns the rich dep op |
| emsg | returns the error string |
Write content of the dependency set to the header.
| ds | dependency set |
| h | header |
| int rpmdsRpmlib | ( | rpmds * | dsp, |
| const void * | tblp | ||
| ) |
Load rpmlib provides into a dependency set.
| *dsp | (loaded) depedency set |
| tblp | rpmlib provides table (NULL uses internal table) |
| int rpmdsRpmlibPool | ( | rpmstrPool | pool, |
| rpmds * | dsp, | ||
| const void * | tblp | ||
| ) |
Load rpmlib provides into a dependency set.
| pool | shared string pool (or NULL for private pool) |
| *dsp | (loaded) depedency set |
| tblp | rpmlib provides table (NULL uses internal table) |
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. |
| rpm_color_t rpmdsSetColor | ( | const rpmds | ds, |
| rpm_color_t | color | ||
| ) |
Return current dependency color.
| ds | dependency set |
| color | new dependency color |
| int rpmdsSetIx | ( | rpmds | ds, |
| int | ix | ||
| ) |
Set dependency set index.
| ds | dependency set |
| ix | new index |
| int rpmdsSetNoPromote | ( | rpmds | ds, |
| int | nopromote | ||
| ) |
Set "Don't promote Epoch:" flag.
| ds | dependency set |
| nopromote | Should an unspecified Epoch: be treated as Epoch: 0? |
| rpmds rpmdsSingle | ( | rpmTagVal | tagN, |
| const char * | N, | ||
| const char * | EVR, | ||
| rpmsenseFlags | Flags | ||
| ) |
Create, load and initialize a dependency set of size 1.
| tagN | type of dependency |
| N | name |
| EVR | epoch:version-release |
| Flags | comparison flags |
| rpmds rpmdsSinglePool | ( | rpmstrPool | pool, |
| rpmTagVal | tagN, | ||
| const char * | N, | ||
| const char * | EVR, | ||
| rpmsenseFlags | Flags | ||
| ) |
Create, load and initialize a dependency set of size 1.
| pool | string pool (or NULL for private pool) |
| tagN | type of dependency |
| N | name |
| EVR | epoch:version-release |
| Flags | comparison flags |
| rpmds rpmdsSinglePoolTix | ( | rpmstrPool | pool, |
| rpmTagVal | tagN, | ||
| const char * | N, | ||
| const char * | EVR, | ||
| rpmsenseFlags | Flags, | ||
| int | triggerIndex | ||
| ) |
Create, load and initialize a trigger dependency set of size 1.
| pool | string pool (or NULL for private pool) |
| tagN | type of dependency |
| N | name |
| EVR | epoch:version-release |
| Flags | comparison flags |
| triggerIndex | trigger index |
Return current dependency type.
| ds | dependency set |
Return current dependency type.
| ds | dependency set |
Return current dependency type.
| ds | dependency set |
Return current dependency type.
| ds | dependency set |
| rpmds rpmdsThis | ( | Header | h, |
| rpmTagVal | tagN, | ||
| rpmsenseFlags | Flags | ||
| ) |
Create, load and initialize a dependency for this header.
| h | header |
| tagN | type of dependency |
| Flags | comparison flags |
| rpmds rpmdsThisPool | ( | rpmstrPool | pool, |
| Header | h, | ||
| rpmTagVal | tagN, | ||
| rpmsenseFlags | Flags | ||
| ) |
Create, load and initialize a dependency for this header.
| pool | string pool (or NULL for private pool) |
| h | header |
| tagN | type of dependency |
| Flags | comparison flags |
| int rpmdsTi | ( | const rpmds | ds | ) |
Return current dependency triggerindex.
| ds | dependency set |
| rpmsenseFlags rpmParseDSFlags | ( | const char * | str, |
| size_t | len | ||
| ) |
Convert a string to the sense flags.
| str | the string |
| len | length of the string |
| const char* rpmrichOpStr | ( | rpmrichOp | op | ) |
Return a string representation of the rich dependency op.
| op | the dependency op |
| rpmRC rpmrichParse | ( | const char ** | dstrp, |
| char ** | emsg, | ||
| rpmrichParseFunction | cb, | ||
| void * | cbdata | ||
| ) |
Parse a rich dependency string.
| dstrp | pointer to sting, will be updated |
| emsg | returns the error string, can be NULL |
| cb | callback function |
| cbdata | callback function data |
| rpmsenseFlags rpmSanitizeDSFlags | ( | rpmTagVal | tagN, |
| rpmsenseFlags | Flags | ||
| ) |
Return only those flags allowed for given type of dependencies.
| tagN | type of dependency |
| Flags | flags |
| int _rpmds_nopromote |
1.8.9.1