uint_32 * archiveSizePtr;
struct fileMemory fileMem;
int freeFileMem = 0;
+ char * currDir = NULL, * tmpptr;
+ int currDirLen;
oldVersions = alloca(sizeof(int));
*oldVersions = 0;
dbiFreeIndexRecord(matches);
if (rootdir) {
+ currDirLen = 50;
+ currDir = malloc(currDirLen);
+ while (!getcwd(currDir, currDirLen)) {
+ currDirLen += 50;
+ currDir = realloc(currDir, currDirLen);
+ }
+
+ tmpptr = currDir;
+ currDir = alloca(strlen(tmpptr) + 1);
+ strcpy(currDir, tmpptr);
+ free(tmpptr);
+
chdir("/");
chroot(rootdir);
}
if (rc) {
if (rootdir) {
chroot(".");
+ chdir(currDir);
}
if (replacedList) free(replacedList);
if (freeFileMem) freeFileMemory(fileMem);
if (flags & RPMINSTALL_TEST) {
if (rootdir) {
chroot(".");
+ chdir(currDir);
}
rpmMessage(RPMMESS_DEBUG, "stopping install as we're running --test\n");
if (rootdir) {
chroot(".");
+ chdir(currDir);
}
return 2;
if (rootdir) {
chroot(".");
+ chdir(currDir);
}
return 2;
if (rootdir) {
chroot(".");
+ chdir(currDir);
}
return 2;
if (rootdir) {
chroot(".");
+ chdir(currDir);
}
if (replacedList) {