Main Page   Modules   Data Structures   File List   Data Fields   Globals   Related Pages  

lib/rpmds.h File Reference

Structure(s) used for dependency tag sets. More...

#include "rpmps.h"

Go to the source code of this file.

Defines

#define rpmdsUnlink(_ds, _msg)   XrpmdsUnlink(_ds, _msg, __FILE__, __LINE__)
#define rpmdsLink(_ds, _msg)   XrpmdsLink(_ds, _msg, __FILE__, __LINE__)

Functions

rpmds rpmdsUnlink (rpmds ds, const char *msg)
 Unreference a dependency set instance. More...

rpmds XrpmdsUnlink (rpmds ds, const char *msg, const char *fn, unsigned ln)
rpmds rpmdsLink (rpmds ds, const char *msg)
 Reference a dependency set instance. More...

rpmds XrpmdsLink (rpmds ds, const char *msg, const char *fn, unsigned ln)
rpmds rpmdsFree (rpmds ds)
 Destroy a dependency set. More...

rpmds rpmdsNew (Header h, rpmTag tagN, int scareMem)
 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, rpmTag tagN, int_32 Flags)
 Create, load and initialize a dependency for this header. More...

rpmds rpmdsSingle (rpmTag tagN, const char *N, const char *EVR, int_32 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 (const rpmds ds)
 Return current dependency name. More...

const char * rpmdsEVR (const rpmds ds)
 Return current dependency epoch-version-release. More...

int_32 rpmdsFlags (const rpmds ds)
 Return current dependency flags. More...

rpmTag rpmdsTagN (const rpmds ds)
 Return current dependency 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 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 rpmdsCompare (const rpmds A, const rpmds B)
 Compare two versioned dependency ranges, looking for overlap. 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...


Variables

int _rpmds_debug
int _rpmds_nopromote


Detailed Description

Structure(s) used for dependency tag sets.

Definition in file rpmds.h.


Define Documentation

#define rpmdsLink _ds,
_msg       XrpmdsLink(_ds, _msg, __FILE__, __LINE__)
 

Definition at line 94 of file rpmds.h.

Referenced by rpmalAdd, rpmdsNew, rpmdsSingle, rpmdsThis, rpmte_DS, and rpmtsAddInstallElement.

#define rpmdsUnlink _ds,
_msg       XrpmdsUnlink(_ds, _msg, __FILE__, __LINE__)
 

Definition at line 77 of file rpmds.h.

Referenced by rpmdsFree.


Function Documentation

int rpmdsAnyMatchesDep const Header    h,
const rpmds    req,
int    nopromote
 

Compare package provides dependencies from header with a single dependency.

Parameters:
h  header
req  dependency set
nopromote  Don't promote Epoch: in comparison?
Returns:
1 if any dependency overlaps, 0 otherwise

Definition at line 683 of file rpmds.c.

Referenced by rpmtsAddInstallElement, rpmtsSolve, and unsatisfiedDepend.

int rpmdsCompare const rpmds    A,
const rpmds    B
 

Compare two versioned dependency ranges, looking for overlap.

Parameters:
A  1st dependency
B  2nd dependency
Returns:
1 if dependencies overlap, 0 otherwise

Definition at line 572 of file rpmds.c.

Referenced by ftsStashLatest, rpmalAllSatisfiesDepend, rpmCheckRpmlibProvides, rpmds_compare, rpmdsAnyMatchesDep, rpmdsNVRMatchesDep, and rpmtsAddInstallElement.

int rpmdsCount const rpmds    ds
 

Return dependency set count.

Parameters:
ds  dependency set
Returns:
current count

Definition at line 365 of file rpmds.c.

Referenced by rpmalMakeIndex, rpmds_Count, and rpmds_length.

const char* rpmdsDNEVR const rpmds    ds
 

Return current formatted dependency string.

Parameters:
ds  dependency set
Returns:
current dependency DNEVR, NULL on invalid

Definition at line 386 of file rpmds.c.

Referenced by rpmds_DNEVR, rpmds_print, rpmds_subscript, rpmdsProblem, rpmShowRpmlibProvides, rpmts_SolveCallback, rpmtsAddInstallElement, and unsatisfiedDepend.

const char* rpmdsEVR const rpmds    ds
 

Return current dependency epoch-version-release.

Parameters:
ds  dependency set
Returns:
current dependency EVR, NULL on invalid

Definition at line 412 of file rpmds.c.

Referenced by rpmds_EVR, rpmds_iternext, rpmdsProblem, rpmts_SolveCallback, and rpmtsAddInstallElement.

int_32 rpmdsFlags const rpmds    ds
 

Return current dependency flags.

Parameters:
ds  dependency set
Returns:
current dependency flags, 0 on invalid

Definition at line 425 of file rpmds.c.

Referenced by checkPackageDeps, rpmalAddProvides, rpmds_Flags, rpmds_iternext, rpmts_SolveCallback, rpmtsOrder, unsatisfiedDepend, and zapRelation.

rpmds rpmdsFree rpmds    ds
 

Destroy a dependency set.

Parameters:
ds  dependency set
Returns:
NULL always

Definition at line 54 of file rpmds.c.

References rpmds, rpmdsUnlink, and XrpmdsUnlink.

Referenced by checkPackageSet, freeItem, ftsStashLatest, rpmalDel, rpmalFree, rpmCheckRpmlibProvides, rpmds_dealloc, rpmdsAnyMatchesDep, rpmdsNVRMatchesDep, rpmInstall, rpmShowRpmlibProvides, rpmteCleanDS, rpmtsAddAvailableElement, and rpmtsAddInstallElement.

rpmds rpmdsInit rpmds    ds
 

Initialize dependency set iterator.

Parameters:
ds  dependency set
Returns:
dependency set

Definition at line 510 of file rpmds.c.

Referenced by checkPackageDeps, rpmalAddProvides, rpmds_iternext, rpmds_print, rpmdsAnyMatchesDep, rpmtsAddInstallElement, rpmtsCheck, and rpmtsOrder.

int rpmdsIx const rpmds    ds
 

Return dependency set index.

Parameters:
ds  dependency set
Returns:
current index

Definition at line 370 of file rpmds.c.

Referenced by addRelation, rpmalAddProvides, and rpmds_Ix.

rpmds rpmdsLink rpmds    ds,
const char *    msg
 

Reference a dependency set instance.

Parameters:
ds  dependency set
msg 
Returns:
new dependency set reference

const char* rpmdsN const rpmds    ds
 

Return current dependency name.

Parameters:
ds  dependency set
Returns:
current dependency name, NULL on invalid

Definition at line 399 of file rpmds.c.

Referenced by addRelation, checkPackageDeps, cmpItem, rpmalAddProvides, rpmalAllFileSatisfiesDepend, rpmalAllSatisfiesDepend, rpmds_iternext, rpmds_N, rpmdsProblem, rpmts_SolveCallback, rpmtsAddInstallElement, rpmtsCheck, rpmtsSolve, and unsatisfiedDepend.

rpmds rpmdsNew Header    h,
rpmTag    tagN,
int    scareMem
 

Create and load a dependency set.

Parameters:
h  header
tagN  type of dependency
scareMem  Use pointers to refcounted header memory?
Returns:
new dependency set

Definition at line 115 of file rpmds.c.

Referenced by addTE, checkPackageSet, hdr_dsFromHeader, rpmdsAnyMatchesDep, and rpmtsAddAvailableElement.

char* rpmdsNewDNEVR const char *    dspfx,
const rpmds    ds
 

Return new formatted dependency string.

Parameters:
dspfx  formatted dependency string prefix
ds  dependency set
Returns:
new formatted dependency (malloc'ed)

Definition at line 192 of file rpmds.c.

Referenced by rpmdsNext, rpmdsSingle, rpmdsThis, and zapRelation.

int rpmdsNext rpmds    ds
 

Return next dependency set iterator index.

Parameters:
ds  dependency set
Returns:
dependency set iterator index, -1 on termination

Definition at line 481 of file rpmds.c.

Referenced by checkPackageDeps, rpmalAddProvides, rpmalAllSatisfiesDepend, rpmds_iternext, rpmds_print, rpmdsAnyMatchesDep, rpmtsAddInstallElement, rpmtsCheck, and rpmtsOrder.

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.

Parameters:
ds  dependency set
Returns:
current "Don't promote Epoch:" flag

Definition at line 448 of file rpmds.c.

void rpmdsNotify rpmds    ds,
const char *    where,
int    rc
 

Notify of results of dependency match.

Parameters:
ds  dependency set
where  where dependency was resolved (or NULL)
rc  0 == YES, otherwise NO

Definition at line 468 of file rpmds.c.

Referenced by rpmalAllFileSatisfiesDepend, rpmalAllSatisfiesDepend, and unsatisfiedDepend.

int rpmdsNVRMatchesDep const Header    h,
const rpmds    req,
int    nopromote
 

Compare package name-version-release from header with a single dependency.

Deprecated:
Remove from API when obsoletes is correctly implemented.
Parameters:
h  header
req  dependency set
nopromote  Don't promote Epoch: in comparison?
Returns:
1 if dependency overlaps, 0 otherwise

Definition at line 734 of file rpmds.c.

void rpmdsProblem rpmps    ps,
const char *    pkgNEVR,
const rpmds    ds,
const fnpyKey *    suggestedKeys,
int    adding
 

Report a Requires: or Conflicts: dependency problem.

Parameters:
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 653 of file rpmds.c.

Referenced by checkPackageDeps.

int rpmdsSetIx rpmds    ds,
int    ix
 

Set dependency set index.

Parameters:
ds  dependency set
ix  new index
Returns:
current index

Definition at line 375 of file rpmds.c.

Referenced by rpmalAllSatisfiesDepend, rpmds_subscript, and zapRelation.

int rpmdsSetNoPromote rpmds    ds,
int    nopromote
 

Set "Don't promote Epoch:" flag.

Parameters:
ds  dependency set
Returns:
previous "Don't promote Epoch:" flag

Definition at line 457 of file rpmds.c.

Referenced by checkPackageSet, rpmdsAnyMatchesDep, and rpmdsNVRMatchesDep.

rpmds rpmdsSingle rpmTag    tagN,
const char *    N,
const char *    EVR,
int_32    Flags
 

Create, load and initialize a dependency set of size 1.

Parameters:
tagN  type of dependency
N  name
EVR  epoch:version-release
Flags  comparison flags
Returns:
new dependency set

Definition at line 316 of file rpmds.c.

Referenced by rpmCheckRpmlibProvides, rpmds_Single, rpmdsNVRMatchesDep, rpmInstall, and rpmShowRpmlibProvides.

rpmTag rpmdsTagN const rpmds    ds
 

Return current dependency type.

Parameters:
ds  dependency set
Returns:
current dependency type, 0 on invalid

Definition at line 438 of file rpmds.c.

Referenced by rpmds_TagN, and rpmtsSolve.

rpmds rpmdsThis Header    h,
rpmTag    tagN,
int_32    Flags
 

Create, load and initialize a dependency for this header.

Parameters:
h  header
tagN  type of dependency
Flags  comparison flags
Returns:
new dependency set

Definition at line 236 of file rpmds.c.

Referenced by addTE, ftsStashLatest, hdr_dsOfHeader, and rpmtsAddInstallElement.

rpmds rpmdsUnlink rpmds    ds,
const char *    msg
 

Unreference a dependency set instance.

Parameters:
ds  dependency set
msg 
Returns:
NULL always

rpmds XrpmdsLink rpmds    ds,
const char *    msg,
const char *    fn,
unsigned    ln
 

Todo:
Remove debugging entry from the ABI.

Definition at line 41 of file rpmds.c.

References int_32, N, and rpmTagType.

rpmds XrpmdsUnlink rpmds    ds,
const char *    msg,
const char *    fn,
unsigned    ln
 

Todo:
Remove debugging entry from the ABI.

Definition at line 30 of file rpmds.c.

References rpmTag.

Referenced by rpmdsFree.


Variable Documentation

int _rpmds_debug
 

Definition at line 15 of file rpmds.h.

int _rpmds_nopromote
 

Definition at line 22 of file rpmds.h.


Generated on Tue Sep 17 15:56:49 2002 for rpm by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002