diff options
author | jbj <devnull@localhost> | 1999-12-08 16:32:25 +0000 |
---|---|---|
committer | jbj <devnull@localhost> | 1999-12-08 16:32:25 +0000 |
commit | bd4e61e98e9a70c9b22948538460ed71d932d365 (patch) | |
tree | 2cd7de08e9793f90aa56ccc6422c8050cd11baad /lib | |
parent | ca5882b322289dc644aa01e4ff662badfde6ca8b (diff) | |
download | rpm-bd4e61e98e9a70c9b22948538460ed71d932d365.tar.gz rpm-bd4e61e98e9a70c9b22948538460ed71d932d365.tar.bz2 rpm-bd4e61e98e9a70c9b22948538460ed71d932d365.zip |
fix: new filelists require package index, not pointer.
CVS patchset: 3463
CVS date: 1999/12/08 16:32:25
Diffstat (limited to 'lib')
-rw-r--r-- | lib/depends.c | 11 | ||||
-rw-r--r-- | lib/depends.h | 3 |
2 files changed, 13 insertions, 1 deletions
diff --git a/lib/depends.c b/lib/depends.c index 9ddd24f06..da02e79a5 100644 --- a/lib/depends.c +++ b/lib/depends.c @@ -158,13 +158,15 @@ static /*@exposed@*/ struct availablePackage * alAddPackage(struct availableList struct dirInfo * dirMatch; int first, last, fileNum; int origNumDirs; + int pkgNum; if (al->size == al->alloced) { al->alloced += 5; al->list = xrealloc(al->list, sizeof(*al->list) * al->alloced); } - p = al->list + al->size++; + pkgNum = al->size++; + p = al->list + pkgNum; p->h = headerLink(h); /* XXX reference held by transaction set */ headerNVR(p->h, &p->name, &p->version, &p->release); @@ -243,7 +245,10 @@ static /*@exposed@*/ struct availablePackage * alAddPackage(struct availableList for (fileNum = first; fileNum <= last; fileNum++) { dirMatch->files[dirMatch->numFiles].baseName = p->baseNames[fileNum]; +#ifdef DYING dirMatch->files[dirMatch->numFiles].package = p; +#endif + dirMatch->files[dirMatch->numFiles].pkgNum = pkgNum; dirMatch->numFiles++; } @@ -774,7 +779,11 @@ alFileSatisfiesDepend(struct availableList * al, if (keyType) rpmMessage(RPMMESS_DEBUG, _("%s: %s satisfied by added file " "list.\n"), keyType, fileName); +#ifdef DYING return dirMatch->files[i].package; +#else + return al->list + dirMatch->files[i].pkgNum; +#endif } } diff --git a/lib/depends.h b/lib/depends.h index b61ea4d44..6cf007871 100644 --- a/lib/depends.h +++ b/lib/depends.h @@ -28,7 +28,10 @@ struct availableIndexEntry { } ; struct fileIndexEntry { +#ifdef DYING /*@owned@*/ struct availablePackage * package; +#endif + int pkgNum; /*@dependent@*/ const char * baseName; } ; |