- fix: always do rpmalMakeIndex.
authorjbj <devnull@localhost>
Tue, 3 Sep 2002 12:23:51 +0000 (12:23 +0000)
committerjbj <devnull@localhost>
Tue, 3 Sep 2002 12:23:51 +0000 (12:23 +0000)
- fix: resurrect --triggers (#73330).
- python: typo in NOKEY exception string.

CVS patchset: 5696
CVS date: 2002/09/03 12:23:51

CHANGES
lib/rpmal.c
python/rpmts-py.c
rpmdb/header.c
tools/.cvsignore

diff --git a/CHANGES b/CHANGES
index 8012f27..4a08b7e 100644 (file)
--- a/CHANGES
+++ b/CHANGES
        - fix: don't exit with open cursor, there be a stale lock.
        - fix: check for signal induced exit more often (#73193).
        - reinterpret the _unsafe_rollbacks macro as earliest rollback.
+       - fix: always do rpmalMakeIndex.
+       - fix: resurrect --triggers (#73330).
+       - python: typo in NOKEY exception string.
 
 4.0.3 -> 4.0.4:
        - solaris: translate i86pc to i386 (#57182).
index 637e993..68bbc02 100644 (file)
@@ -587,30 +587,26 @@ void rpmalMakeIndex(rpmal al)
 {
     availableIndex ai;
     availablePackage alp;
-    int aisize;
     int i;
 
     if (al == NULL || al->list == NULL) return;
     ai = &al->index;
-    aisize = ai->size;
 
+    ai->size = 0;
     for (i = 0; i < al->size; i++) {
        alp = al->list + i;
        if (alp->provides != NULL)
            ai->size += rpmdsCount(alp->provides);
     }
 
-    if (ai->size != aisize) {
-       ai->index = xrealloc(ai->index, ai->size * sizeof(*ai->index));
-       ai->k = 0;
-
-       for (i = 0; i < al->size; i++) {
-           alp = al->list + i;
-           rpmalAddProvides(al, (alKey)i, alp->provides);
-       }
+    ai->index = xrealloc(ai->index, ai->size * sizeof(*ai->index));
+    ai->k = 0;
 
-       qsort(ai->index, ai->size, sizeof(*ai->index), indexcmp);
+    for (i = 0; i < al->size; i++) {
+       alp = al->list + i;
+       rpmalAddProvides(al, (alKey)i, alp->provides);
     }
+    qsort(ai->index, ai->size, sizeof(*ai->index), indexcmp);
 }
 
 fnpyKey *
index b22662b..677ce32 100644 (file)
@@ -749,7 +749,7 @@ fprintf(stderr, "*** rpmts_HdrFromFdno(%p) ts %p rc %d\n", s, s->ts, rpmrc);
        break;
 
     case RPMRC_NOKEY:
-       PyErr_SetString(pyrpmError, "public key not availaiable");
+       PyErr_SetString(pyrpmError, "public key not available");
        break;
 
     case RPMRC_NOTTRUSTED:
index 9ecaa41..ff48007 100644 (file)
@@ -2678,8 +2678,6 @@ static char * formatValue(sprintfTag tag, Header h,
            count = 1;
            type = RPM_STRING_TYPE;     
            data = "(none)";
-       } else {
-           datafree = extCache[tag->extNum].freeit;
        }
 /*@=boundswrite@*/
     } else {
index 4340ecb..45017b7 100644 (file)
@@ -14,3 +14,5 @@ rpminject
 rpmlead
 rpmsort
 rpmsignature
+striptofile
+unstripfile