- set bzip2path via lib-rpmrc/configure (Toshio Kuratomi)
- added finish translation (Raimo Koski)
- prefer db_185.h to db.h (Christopher Seawood)
+ - included updated hpux.req (Ralph Goers)
+ - added aix.req (Ralph Goers)
+ - updated hpux.prov, osf.req, osf.prov (Tim Mooney)
+ - set file states for --justdb packages to "not installed"
+ - handle missing file states properly in -e code
+ - install time wasn missing for --justdb packages
2.4.109 -> 2.5:
- fixed return code bug in build code
return 2;
}
- if (files) {
- fileStates = malloc(sizeof(*fileStates) * fileCount);
- for (i = 0; i < fileCount; i++)
- fileStates[i] = files[i].state;
+ fileStates = malloc(sizeof(*fileStates) * fileCount);
+ for (i = 0; i < fileCount; i++)
+ fileStates[i] = files[i].state;
+
+ headerAddEntry(h, RPMTAG_FILESTATES, RPM_CHAR_TYPE, fileStates,
+ fileCount);
+
+ free(fileStates);
+ if (freeFileMem) freeFileMemory(fileMem);
+ } else if (flags & RPMINSTALL_JUSTDB) {
+ char ** fileNames;
+ if (headerGetEntry(h, RPMTAG_FILENAMES, NULL, (void **) &fileNames,
+ &fileCount)) {
+ fileStates = malloc(sizeof(*fileStates) * fileCount);
+ memset(fileStates, RPMFILE_STATE_NOTINSTALLED, fileCount);
headerAddEntry(h, RPMTAG_FILESTATES, RPM_CHAR_TYPE, fileStates,
fileCount);
-
free(fileStates);
- if (freeFileMem) freeFileMemory(fileMem);
}
-
- installTime = time(NULL);
- headerAddEntry(h, RPMTAG_INSTALLTIME, RPM_INT32_TYPE, &installTime, 1);
}
+ installTime = time(NULL);
+ headerAddEntry(h, RPMTAG_INSTALLTIME, RPM_INT32_TYPE, &installTime, 1);
+
if (rootdir) {
chroot(".");
chdir(currDir);
break;
}
- headerGetEntry(sech, RPMTAG_FILESTATES, &type,
- (void **) &secFileStatesList, &secFileCount);
+ if (!headerGetEntry(sech, RPMTAG_FILESTATES, &type,
+ (void **) &secFileStatesList, NULL)) {
+ /* This shouldn't happen, but some versions of RPM didn't
+ implement --justdb properly, and chose to leave this stuff
+ out. */
+ rpmMessage(RPMMESS_DEBUG,
+ "package is missing FILESTATES\n");
+ secFileStatesList = alloca(secFileCount);
+ memset(secFileStatesList, RPMFILE_STATE_NOTINSTALLED,
+ secFileCount);
+ }
+
headerGetEntry(sech, RPMTAG_FILEMD5S, &type,
(void **) &secFileMd5List, &secFileCount);
}
fnbuffer = alloca(fnbuffersize);
}
- headerGetEntry(h, RPMTAG_FILESTATES, &type, (void **) &fileStatesList,
- &fileCount);
headerGetEntry(h, RPMTAG_FILEMD5S, &type, (void **) &fileMd5List,
&fileCount);
headerGetEntry(h, RPMTAG_FILEFLAGS, &type, (void **) &fileFlagsList,
headerGetEntry(h, RPMTAG_FILEMODES, &type, (void **) &fileModesList,
&fileCount);
+ if (!headerGetEntry(h, RPMTAG_FILESTATES, &type,
+ (void **) &fileStatesList, NULL)) {
+ /* This shouldn't happen, but some versions of RPM didn't
+ implement --justdb properly, and chose to leave this stuff
+ out. */
+ rpmMessage(RPMMESS_DEBUG, "package is missing FILESTATES\n");
+ fileStatesList = alloca(fileCount);
+ memset(fileStatesList, RPMFILE_STATE_NOTINSTALLED,
+ fileCount);
+ }
+
fileActions = alloca(sizeof(*fileActions) * fileCount);
for (i = 0; i < fileCount; i++)
if (fileStatesList[i] == RPMFILE_STATE_NOTINSTALLED ||