rpm
5.2.1
|
Structures used for managing added/available package lists. More...
#include <rpmfi.h>
Go to the source code of this file.
Defines | |
#define | RPMAL_NOMATCH ((alKey)-1L) |
Typedefs | |
typedef void * | alKey |
An added/available package retrieval key. | |
typedef int | alNum |
An added/available package retrieval index. | |
typedef struct rpmal_s * | rpmal |
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, rpmuint32_t tscolor) |
Add package to available list. | |
void | rpmalAddProvides (rpmal al, alKey pkgKey, rpmds provides, rpmuint32_t tscolor) |
Add package provides to available list index. | |
void | rpmalMakeIndex (rpmal al) |
Generate index for available list. | |
fnpyKey * | rpmalAllFileSatisfiesDepend (const rpmal al, const rpmds ds, alKey *keyp) |
Check added package file lists for package(s) that provide a file. | |
fnpyKey * | rpmalAllSatisfiesDepend (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 |
Structures used for managing added/available package lists.
Definition in file rpmal.h.
#define RPMAL_NOMATCH ((alKey)-1L) |
Definition at line 20 of file rpmal.h.
Referenced by addRelation(), init_rpm(), rpmalAdd(), rpmalAllFileSatisfiesDepend(), rpmalAllSatisfiesDepend(), rpmteAddedKey(), rpmteSetAddedKey(), rpmtsAddEraseElement(), rpmtsAddInstallElement(), rpmtsEraseDebuginfo(), and rpmtsOrder().
alKey rpmalAdd | ( | rpmal * | alistp, |
alKey | pkgKey, | ||
fnpyKey | key, | ||
rpmds | provides, | ||
rpmfi | fi, | ||
rpmuint32_t | tscolor | ||
) |
Add package to available list.
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 |
Definition at line 341 of file rpmal.c.
References alKey2Num(), alloca(), rpmal_s::alloced, fileIndexEntry_s::baseName, fileIndexEntry_s::baseNameLen, dc, rpmal_s::delta, dieCompare(), dirInfo_s::dirName, dirInfo_s::dirNameLen, rpmal_s::dirs, availablePackage_s::fi, fileIndexEntry_s::ficolor, fieCompare(), dirInfo_s::files, availablePackage_s::key, rpmal_s::list, rpmal_s::numDirs, dirInfo_s::numFiles, fileIndexEntry_s::pkgNum, availablePackage_s::provides, RPMAL_NOMATCH, rpmalCreate(), rpmalDel(), rpmalFreeIndex(), rpmdsLink(), rpmfiBN(), rpmfiDC(), rpmfiDN(), rpmfiDX(), rpmfiFC(), rpmfiFColor(), rpmfiInit(), rpmfiLink(), rpmfiNext(), rpmfiSetDX(), rpmfiUnlink(), rpmal_s::size, availablePackage_s::tscolor, xrealloc(), and xstrdup().
Referenced by rpmal_Add(), rpmtsAddInstallElement(), and rpmtsOrder().
void rpmalAddProvides | ( | rpmal | al, |
alKey | pkgKey, | ||
rpmds | provides, | ||
rpmuint32_t | tscolor | ||
) |
Add package provides to available list index.
al | available list |
pkgKey | package key |
provides | added package provides |
tscolor | transaction color bits |
Definition at line 521 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(), 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.
al | available list |
ds | dependency set |
keyp | added package key pointer (or NULL) |
Definition at line 594 of file rpmal.c.
References _, _free(), alloca(), alNum2Key(), fileIndexEntry_s::baseName, fileIndexEntry_s::baseNameLen, dieCompare(), dirName, dirInfo_s::dirName, dirInfo_s::dirNameLen, rpmal_s::dirs, fileIndexEntry_s::ficolor, fieCompare(), dirInfo_s::files, availablePackage_s::key, rpmal_s::list, rpmal_s::numDirs, dirInfo_s::numFiles, 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.
al | available list |
ds | dependency set |
keyp | added package key pointer (or NULL) |
Definition at line 683 of file rpmal.c.
References _, _free(), alKey2Num(), alloca(), availableIndexEntry_s::entry, availableIndexEntry_s::entryIx, availableIndexEntry_s::entryLen, availableIndex_s::index, rpmal_s::index, indexcmp(), availablePackage_s::key, rpmal_s::list, availableIndexEntry_s::pkgKey, availablePackage_s::provides, RPMAL_NOMATCH, rpmalAllFileSatisfiesDepend(), rpmdsCompare(), rpmdsN(), rpmdsNext(), rpmdsNotify(), rpmdsSetIx(), availableIndex_s::size, availableIndexEntry_s::type, and xrealloc().
Referenced by checkPackageDeps(), rpmalSatisfiesDepend(), and rpmtsAvailable().
rpmal rpmalCreate | ( | int | delta | ) |
Initialize available packckages, items, and directory list.
delta | no. of entries to add on each realloc |
Definition at line 159 of file rpmal.c.
References rpmal_s::alloced, rpmal_s::delta, rpmal_s::dirs, availableIndex_s::index, rpmal_s::index, rpmal_s::list, rpmal_s::numDirs, availableIndex_s::size, rpmal_s::size, and xcalloc().
Referenced by rpmalAdd().
Delete package from available list.
al | available list |
pkgKey | package key |
Definition at line 257 of file rpmal.c.
References _free(), alKey2Num(), alloca(), dieCompare(), dirInfo_s::dirName, dirInfo_s::dirNameLen, rpmal_s::dirs, availablePackage_s::fi, dirInfo_s::files, rpmal_s::list, rpmal_s::numDirs, dirInfo_s::numFiles, fileIndexEntry_s::pkgNum, availablePackage_s::provides, rpmdsFree(), rpmfiDC(), rpmfiDN(), rpmfiFC(), rpmfiFree(), rpmfiSetDX(), and xrealloc().
Referenced by rpmal_Del(), and rpmalAdd().
Free available packages, items, and directory members.
al | available list |
Definition at line 177 of file rpmal.c.
References _free(), rpmal_s::alloced, dirInfo_s::dirName, rpmal_s::dirs, availablePackage_s::fi, dirInfo_s::files, rpmal_s::list, rpmal_s::numDirs, availablePackage_s::provides, rpmalFreeIndex(), rpmdsFree(), rpmfiFree(), and rpmal_s::size.
Referenced by rpmal_dealloc(), rpmtsClean(), and rpmtsFini().
void rpmalMakeIndex | ( | rpmal | al | ) |
Generate index for available list.
al | available list |
Definition at line 564 of file rpmal.c.
References alNum2Key(), availableIndex_s::index, rpmal_s::index, indexcmp(), availableIndex_s::k, rpmal_s::list, availablePackage_s::provides, rpmalAddProvides(), rpmdsCount(), availableIndex_s::size, rpmal_s::size, availablePackage_s::tscolor, and xrealloc().
Referenced by rpmal_MakeIndex(), 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.
al | available list |
ds | dependency set |
keyp | added package key pointer (or NULL) |
Definition at line 769 of file rpmal.c.
References rpmalAllSatisfiesDepend().
Referenced by addRelation(), and unsatisfiedDepend().
int _rpmal_debug |