rpm 6.1.90
The RPM Package Manager
Loading...
Searching...
No Matches
#include <time.h>
#include <rpm/rpmtypes.h>
#include <rpm/rpmutil.h>
#include <rpm/rpmps.h>
Include dependency graph for rpmds.h:
This graph shows which files directly or indirectly include this file:

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)
#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|RPMSENSE_PREUNTRANS|RPMSENSE_POSTUNTRANS)
#define _UNORDERED_ONLY_MASK   _notpre(RPMSENSE_RPMLIB|RPMSENSE_CONFIG|RPMSENSE_PRETRANS|RPMSENSE_POSTTRANS|RPMSENSE_PREUNTRANS|RPMSENSE_POSTUNTRANS|RPMSENSE_SCRIPT_VERIFY|RPMSENSE_META)
#define _FORCE_ORDER_ONLY_MASK   _notpre(RPMSENSE_SCRIPT_PRE|RPMSENSE_SCRIPT_POST|RPMSENSE_SCRIPT_PREUN|RPMSENSE_SCRIPT_POSTUN)
#define isLegacyPreReq(_x)
#define isInstallPreReq(_x)
#define isErasePreReq(_x)
#define isUnorderedReq(_x)
#define isTransientReq(_x)

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)

Enumerations

enum  rpmsenseFlags_e {
  RPMSENSE_ANY = 0 , RPMSENSE_LESS = (1 << 1) , RPMSENSE_GREATER = (1 << 2) , RPMSENSE_EQUAL = (1 << 3) ,
  RPMSENSE_POSTTRANS = (1 << 5) , RPMSENSE_PREREQ = (1 << 6) , RPMSENSE_PRETRANS = (1 << 7) , RPMSENSE_INTERP = (1 << 8) ,
  RPMSENSE_SCRIPT_PRE = (1 << 9) , RPMSENSE_SCRIPT_POST = (1 << 10) , RPMSENSE_SCRIPT_PREUN = (1 << 11) , RPMSENSE_SCRIPT_POSTUN = (1 << 12) ,
  RPMSENSE_SCRIPT_VERIFY = (1 << 13) , RPMSENSE_FIND_REQUIRES = (1 << 14) , RPMSENSE_FIND_PROVIDES = (1 << 15) , RPMSENSE_TRIGGERIN = (1 << 16) ,
  RPMSENSE_TRIGGERUN = (1 << 17) , RPMSENSE_TRIGGERPOSTUN = (1 << 18) , RPMSENSE_MISSINGOK = (1 << 19) , RPMSENSE_PREUNTRANS = (1 << 20) ,
  RPMSENSE_POSTUNTRANS = (1 << 21) , RPMSENSE_RPMLIB = (1 << 24) , RPMSENSE_TRIGGERPREIN = (1 << 25) , RPMSENSE_KEYRING = (1 << 26) ,
  RPMSENSE_CONFIG = (1 << 28) , RPMSENSE_META = (1 << 29)
}
enum  rpmrichOp_e {
  RPMRICHOP_NONE = 0 , RPMRICHOP_SINGLE = 1 , RPMRICHOP_AND = 2 , RPMRICHOP_OR = 3 ,
  RPMRICHOP_IF = 4 , RPMRICHOP_ELSE = 5 , RPMRICHOP_WITH = 6 , RPMRICHOP_WITHOUT = 7 ,
  RPMRICHOP_UNLESS = 8
}
enum  rpmrichParseType_e { RPMRICH_PARSE_SIMPLE = 1 , RPMRICH_PARSE_ENTER = 2 , RPMRICH_PARSE_LEAVE = 3 , RPMRICH_PARSE_OP = 4 }

Functions

RPM_PUBLIC_API rpmsenseFlags rpmSanitizeDSFlags (rpmTagVal tagN, rpmsenseFlags Flags)
RPM_PUBLIC_API rpmsenseFlags rpmParseDSFlags (const char *str, size_t len)
RPM_PUBLIC_API rpmds rpmdsLink (rpmds ds)
RPM_PUBLIC_API rpmds rpmdsFree (rpmds ds)
RPM_PUBLIC_API rpmds rpmdsNew (Header h, rpmTagVal tagN, int flags)
RPM_PUBLIC_API char * rpmdsNewDNEVR (const char *dspfx, const rpmds ds)
RPM_PUBLIC_API rpmds rpmdsThis (Header h, rpmTagVal tagN, rpmsenseFlags Flags)
RPM_PUBLIC_API rpmds rpmdsSingle (rpmTagVal tagN, const char *N, const char *EVR, rpmsenseFlags Flags)
RPM_PUBLIC_API rpmds rpmdsCurrent (rpmds ds)
RPM_PUBLIC_API int rpmdsPutToHeader (rpmds ds, Header h)
RPM_PUBLIC_API int rpmdsCount (const rpmds ds)
RPM_PUBLIC_API int rpmdsIx (const rpmds ds)
RPM_PUBLIC_API int rpmdsSetIx (rpmds ds, int ix)
RPM_PUBLIC_API const char * rpmdsDNEVR (const rpmds ds)
RPM_PUBLIC_API char rpmdsD (const rpmds ds)
RPM_PUBLIC_API rpmTagVal rpmdsDToTagN (char deptype)
RPM_PUBLIC_API const char * rpmdsN (const rpmds ds)
RPM_PUBLIC_API const char * rpmdsEVR (const rpmds ds)
RPM_PUBLIC_API int rpmdsTi (const rpmds ds)
RPM_PUBLIC_API rpmsenseFlags rpmdsFlags (const rpmds ds)
RPM_PUBLIC_API rpmTagVal rpmdsTagN (const rpmds ds)
RPM_PUBLIC_API rpmTagVal rpmdsTagEVR (const rpmds ds)
RPM_PUBLIC_API rpmTagVal rpmdsTagF (const rpmds ds)
RPM_PUBLIC_API rpmTagVal rpmdsTagTi (const rpmds ds)
RPM_PUBLIC_API unsigned int rpmdsInstance (rpmds ds)
RPM_PUBLIC_API int rpmdsIsWeak (rpmds ds)
RPM_PUBLIC_API int rpmdsIsReverse (rpmds ds)
RPM_PUBLIC_API int rpmdsIsSysuser (rpmds ds, char **sysuser)
RPM_PUBLIC_API rpm_color_t rpmdsColor (const rpmds ds)
RPM_PUBLIC_API rpm_color_t rpmdsSetColor (const rpmds ds, rpm_color_t color)
RPM_PUBLIC_API int rpmdsNext (rpmds ds)
RPM_PUBLIC_API rpmds rpmdsInit (rpmds ds)
RPM_PUBLIC_API int rpmdsFind (rpmds ds, const rpmds ods)
RPM_PUBLIC_API int rpmdsMerge (rpmds *dsp, rpmds ods)
RPM_PUBLIC_API int rpmdsSearch (rpmds ds, rpmds ods)
RPM_PUBLIC_API int rpmdsCompare (const rpmds A, const rpmds B)
RPM_PUBLIC_API int rpmdsAnyMatchesDep (const Header h, const rpmds req, int nopromote)
RPM_PUBLIC_API int rpmdsMatchesDep (const Header h, int ix, const rpmds req, int nopromote)
RPM_PUBLIC_API int rpmdsNVRMatchesDep (const Header h, const rpmds req, int nopromote)
RPM_PUBLIC_API int rpmdsRpmlib (rpmds *dsp, const void *tblp)
RPM_PUBLIC_API rpmds rpmdsNewPool (rpmstrPool pool, Header h, rpmTagVal tagN, int flags)
RPM_PUBLIC_API rpmds rpmdsThisPool (rpmstrPool pool, Header h, rpmTagVal tagN, rpmsenseFlags Flags)
RPM_PUBLIC_API rpmds rpmdsSinglePool (rpmstrPool pool, rpmTagVal tagN, const char *N, const char *EVR, rpmsenseFlags Flags)
RPM_PUBLIC_API rpmds rpmdsSinglePoolTix (rpmstrPool pool, rpmTagVal tagN, const char *N, const char *EVR, rpmsenseFlags Flags, int triggerIndex)
RPM_PUBLIC_API int rpmdsRpmlibPool (rpmstrPool pool, rpmds *dsp, const void *tblp)
RPM_PUBLIC_API rpmRC rpmrichParse (const char **dstrp, char **emsg, rpmrichParseFunction cb, void *cbdata)
RPM_PUBLIC_API rpmRC rpmrichParseForTag (const char **dstrp, char **emsg, rpmrichParseFunction cb, void *cbdata, rpmTagVal tagN)
RPM_PUBLIC_API int rpmdsIsRich (rpmds dep)
RPM_PUBLIC_API const char * rpmrichOpStr (rpmrichOp op)
RPM_PUBLIC_API rpmRC rpmdsParseRichDep (rpmds dep, rpmds *leftds, rpmds *rightds, rpmrichOp *op, char **emsg)

Detailed Description

Structure(s) used for dependency tag sets.

Macro Definition Documentation

◆ _ALL_REQUIRES_MASK

#define _ALL_REQUIRES_MASK
Value:
(\
RPMSENSE_KEYRING | \
RPMSENSE_PREREQ | \
@ RPMSENSE_POSTUNTRANS
Definition rpmds.h:45
@ RPMSENSE_SCRIPT_POSTUN
Definition rpmds.h:35
@ RPMSENSE_INTERP
Definition rpmds.h:31
@ RPMSENSE_PREUNTRANS
Definition rpmds.h:44
@ RPMSENSE_FIND_REQUIRES
Definition rpmds.h:37
@ RPMSENSE_MISSINGOK
Definition rpmds.h:43
@ RPMSENSE_META
Definition rpmds.h:52
@ RPMSENSE_SCRIPT_PRE
Definition rpmds.h:32
@ RPMSENSE_SCRIPT_VERIFY
Definition rpmds.h:36
@ RPMSENSE_SCRIPT_PREUN
Definition rpmds.h:34
@ RPMSENSE_RPMLIB
Definition rpmds.h:47
@ RPMSENSE_SCRIPT_POST
Definition rpmds.h:33
@ RPMSENSE_POSTTRANS
Definition rpmds.h:28
@ RPMSENSE_PRETRANS
Definition rpmds.h:30

◆ _notpre

#define _notpre ( _x)
Value:
((_x) & ~RPMSENSE_PREREQ)

◆ isErasePreReq

#define isErasePreReq ( _x)
Value:
((_x) & _ERASE_ONLY_MASK)

◆ isInstallPreReq

#define isInstallPreReq ( _x)
Value:
((_x) & _INSTALL_ONLY_MASK)

◆ isLegacyPreReq

#define isLegacyPreReq ( _x)
Value:
(((_x) & _ALL_REQUIRES_MASK) == RPMSENSE_PREREQ)

◆ isTransientReq

#define isTransientReq ( _x)
Value:
(isInstallPreReq(_x) && \
!isErasePreReq(_x) && \
!((_x) & RPMSENSE_META))

◆ isUnorderedReq

#define isUnorderedReq ( _x)
Value:
((_x) & _UNORDERED_ONLY_MASK && \
!((_x) & _FORCE_ORDER_ONLY_MASK))

Function Documentation

◆ rpmdsIsRich()

RPM_PUBLIC_API int rpmdsIsRich ( rpmds dep)

Return if current depenency is rich

Parameters
depthe dependency
Returns
1 is dependency is a rich 0 otherwise

◆ rpmdsParseRichDep()

RPM_PUBLIC_API rpmRC rpmdsParseRichDep ( rpmds dep,
rpmds * leftds,
rpmds * rightds,
rpmrichOp * op,
char ** emsg )

Parse a rich dependency string

Parameters
depthe dependency
leftdsreturns the left dependency
rightdsreturns the right dependency
opreturns the rich dep op
emsgreturns the error string
Returns
RPMRC_OK on success

◆ rpmdsRpmlib()

RPM_PUBLIC_API int rpmdsRpmlib ( rpmds * dsp,
const void * tblp )

Load rpmlib provides into a dependency set.

Parameters
[out]*dsp(loaded) dependency set
tblprpmlib provides table (NULL uses internal table)
Returns
0 on success

◆ rpmdsRpmlibPool()

RPM_PUBLIC_API int rpmdsRpmlibPool ( rpmstrPool pool,
rpmds * dsp,
const void * tblp )

Load rpmlib provides into a dependency set.

Parameters
poolshared string pool (or NULL for private pool)
[out]*dsp(loaded) dependency set
tblprpmlib provides table (NULL uses internal table)
Returns
0 on success

◆ rpmrichOpStr()

RPM_PUBLIC_API const char * rpmrichOpStr ( rpmrichOp op)

Return a string representation of the rich dependency op

Parameters
opthe dependency op
Returns
constant string, do not free

◆ rpmrichParse()

RPM_PUBLIC_API rpmRC rpmrichParse ( const char ** dstrp,
char ** emsg,
rpmrichParseFunction cb,
void * cbdata )

Parse a rich dependency string

Parameters
dstrppointer to sting, will be updated
emsgreturns the error string, can be NULL
cbcallback function
cbdatacallback function data
Returns
RPMRC_OK on success

◆ rpmrichParseForTag()

RPM_PUBLIC_API rpmRC rpmrichParseForTag ( const char ** dstrp,
char ** emsg,
rpmrichParseFunction cb,
void * cbdata,
rpmTagVal tagN )

Parse a rich dependency string for a specific tag

Parameters
dstrppointer to sting, will be updated
emsgreturns the error string, can be NULL
cbcallback function
cbdatacallback function data
tagNtype of dependency
Returns
RPMRC_OK on success