need to chroot() a bit sooner
CVS patchset: 2781 CVS date: 1999/02/07 20:09:27
This commit is contained in:
parent
d9ff192cba
commit
177b2215a9
|
@ -197,13 +197,6 @@ int rpmRunTransactions(rpmTransactionSet ts, rpmCallbackFunction notify,
|
|||
fi->fps = alloca(fi->fc * sizeof(*fi->fps));
|
||||
}
|
||||
|
||||
for (fi = flList; (fi - flList) < flEntries; fi++) {
|
||||
fpLookupList(fi->fl, fi->fps, fi->fc, 1);
|
||||
for (i = 0; i < fi->fc; i++) {
|
||||
htAddEntry(ht, fi->fps + i, fi);
|
||||
}
|
||||
}
|
||||
|
||||
chptr = currentDirectory();
|
||||
currDir = alloca(strlen(chptr) + 1);
|
||||
strcpy(currDir, chptr);
|
||||
|
@ -211,6 +204,13 @@ int rpmRunTransactions(rpmTransactionSet ts, rpmCallbackFunction notify,
|
|||
chdir("/");
|
||||
chroot(ts->root);
|
||||
|
||||
for (fi = flList; (fi - flList) < flEntries; fi++) {
|
||||
fpLookupList(fi->fl, fi->fps, fi->fc, 1);
|
||||
for (i = 0; i < fi->fc; i++) {
|
||||
htAddEntry(ht, fi->fps + i, fi);
|
||||
}
|
||||
}
|
||||
|
||||
for (fi = flList; (fi - flList) < flEntries; fi++) {
|
||||
matches = malloc(sizeof(*matches) * fi->fc);
|
||||
if (rpmdbFindFpList(ts->db, fi->fps, matches, fi->fc)) return 1;
|
||||
|
@ -321,7 +321,8 @@ int rpmRunTransactions(rpmTransactionSet ts, rpmCallbackFunction notify,
|
|||
if (installBinaryPackage(ts->root, ts->db, fd,
|
||||
hdrs[alp - al->list], instFlags, notify,
|
||||
notifyData, alp->key, fi->actions,
|
||||
fi->fc ? fi->replaced : NULL))
|
||||
fi->fc ? fi->replaced : NULL,
|
||||
ts->scriptFd))
|
||||
ourrc++;
|
||||
} else {
|
||||
ourrc++;
|
||||
|
@ -340,7 +341,7 @@ int rpmRunTransactions(rpmTransactionSet ts, rpmCallbackFunction notify,
|
|||
/* fi is left at the first package which is to be removed */
|
||||
for (i = 0; i < ts->numRemovedPackages; i++, fi++) {
|
||||
if (removeBinaryPackage(ts->root, ts->db, ts->removedPackages[i],
|
||||
rmFlags, fi->actions))
|
||||
rmFlags, fi->actions, ts->scriptFd))
|
||||
ourrc++;
|
||||
}
|
||||
|
||||
|
@ -350,6 +351,10 @@ int rpmRunTransactions(rpmTransactionSet ts, rpmCallbackFunction notify,
|
|||
return 0;
|
||||
}
|
||||
|
||||
void rpmtransSetScriptFd(rpmTransactionSet ts, FD_t fd) {
|
||||
ts->scriptFd = fd;
|
||||
}
|
||||
|
||||
static rpmProblemSet psCreate(void) {
|
||||
rpmProblemSet probs;
|
||||
|
||||
|
|
Loading…
Reference in New Issue