handle RPMTAG_ORIGFILENAMES properly
authorewt <devnull@localhost>
Tue, 19 Jan 1999 03:02:45 +0000 (03:02 +0000)
committerewt <devnull@localhost>
Tue, 19 Jan 1999 03:02:45 +0000 (03:02 +0000)
CVS patchset: 2715
CVS date: 1999/01/19 03:02:45

lib/install.c

index b33855c..2ab0a05 100644 (file)
@@ -119,14 +119,15 @@ static int assembleFileList(Header h, struct fileMemory * mem,
     char * chptr;
     char ** languages, ** lang;
 
-    if (!headerGetEntry(h, RPMTAG_ORIGFILENAMES, NULL, (void **) &mem->names, 
+    if (!headerGetEntry(h, RPMTAG_FILENAMES, NULL, (void **) &mem->names, 
                        fileCountPtr))
-       headerGetEntry(h, RPMTAG_FILENAMES, NULL, (void **) &mem->names, 
-                          fileCountPtr);
+       return 0;
+
     if (!headerGetEntry(h, RPMTAG_ORIGFILENAMES, NULL, 
                        (void **) &mem->cpioNames, NULL))
        headerGetEntry(h, RPMTAG_FILENAMES, NULL, (void **) &mem->cpioNames, 
                           fileCountPtr);
+    headerRemoveEntry(h, RPMTAG_ORIGFILENAMES);
 
     fileCount = *fileCountPtr;