lib/rpmal.h File Reference

Structures used for managing added/available package lists. More...

Go to the source code of this file.

Typedefs

typedef rpmal_srpmal

Functions

rpmal rpmalCreate (int delta)
 Initialize available packckages, items, and directory list.
rpmal rpmalFree (rpmal al)
 Free available packages, items, and directory members.
void rpmalDel (rpmal al, alKey pkgKey)
 Delete package from available list.
alKey rpmalAdd (rpmal *alistp, alKey pkgKey, fnpyKey key, rpmds provides, rpmfi fi, uint_32 tscolor)
 Add package to available list.
void rpmalAddProvides (rpmal al, alKey pkgKey, rpmds provides, uint_32 tscolor)
 Add package provides to available list index.
void rpmalMakeIndex (rpmal al)
 Generate index for available list.
fnpyKeyrpmalAllFileSatisfiesDepend (const rpmal al, const rpmds ds, alKey *keyp)
 Check added package file lists for package(s) that provide a file.
fnpyKeyrpmalAllSatisfiesDepend (const rpmal al, const rpmds ds, alKey *keyp)
 Check added package file lists for package(s) that have a provide.
fnpyKey rpmalSatisfiesDepend (const rpmal al, const rpmds ds, alKey *keyp)
 Check added package file lists for first package that has a provide.

Variables

int _rpmal_debug


Detailed Description

Structures used for managing added/available package lists.

Definition in file rpmal.h.


Typedef Documentation

typedef struct rpmal_s* rpmal

Definition at line 16 of file rpmal.h.


Function Documentation

alKey rpmalAdd ( rpmal alistp,
alKey  pkgKey,
fnpyKey  key,
rpmds  provides,
rpmfi  fi,
uint_32  tscolor 
)

Add package to available list.

Parameters:
alistp address of available list
pkgKey package key, RPMAL_NOMATCH to force an append
key associated file name/python object
provides provides dependency set
fi file info set
tscolor transaction color bits
Returns:
available package index

Definition at line 419 of file rpmal.c.

References _rpmal_debug, alKey2Num(), alloca(), rpmal_s::alloced, rpmal_s::delta, die(), dieCompare(), rpmal_s::dirs, availablePackage_s::fi, fieCompare(), availablePackage_s::key, rpmal_s::list, next, rpmal_s::numDirs, availablePackage_s::provides, RPMAL_NOMATCH, rpmalCreate(), rpmalDel(), rpmalFreeIndex(), rpmdsLink, rpmfiBN(), rpmfiDC(), rpmfiDN(), rpmfiDX(), rpmfiFC(), rpmfiFColor(), rpmfiFN(), rpmfiInit(), rpmfiLink, rpmfiNext(), rpmfiSetDX(), rpmfiUnlink, rpmal_s::size, availableIndex_s::size, availablePackage_s::tscolor, xrealloc(), and xstrdup().

Referenced by rpmal_Add(), rpmtsAddAvailableElement(), and rpmtsAddInstallElement().

void rpmalAddProvides ( rpmal  al,
alKey  pkgKey,
rpmds  provides,
uint_32  tscolor 
)

Add package provides to available list index.

Parameters:
al available list
pkgKey package key
provides added package provides
tscolor transaction color bits

Definition at line 625 of file rpmal.c.

References alKey2Num(), availableIndexEntry_s::entry, availableIndexEntry_s::entryIx, availableIndexEntry_s::entryLen, availableIndex_s::index, rpmal_s::index, availableIndex_s::k, availableIndexEntry_s::pkgKey, rpmdsColor(), rpmdsInit(), rpmdsIx(), rpmdsN(), rpmdsNext(), availableIndex_s::size, rpmal_s::size, and availableIndexEntry_s::type.

Referenced by rpmal_AddProvides(), and rpmalMakeIndex().

fnpyKey* rpmalAllFileSatisfiesDepend ( const rpmal  al,
const rpmds  ds,
alKey keyp 
)

Check added package file lists for package(s) that provide a file.

Parameters:
al available list
ds dependency set
Return values:
keyp added package key pointer (or NULL)
Returns:
associated package key(s), NULL if none

Definition at line 696 of file rpmal.c.

References _, _free(), _rpmal_debug, alloca(), alNum2Key(), fileIndexEntry_s::baseName, die(), dieCompare(), dirName, rpmal_s::dirs, fileIndexEntry_s::ficolor, fieCompare(), availablePackage_s::key, rpmal_s::list, rpmal_s::numDirs, fileIndexEntry_s::pkgNum, RPMAL_NOMATCH, rpmdsN(), rpmdsNotify(), availablePackage_s::tscolor, xrealloc(), and xstrdup().

Referenced by rpmalAllSatisfiesDepend().

fnpyKey* rpmalAllSatisfiesDepend ( const rpmal  al,
const rpmds  ds,
alKey keyp 
)

Check added package file lists for package(s) that have a provide.

Parameters:
al available list
ds dependency set
Return values:
keyp added package key pointer (or NULL)
Returns:
associated package key(s), NULL if none

Definition at line 797 of file rpmal.c.

References _, _free(), alKey2Num(), alloca(), availableIndex_s::index, rpmal_s::index, indexcmp(), availablePackage_s::key, rpmal_s::list, match(), availablePackage_s::provides, RPMAL_NOMATCH, rpmalAllFileSatisfiesDepend(), rpmdsCompare(), rpmdsN(), rpmdsNext(), rpmdsNotify(), rpmdsSetIx(), availableIndex_s::size, and xrealloc().

Referenced by checkPackageDeps(), rpmalSatisfiesDepend(), and rpmtsAvailable().

rpmal rpmalCreate ( int  delta  ) 

Initialize available packckages, items, and directory list.

Parameters:
delta no. of entries to add on each realloc
Returns:
al new available list

Definition at line 187 of file rpmal.c.

References availableIndex_s::index, availableIndex_s::size, and xcalloc().

Referenced by rpmalAdd().

void rpmalDel ( rpmal  al,
alKey  pkgKey 
)

Delete package from available list.

Parameters:
al available list
pkgKey package key

Definition at line 297 of file rpmal.c.

References _free(), _rpmal_debug, alKey2Num(), alloca(), die(), dieCompare(), rpmal_s::dirs, availablePackage_s::fi, rpmal_s::list, rpmal_s::numDirs, rpmfiDC(), rpmfiDN(), rpmfiFC(), rpmfiSetDX(), and xrealloc().

Referenced by rpmal_Del(), and rpmalAdd().

rpmal rpmalFree ( rpmal  al  ) 

Free available packages, items, and directory members.

Parameters:
al available list
Returns:
NULL always

Definition at line 205 of file rpmal.c.

References _free(), rpmal_s::alloced, die(), rpmal_s::dirs, availablePackage_s::fi, rpmal_s::list, rpmal_s::numDirs, availablePackage_s::provides, rpmalFreeIndex(), rpmdsFree(), rpmfiFree(), and rpmal_s::size.

Referenced by rpmal_dealloc(), rpmtsClean(), and rpmtsFree().

void rpmalMakeIndex ( rpmal  al  ) 

Generate index for available list.

Parameters:
al available list

Definition at line 666 of file rpmal.c.

References availableIndex_s::index, rpmal_s::index, indexcmp(), availableIndex_s::k, rpmal_s::list, availablePackage_s::provides, rpmalAddProvides(), rpmdsCount(), rpmal_s::size, availableIndex_s::size, availablePackage_s::tscolor, and xrealloc().

Referenced by rpmal_MakeIndex(), rpmts_Check(), rpmtsCheck(), rpmtsOrder(), and unsatisfiedDepend().

fnpyKey rpmalSatisfiesDepend ( const rpmal  al,
const rpmds  ds,
alKey keyp 
)

Check added package file lists for first package that has a provide.

Todo:
Eliminate.
Parameters:
al available list
ds dependency set
Return values:
keyp added package key pointer (or NULL)
Returns:
associated package key, NULL if none

Definition at line 885 of file rpmal.c.

References rpmalAllSatisfiesDepend().

Referenced by addRelation(), and unsatisfiedDepend().


Variable Documentation

int _rpmal_debug

Definition at line 18 of file rpmal.c.


Generated on Fri Oct 12 08:44:55 2007 for rpm by  doxygen 1.5.2