Start merging file info into dependency set.
CVS patchset: 5157 CVS date: 2001/11/05 14:09:22
This commit is contained in:
parent
a5a5eed7c4
commit
0724785fb3
|
@ -819,23 +819,12 @@ static int checkPackageDeps(rpmTransactionSet ts, problemsSet psp,
|
||||||
|
|
||||||
suggestedPkgs = NULL;
|
suggestedPkgs = NULL;
|
||||||
|
|
||||||
#ifdef DYING
|
/*@-branchstate@*/
|
||||||
/*@-branchstate -mods -type@*/ /* FIX: hack to disable noise */
|
|
||||||
#endif
|
|
||||||
if (ts->availablePackages != NULL) {
|
if (ts->availablePackages != NULL) {
|
||||||
#ifdef DYING
|
|
||||||
const char * Type = requires->Type;
|
|
||||||
requires->Type = NULL;
|
|
||||||
#endif
|
|
||||||
suggestedPkgs =
|
suggestedPkgs =
|
||||||
alAllSatisfiesDepend(ts->availablePackages, requires);
|
alAllSatisfiesDepend(ts->availablePackages, requires);
|
||||||
#ifdef DYING
|
|
||||||
requires->Type = Type;
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
#ifdef DYING
|
/*@=branchstate@*/
|
||||||
/*@=branchstate =mods =type@*/
|
|
||||||
#endif
|
|
||||||
|
|
||||||
dsProblem(psp, h, requires, suggestedPkgs);
|
dsProblem(psp, h, requires, suggestedPkgs);
|
||||||
|
|
||||||
|
@ -1170,19 +1159,7 @@ static inline int addRelation(rpmTransactionSet ts,
|
||||||
if (!strncmp(Name, "rpmlib(", sizeof("rpmlib(")-1))
|
if (!strncmp(Name, "rpmlib(", sizeof("rpmlib(")-1))
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
#ifdef DYING
|
pkgKey = alSatisfiesDepend(ts->addedPackages, requires);
|
||||||
/*@-mods -type@*/ /* FIX: hack to disable noise */
|
|
||||||
{ const char * Type = requires->Type;
|
|
||||||
requires->Type = NULL;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
pkgKey = alSatisfiesDepend(ts->addedPackages, requires);
|
|
||||||
|
|
||||||
#ifdef DYING
|
|
||||||
requires->Type = Type;
|
|
||||||
}
|
|
||||||
/*@=mods =type@*/
|
|
||||||
#endif
|
|
||||||
|
|
||||||
if (_te_debug)
|
if (_te_debug)
|
||||||
fprintf(stderr, "addRelation: pkgKey %ld\n", (long)pkgKey);
|
fprintf(stderr, "addRelation: pkgKey %ld\n", (long)pkgKey);
|
||||||
|
|
113
lib/rpmal.c
113
lib/rpmal.c
|
@ -31,6 +31,8 @@ typedef /*@abstract@*/ struct availableIndex_s * availableIndex;
|
||||||
|
|
||||||
/*@access alKey@*/
|
/*@access alKey@*/
|
||||||
/*@access alNum@*/
|
/*@access alNum@*/
|
||||||
|
|
||||||
|
/*@access rpmFNSet@*/
|
||||||
/*@access rpmDepSet@*/
|
/*@access rpmDepSet@*/
|
||||||
|
|
||||||
/** \ingroup rpmdep
|
/** \ingroup rpmdep
|
||||||
|
@ -45,16 +47,22 @@ struct availablePackage_s {
|
||||||
const char * version; /*!< Header version. */
|
const char * version; /*!< Header version. */
|
||||||
/*@dependent@*/
|
/*@dependent@*/
|
||||||
const char * release; /*!< Header release. */
|
const char * release; /*!< Header release. */
|
||||||
|
/*@dependent@*//*@null@*/
|
||||||
|
int_32 * epoch; /*!< Header epoch (if any). */
|
||||||
|
|
||||||
/*@owned@*/ /*@null@*/
|
/*@owned@*/ /*@null@*/
|
||||||
rpmDepSet provides; /*!< Provides: dependencies. */
|
rpmDepSet provides; /*!< Provides: dependencies. */
|
||||||
/*@owned@*/ /*@null@*/
|
/*@owned@*/ /*@null@*/
|
||||||
rpmDepSet requires; /*!< Requires: dependencies. */
|
rpmDepSet requires; /*!< Requires: dependencies. */
|
||||||
/*@owned@*//*@null@*/
|
|
||||||
const char ** baseNames; /*!< Header file basenames. */
|
#ifdef DYING
|
||||||
/*@dependent@*//*@null@*/
|
/*@dependent@*//*@null@*/
|
||||||
int_32 * epoch; /*!< Header epoch (if any). */
|
const char ** baseNames; /*!< Header file basenames. */
|
||||||
int filesCount; /*!< No. of files in header. */
|
int filesCount; /*!< No. of files in header. */
|
||||||
|
#else
|
||||||
|
/*@owned@*//*@null@*/
|
||||||
|
rpmFNSet fns; /*!< File name set. */
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef DYING
|
#ifdef DYING
|
||||||
uint_32 multiLib; /* MULTILIB */
|
uint_32 multiLib; /* MULTILIB */
|
||||||
|
@ -185,11 +193,17 @@ int alGetMultiLib(const availableList al, alKey pkgKey)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef DYING
|
||||||
int alGetFilesCount(const availableList al, alKey pkgKey)
|
int alGetFilesCount(const availableList al, alKey pkgKey)
|
||||||
{
|
{
|
||||||
availablePackage alp = alGetPkg(al, pkgKey);
|
availablePackage alp = alGetPkg(al, pkgKey);
|
||||||
return (alp != NULL ? alp->filesCount : 0);
|
int_32 filesCount = 0;
|
||||||
|
if (alp != NULL)
|
||||||
|
if (alp->fns != NULL)
|
||||||
|
filesCount = alp->fns->Count;
|
||||||
|
return filesCount;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
rpmDepSet alGetProvides(const availableList al, alKey pkgKey)
|
rpmDepSet alGetProvides(const availableList al, alKey pkgKey)
|
||||||
{
|
{
|
||||||
|
@ -261,21 +275,27 @@ availableList alCreate(int delta)
|
||||||
|
|
||||||
availableList alFree(availableList al)
|
availableList alFree(availableList al)
|
||||||
{
|
{
|
||||||
|
#ifdef DYING
|
||||||
HFD_t hfd = headerFreeData;
|
HFD_t hfd = headerFreeData;
|
||||||
availablePackage p;
|
#endif
|
||||||
|
availablePackage alp;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
if (al == NULL)
|
if (al == NULL)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
if ((p = al->list) != NULL)
|
if ((alp = al->list) != NULL)
|
||||||
for (i = 0; i < al->size; i++, p++) {
|
for (i = 0; i < al->size; i++, alp++) {
|
||||||
|
|
||||||
p->provides = dsFree(p->provides);
|
alp->provides = dsFree(alp->provides);
|
||||||
p->requires = dsFree(p->requires);
|
alp->requires = dsFree(alp->requires);
|
||||||
|
|
||||||
p->baseNames = hfd(p->baseNames, -1);
|
#ifdef DYING
|
||||||
p->h = headerFree(p->h, "alFree");
|
alp->baseNames = hfd(alp->baseNames, -1);
|
||||||
|
#else
|
||||||
|
alp->fns = fnsFree(alp->fns);
|
||||||
|
#endif
|
||||||
|
alp->h = headerFree(alp->h, "alFree");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -330,7 +350,8 @@ if (_al_debug)
|
||||||
fprintf(stderr, "*** del %p[%d] %s-%s-%s\n", al->list, pkgNum, alp->name, alp->version, alp->release);
|
fprintf(stderr, "*** del %p[%d] %s-%s-%s\n", al->list, pkgNum, alp->name, alp->version, alp->release);
|
||||||
/*@=modfilesys@*/
|
/*@=modfilesys@*/
|
||||||
|
|
||||||
if (alp->baseNames != NULL && alp->filesCount > 0) {
|
if (alp->fns != NULL)
|
||||||
|
if (alp->fns->BN != NULL && alp->fns->Count > 0) {
|
||||||
int origNumDirs = al->numDirs;
|
int origNumDirs = al->numDirs;
|
||||||
const char ** dirNames;
|
const char ** dirNames;
|
||||||
int_32 numDirs;
|
int_32 numDirs;
|
||||||
|
@ -400,7 +421,9 @@ alKey alAddPackage(availableList al, alKey pkgKey, Header h)
|
||||||
int scareMem = 1;
|
int scareMem = 1;
|
||||||
HGE_t hge = (HGE_t)headerGetEntryMinMemory;
|
HGE_t hge = (HGE_t)headerGetEntryMinMemory;
|
||||||
HFD_t hfd = headerFreeData;
|
HFD_t hfd = headerFreeData;
|
||||||
|
#ifdef DYING
|
||||||
rpmTagType dnt, bnt;
|
rpmTagType dnt, bnt;
|
||||||
|
#endif
|
||||||
availablePackage alp;
|
availablePackage alp;
|
||||||
alNum pkgNum = alKey2Num(al, pkgKey);
|
alNum pkgNum = alKey2Num(al, pkgKey);
|
||||||
int xx;
|
int xx;
|
||||||
|
@ -463,6 +486,7 @@ fprintf(stderr, "*** add %p[%d] %s-%s-%s\n", al->list, pkgNum, alp->name, alp->v
|
||||||
alp->provides = dsNew(h, RPMTAG_PROVIDENAME, scareMem);
|
alp->provides = dsNew(h, RPMTAG_PROVIDENAME, scareMem);
|
||||||
alp->requires = dsNew(h, RPMTAG_REQUIRENAME, scareMem);
|
alp->requires = dsNew(h, RPMTAG_REQUIRENAME, scareMem);
|
||||||
|
|
||||||
|
#ifdef DYING
|
||||||
if (!hge(h, RPMTAG_BASENAMES, &bnt, (void **)&alp->baseNames, &alp->filesCount))
|
if (!hge(h, RPMTAG_BASENAMES, &bnt, (void **)&alp->baseNames, &alp->filesCount))
|
||||||
{
|
{
|
||||||
alp->filesCount = 0;
|
alp->filesCount = 0;
|
||||||
|
@ -472,30 +496,42 @@ fprintf(stderr, "*** add %p[%d] %s-%s-%s\n", al->list, pkgNum, alp->name, alp->v
|
||||||
const char ** dirNames;
|
const char ** dirNames;
|
||||||
int_32 numDirs;
|
int_32 numDirs;
|
||||||
uint_32 * fileFlags = NULL;
|
uint_32 * fileFlags = NULL;
|
||||||
int * dirMapping;
|
|
||||||
dirInfo dirNeedle =
|
|
||||||
memset(alloca(sizeof(*dirNeedle)), 0, sizeof(*dirNeedle));
|
|
||||||
dirInfo dirMatch;
|
|
||||||
int first, last, fileNum, dirNum;
|
|
||||||
int origNumDirs;
|
|
||||||
|
|
||||||
xx = hge(h, RPMTAG_DIRNAMES, &dnt, (void **) &dirNames, &numDirs);
|
xx = hge(h, RPMTAG_DIRNAMES, &dnt, (void **) &dirNames, &numDirs);
|
||||||
xx = hge(h, RPMTAG_DIRINDEXES, NULL, (void **) &dirIndexes, NULL);
|
xx = hge(h, RPMTAG_DIRINDEXES, NULL, (void **) &dirIndexes, NULL);
|
||||||
xx = hge(h, RPMTAG_FILEFLAGS, NULL, (void **) &fileFlags, NULL);
|
xx = hge(h, RPMTAG_FILEFLAGS, NULL, (void **) &fileFlags, NULL);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (alp->filesCount > 0)
|
||||||
|
#else
|
||||||
|
alp->fns = fnsNew(h, RPMTAG_BASENAMES, scareMem);
|
||||||
|
|
||||||
|
if (alp->fns && alp->fns->Count > 0)
|
||||||
|
#endif
|
||||||
|
{
|
||||||
|
int * dirMapping;
|
||||||
|
dirInfo dirNeedle =
|
||||||
|
memset(alloca(sizeof(*dirNeedle)), 0, sizeof(*dirNeedle));
|
||||||
|
dirInfo dirMatch;
|
||||||
|
int first, last, dirNum;
|
||||||
|
int origNumDirs;
|
||||||
|
|
||||||
/* XXX FIXME: We ought to relocate the directory list here */
|
/* XXX FIXME: We ought to relocate the directory list here */
|
||||||
|
|
||||||
dirMapping = alloca(sizeof(*dirMapping) * numDirs);
|
dirMapping = alloca(sizeof(*dirMapping) * alp->fns->DCount);
|
||||||
|
|
||||||
/* allocated enough space for all the directories we could possible
|
/* allocated enough space for all the directories we could possible
|
||||||
need to add */
|
need to add */
|
||||||
al->dirs = xrealloc(al->dirs,
|
al->dirs = xrealloc(al->dirs,
|
||||||
(al->numDirs + numDirs) * sizeof(*al->dirs));
|
(al->numDirs + alp->fns->DCount) * sizeof(*al->dirs));
|
||||||
origNumDirs = al->numDirs;
|
origNumDirs = al->numDirs;
|
||||||
|
|
||||||
for (dirNum = 0; dirNum < numDirs; dirNum++) {
|
if (alp->fns->DN != NULL)
|
||||||
dirNeedle->dirName = (char *) dirNames[dirNum];
|
for (dirNum = 0; dirNum < alp->fns->DCount; dirNum++) {
|
||||||
dirNeedle->dirNameLen = strlen(dirNames[dirNum]);
|
/*@-assignexpose@*/
|
||||||
|
dirNeedle->dirName = (char *) alp->fns->DN[dirNum];
|
||||||
|
/*@=assignexpose@*/
|
||||||
|
dirNeedle->dirNameLen = strlen(alp->fns->DN[dirNum]);
|
||||||
dirMatch = bsearch(dirNeedle, al->dirs, origNumDirs,
|
dirMatch = bsearch(dirNeedle, al->dirs, origNumDirs,
|
||||||
sizeof(*dirNeedle), dirInfoCompare);
|
sizeof(*dirNeedle), dirInfoCompare);
|
||||||
if (dirMatch) {
|
if (dirMatch) {
|
||||||
|
@ -503,35 +539,42 @@ fprintf(stderr, "*** add %p[%d] %s-%s-%s\n", al->list, pkgNum, alp->name, alp->v
|
||||||
} else {
|
} else {
|
||||||
dirMapping[dirNum] = al->numDirs;
|
dirMapping[dirNum] = al->numDirs;
|
||||||
dirMatch = al->dirs + al->numDirs;
|
dirMatch = al->dirs + al->numDirs;
|
||||||
dirMatch->dirName = xstrdup(dirNames[dirNum]);
|
dirMatch->dirName = xstrdup(alp->fns->DN[dirNum]);
|
||||||
dirMatch->dirNameLen = strlen(dirNames[dirNum]);
|
dirMatch->dirNameLen = strlen(alp->fns->DN[dirNum]);
|
||||||
dirMatch->files = NULL;
|
dirMatch->files = NULL;
|
||||||
dirMatch->numFiles = 0;
|
dirMatch->numFiles = 0;
|
||||||
al->numDirs++;
|
al->numDirs++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
dirNames = hfd(dirNames, dnt);
|
alp->fns->DN = hfd(alp->fns->DN, alp->fns->DNt);
|
||||||
|
|
||||||
for (first = 0; first < alp->filesCount; first = last + 1) {
|
for (first = 0; first < alp->fns->Count; first = last + 1) {
|
||||||
for (last = first; (last + 1) < alp->filesCount; last++) {
|
if (alp->fns->DI == NULL) /* XXX can't happen */
|
||||||
if (dirIndexes[first] != dirIndexes[last + 1])
|
continue;
|
||||||
|
|
||||||
|
for (last = first; (last + 1) < alp->fns->Count; last++) {
|
||||||
|
if (alp->fns->DI[first] != alp->fns->DI[last + 1])
|
||||||
/*@innerbreak@*/ break;
|
/*@innerbreak@*/ break;
|
||||||
}
|
}
|
||||||
|
|
||||||
dirMatch = al->dirs + dirMapping[dirIndexes[first]];
|
dirMatch = al->dirs + dirMapping[alp->fns->DI[first]];
|
||||||
dirMatch->files = xrealloc(dirMatch->files,
|
dirMatch->files = xrealloc(dirMatch->files,
|
||||||
(dirMatch->numFiles + last - first + 1) *
|
(dirMatch->numFiles + last - first + 1) *
|
||||||
sizeof(*dirMatch->files));
|
sizeof(*dirMatch->files));
|
||||||
if (alp->baseNames != NULL) /* XXX can't happen */
|
|
||||||
for (fileNum = first; fileNum <= last; fileNum++) {
|
for (alp->fns->i = first; alp->fns->i <= last; alp->fns->i++) {
|
||||||
|
if (alp->fns->BN == NULL) /* XXX can't happen */
|
||||||
|
/*@innercontinue@*/ continue;
|
||||||
|
if (alp->fns->Flags == NULL) /* XXX can't happen */
|
||||||
|
/*@innercontinue@*/ continue;
|
||||||
/*@-assignexpose@*/
|
/*@-assignexpose@*/
|
||||||
dirMatch->files[dirMatch->numFiles].baseName =
|
dirMatch->files[dirMatch->numFiles].baseName =
|
||||||
alp->baseNames[fileNum];
|
alp->fns->BN[alp->fns->i];
|
||||||
/*@=assignexpose@*/
|
/*@=assignexpose@*/
|
||||||
dirMatch->files[dirMatch->numFiles].pkgNum = pkgNum;
|
dirMatch->files[dirMatch->numFiles].pkgNum = pkgNum;
|
||||||
dirMatch->files[dirMatch->numFiles].fileFlags =
|
dirMatch->files[dirMatch->numFiles].fileFlags =
|
||||||
fileFlags[fileNum];
|
alp->fns->Flags[alp->fns->i];
|
||||||
dirMatch->numFiles++;
|
dirMatch->numFiles++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -542,9 +585,7 @@ fprintf(stderr, "*** add %p[%d] %s-%s-%s\n", al->list, pkgNum, alp->name, alp->v
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*@-compdef@*/ /* FIX: al->list->relocs-?{oldPath,newPath} undefined */
|
|
||||||
alFreeIndex(al);
|
alFreeIndex(al);
|
||||||
/*@=compdef@*/
|
|
||||||
|
|
||||||
assert(((alNum)(alp - al->list)) == pkgNum);
|
assert(((alNum)(alp - al->list)) == pkgNum);
|
||||||
return ((alKey)(alp - al->list));
|
return ((alKey)(alp - al->list));
|
||||||
|
|
|
@ -30,6 +30,7 @@ int alGetMultiLib(/*@null@*/ const availableList al, /*@null@*/ alKey pkgKey)
|
||||||
/*@*/;
|
/*@*/;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef DYING
|
||||||
/**
|
/**
|
||||||
* Return available package files count.
|
* Return available package files count.
|
||||||
* @param al available list
|
* @param al available list
|
||||||
|
@ -38,6 +39,7 @@ int alGetMultiLib(/*@null@*/ const availableList al, /*@null@*/ alKey pkgKey)
|
||||||
*/
|
*/
|
||||||
int alGetFilesCount(/*@null@*/ const availableList al, /*@null@*/ alKey pkgKey)
|
int alGetFilesCount(/*@null@*/ const availableList al, /*@null@*/ alKey pkgKey)
|
||||||
/*@*/;
|
/*@*/;
|
||||||
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return available package provides.
|
* Return available package provides.
|
||||||
|
|
90
lib/rpmds.c
90
lib/rpmds.c
|
@ -12,6 +12,91 @@
|
||||||
/*@access problemsSet @*/
|
/*@access problemsSet @*/
|
||||||
|
|
||||||
/*@access alKey@*/
|
/*@access alKey@*/
|
||||||
|
|
||||||
|
/*@access rpmFNSet @*/
|
||||||
|
|
||||||
|
/*@unchecked@*/
|
||||||
|
static int _fns_debug = 0;
|
||||||
|
|
||||||
|
rpmFNSet fnsFree(rpmFNSet fns)
|
||||||
|
{
|
||||||
|
HFD_t hfd = headerFreeData;
|
||||||
|
|
||||||
|
if (fns == NULL)
|
||||||
|
return NULL;
|
||||||
|
|
||||||
|
/*@-modfilesystem@*/
|
||||||
|
if (_fns_debug)
|
||||||
|
fprintf(stderr, "*** fns %p -- %s[%d]\n", fns, fns->Type, fns->Count);
|
||||||
|
/*@=modfilesystem@*/
|
||||||
|
|
||||||
|
/*@-branchstate@*/
|
||||||
|
if (fns->Count > 0) {
|
||||||
|
fns->DN = hfd(fns->DN, fns->DNt);
|
||||||
|
fns->BN = hfd(fns->BN, fns->BNt);
|
||||||
|
/*@-evalorder@*/
|
||||||
|
fns->DI =
|
||||||
|
(fns->h != NULL ? hfd(fns->DI, fns->DIt) : _free(fns->DI));
|
||||||
|
fns->Flags =
|
||||||
|
(fns->h != NULL ? hfd(fns->Flags, fns->Ft) : _free(fns->Flags));
|
||||||
|
/*@=evalorder@*/
|
||||||
|
fns->h = headerFree(fns->h, "fnsFree");
|
||||||
|
}
|
||||||
|
/*@=branchstate@*/
|
||||||
|
|
||||||
|
memset(fns, 0, sizeof(*fns)); /* XXX trash and burn */
|
||||||
|
fns = _free(fns);
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
rpmFNSet fnsNew(Header h, rpmTag tagN, int scareMem)
|
||||||
|
{
|
||||||
|
HGE_t hge =
|
||||||
|
(scareMem ? (HGE_t) headerGetEntryMinMemory : (HGE_t) headerGetEntry);
|
||||||
|
rpmFNSet fns = NULL;
|
||||||
|
const char * Type;
|
||||||
|
rpmTag tagBN, tagDI, tagF, tagDN;
|
||||||
|
|
||||||
|
if (tagN == RPMTAG_BASENAMES) {
|
||||||
|
Type = "Files";
|
||||||
|
tagBN = tagN;
|
||||||
|
tagDI = RPMTAG_DIRINDEXES;
|
||||||
|
tagF = RPMTAG_FILEFLAGS;
|
||||||
|
tagDN = RPMTAG_DIRNAMES;
|
||||||
|
} else
|
||||||
|
goto exit;
|
||||||
|
|
||||||
|
fns = xcalloc(1, sizeof(*fns));
|
||||||
|
fns->i = -1;
|
||||||
|
|
||||||
|
fns->Type = Type;
|
||||||
|
|
||||||
|
fns->tagN = tagN;
|
||||||
|
fns->h = (scareMem ? headerLink(h, "fnsNew") : NULL);
|
||||||
|
if (hge(h, tagBN, &fns->BNt, (void **) &fns->BN, &fns->Count)) {
|
||||||
|
int xx;
|
||||||
|
xx = hge(h, tagDN, &fns->DNt, (void **) &fns->DN, &fns->DCount);
|
||||||
|
xx = hge(h, tagDI, &fns->DIt, (void **) &fns->DI, NULL);
|
||||||
|
if (!scareMem && fns->DI != NULL)
|
||||||
|
fns->DI = memcpy(xmalloc(fns->Count * sizeof(*fns->DI)),
|
||||||
|
fns->DI, fns->Count * sizeof(*fns->DI));
|
||||||
|
xx = hge(h, tagF, &fns->Ft, (void **) &fns->Flags, NULL);
|
||||||
|
if (!scareMem && fns->Flags != NULL)
|
||||||
|
fns->Flags = memcpy(xmalloc(fns->Count * sizeof(*fns->Flags)),
|
||||||
|
fns->Flags, fns->Count * sizeof(*fns->Flags));
|
||||||
|
} else
|
||||||
|
fns->h = headerFree(fns->h, "fnsNew");
|
||||||
|
|
||||||
|
exit:
|
||||||
|
|
||||||
|
/*@-modfilesystem@*/
|
||||||
|
if (_fns_debug)
|
||||||
|
fprintf(stderr, "*** fns %p ++ %s[%d]\n", fns, fns->Type, fns->Count);
|
||||||
|
/*@=modfilesystem@*/
|
||||||
|
|
||||||
|
return fns;
|
||||||
|
}
|
||||||
|
|
||||||
/*@access rpmDepSet @*/
|
/*@access rpmDepSet @*/
|
||||||
|
|
||||||
/*@unchecked@*/
|
/*@unchecked@*/
|
||||||
|
@ -22,6 +107,9 @@ rpmDepSet dsFree(rpmDepSet ds)
|
||||||
HFD_t hfd = headerFreeData;
|
HFD_t hfd = headerFreeData;
|
||||||
rpmTag tagEVR, tagF;
|
rpmTag tagEVR, tagF;
|
||||||
|
|
||||||
|
if (ds == NULL)
|
||||||
|
return NULL;
|
||||||
|
|
||||||
/*@-modfilesystem@*/
|
/*@-modfilesystem@*/
|
||||||
if (_ds_debug)
|
if (_ds_debug)
|
||||||
fprintf(stderr, "*** ds %p -- %s[%d]\n", ds, ds->Type, ds->Count);
|
fprintf(stderr, "*** ds %p -- %s[%d]\n", ds, ds->Type, ds->Count);
|
||||||
|
@ -117,7 +205,7 @@ rpmDepSet dsNew(Header h, rpmTag tagN, int scareMem)
|
||||||
xx = hge(h, tagF, &ds->Ft, (void **) &ds->Flags, NULL);
|
xx = hge(h, tagF, &ds->Ft, (void **) &ds->Flags, NULL);
|
||||||
if (!scareMem && ds->Flags != NULL)
|
if (!scareMem && ds->Flags != NULL)
|
||||||
ds->Flags = memcpy(xmalloc(ds->Count * sizeof(*ds->Flags)),
|
ds->Flags = memcpy(xmalloc(ds->Count * sizeof(*ds->Flags)),
|
||||||
ds->Flags, ds->Count* sizeof(*ds->Flags));
|
ds->Flags, ds->Count * sizeof(*ds->Flags));
|
||||||
} else
|
} else
|
||||||
ds->h = headerFree(ds->h, "dsNew");
|
ds->h = headerFree(ds->h, "dsNew");
|
||||||
|
|
||||||
|
|
54
lib/rpmds.h
54
lib/rpmds.h
|
@ -19,6 +19,36 @@ struct problemsSet_s {
|
||||||
int alloced; /*!< No. of problems allocated. */
|
int alloced; /*!< No. of problems allocated. */
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*/
|
||||||
|
typedef /*@abstract@*/ struct rpmFNSet_s * rpmFNSet;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A package filename set.
|
||||||
|
*/
|
||||||
|
struct rpmFNSet_s {
|
||||||
|
int i; /*!< File index. */
|
||||||
|
|
||||||
|
/*@observer@*/
|
||||||
|
const char * Type; /*!< Tag name. */
|
||||||
|
|
||||||
|
rpmTag tagN; /*!< Header tag. */
|
||||||
|
/*@refcounted@*/ /*@null@*/
|
||||||
|
Header h; /*!< Header for file name set (or NULL) */
|
||||||
|
|
||||||
|
/*@only@*/ /*@null@*/
|
||||||
|
const char ** BN; /*!< File base name. */
|
||||||
|
/*@only@*/ /*@null@*/
|
||||||
|
const int_32 * DI; /*!< File directory index. */
|
||||||
|
/*@only@*/ /*@null@*/
|
||||||
|
const uint_32 * Flags; /*!< File flags. */
|
||||||
|
/*@only@*/ /*@null@*/
|
||||||
|
const char ** DN; /*!< Directory name. */
|
||||||
|
int_32 DCount; /*!< No. of directories. */
|
||||||
|
rpmTagType BNt, DIt, Ft, DNt; /*!< Tag data types. */
|
||||||
|
int_32 Count; /*!< No. of files. */
|
||||||
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A package dependency set.
|
* A package dependency set.
|
||||||
*/
|
*/
|
||||||
|
@ -33,6 +63,7 @@ struct rpmDepSet_s {
|
||||||
rpmTag tagN; /*!< Header tag. */
|
rpmTag tagN; /*!< Header tag. */
|
||||||
/*@refcounted@*/ /*@null@*/
|
/*@refcounted@*/ /*@null@*/
|
||||||
Header h; /*!< Header for dependency set (or NULL) */
|
Header h; /*!< Header for dependency set (or NULL) */
|
||||||
|
|
||||||
/*@only@*/
|
/*@only@*/
|
||||||
const char ** N; /*!< Name. */
|
const char ** N; /*!< Name. */
|
||||||
/*@only@*/
|
/*@only@*/
|
||||||
|
@ -40,7 +71,7 @@ struct rpmDepSet_s {
|
||||||
/*@only@*/
|
/*@only@*/
|
||||||
const int_32 * Flags; /*!< Flags identifying context/comparison. */
|
const int_32 * Flags; /*!< Flags identifying context/comparison. */
|
||||||
rpmTagType Nt, EVRt, Ft; /*!< Tag data types. */
|
rpmTagType Nt, EVRt, Ft; /*!< Tag data types. */
|
||||||
int Count; /*!< No. of elements */
|
int_32 Count; /*!< No. of elements */
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
|
@ -48,7 +79,26 @@ extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Destroy a new dependency set.
|
* Destroy a file name set.
|
||||||
|
* @param ds file name set
|
||||||
|
* @return NULL always
|
||||||
|
*/
|
||||||
|
/*@only@*/ /*@null@*/
|
||||||
|
rpmFNSet fnsFree(/*@only@*/ /*@null@*/ rpmFNSet fns)
|
||||||
|
/*@modifies fns@*/;
|
||||||
|
/**
|
||||||
|
* Create and load a file name set.
|
||||||
|
* @param h header
|
||||||
|
* @param tagN RPMTAG_BASENAMES
|
||||||
|
* @param scareMem Use pointers to refcounted header memory?
|
||||||
|
* @return new file name set
|
||||||
|
*/
|
||||||
|
/*@only@*/ /*@null@*/
|
||||||
|
rpmFNSet fnsNew(Header h, rpmTag tagN, int scareMem)
|
||||||
|
/*@modifies h @*/;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Destroy a dependency set.
|
||||||
* @param ds dependency set
|
* @param ds dependency set
|
||||||
* @return NULL always
|
* @return NULL always
|
||||||
*/
|
*/
|
||||||
|
|
30
po/rpm.pot
30
po/rpm.pot
|
@ -6,7 +6,7 @@
|
||||||
msgid ""
|
msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: PACKAGE VERSION\n"
|
"Project-Id-Version: PACKAGE VERSION\n"
|
||||||
"POT-Creation-Date: 2001-11-04 22:42-0500\n"
|
"POT-Creation-Date: 2001-11-05 08:53-0500\n"
|
||||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||||
|
@ -1459,44 +1459,44 @@ msgstr ""
|
||||||
msgid "%9s: (%s, %s) added to Depends cache.\n"
|
msgid "%9s: (%s, %s) added to Depends cache.\n"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: lib/depends.c:762 lib/rpmds.c:229 lib/rpmds.c:384
|
#: lib/depends.c:762 lib/rpmds.c:317 lib/rpmds.c:472
|
||||||
msgid "NO "
|
msgid "NO "
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: lib/depends.c:762 lib/rpmds.c:229 lib/rpmds.c:384
|
#: lib/depends.c:762 lib/rpmds.c:317 lib/rpmds.c:472
|
||||||
msgid "YES"
|
msgid "YES"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: lib/depends.c:1114
|
#: lib/depends.c:1103
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "removing %s \"%s\" from tsort relations.\n"
|
msgid "removing %s \"%s\" from tsort relations.\n"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#. Record all relations.
|
#. Record all relations.
|
||||||
#: lib/depends.c:1366
|
#: lib/depends.c:1343
|
||||||
msgid "========== recording tsort relations\n"
|
msgid "========== recording tsort relations\n"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#. T4. Scan for zeroes.
|
#. T4. Scan for zeroes.
|
||||||
#: lib/depends.c:1440
|
#: lib/depends.c:1417
|
||||||
msgid ""
|
msgid ""
|
||||||
"========== tsorting packages (order, #predecessors, #succesors, depth)\n"
|
"========== tsorting packages (order, #predecessors, #succesors, depth)\n"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: lib/depends.c:1515
|
#: lib/depends.c:1492
|
||||||
msgid "========== successors only (presentation order)\n"
|
msgid "========== successors only (presentation order)\n"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: lib/depends.c:1576
|
#: lib/depends.c:1553
|
||||||
msgid "LOOP:\n"
|
msgid "LOOP:\n"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: lib/depends.c:1611
|
#: lib/depends.c:1588
|
||||||
msgid "========== continuing tsort ...\n"
|
msgid "========== continuing tsort ...\n"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#. Return no. of packages that could not be ordered.
|
#. Return no. of packages that could not be ordered.
|
||||||
#: lib/depends.c:1616
|
#: lib/depends.c:1593
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "rpmdepOrder failed, %d elements remain\n"
|
msgid "rpmdepOrder failed, %d elements remain\n"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
@ -2398,11 +2398,11 @@ msgstr ""
|
||||||
msgid "package %s is not installed\n"
|
msgid "package %s is not installed\n"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: lib/rpmal.c:677
|
#: lib/rpmal.c:718
|
||||||
msgid "(added files)"
|
msgid "(added files)"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: lib/rpmal.c:780
|
#: lib/rpmal.c:821
|
||||||
msgid "(added provide)"
|
msgid "(added provide)"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -2470,20 +2470,20 @@ msgid "OK"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#. XXX legacy epoch-less requires/conflicts compatibility
|
#. XXX legacy epoch-less requires/conflicts compatibility
|
||||||
#: lib/rpmds.c:354
|
#: lib/rpmds.c:442
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid ""
|
msgid ""
|
||||||
"the \"B\" dependency needs an epoch (assuming same as \"A\")\n"
|
"the \"B\" dependency needs an epoch (assuming same as \"A\")\n"
|
||||||
"\tA %s\tB %s\n"
|
"\tA %s\tB %s\n"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: lib/rpmds.c:383
|
#: lib/rpmds.c:471
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid " %s A %s\tB %s\n"
|
msgid " %s A %s\tB %s\n"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#. @=branchstate@
|
#. @=branchstate@
|
||||||
#: lib/rpmds.c:409
|
#: lib/rpmds.c:497
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "package %s-%s-%s has unsatisfied %s: %s\n"
|
msgid "package %s-%s-%s has unsatisfied %s: %s\n"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
Loading…
Reference in New Issue