happened */
int rpmRunTransactions(rpmTransactionSet ts, rpmCallbackFunction notify,
void * notifyData, rpmProblemSet okProbs,
- rpmProblemSet * newProbs, int flags) {
+ rpmProblemSet * newProbs, int flags)
+{
int i, j;
struct availableList * al = &ts->addedPackages;
int rc, ourrc = 0;
*newProbs = probs;
hdrs = alloca(sizeof(*hdrs) * al->size);
+notify(NULL, RPMCALLBACK_TRANS_START, 1, al->size, NULL, notifyData);
+
for (alp = al->list; (alp - al->list) < al->size; alp++) {
if (!archOkay(alp->h))
psAppend(probs, RPMPROB_BADARCH, alp->key, alp->h, NULL, NULL);
psAppend(probs, RPMPROB_BADOS, alp->key, alp->h, NULL, NULL);
}
+notify(alp->h, RPMCALLBACK_TRANS_PROGRESS, (alp - al->list), al->size,
+ NULL, notifyData);
+
rc = rpmdbFindPackage(ts->db, alp->name, &dbi);
if (rc == 2) {
return -1;
totalFileCount += fileCount;
}
+notify(NULL, RPMCALLBACK_TRANS_START, 2, ts->numRemovedPackages,
+ NULL, notifyData);
+
/* FIXME: it seems a bit silly to read in all of these headers twice */
for (i = 0; i < ts->numRemovedPackages; i++, fi++) {
Header h;
&fileCount))
totalFileCount += fileCount;
}
+
+notify(h, RPMCALLBACK_TRANS_PROGRESS, i, ts->numRemovedPackages,
+ NULL, notifyData);
+
}
flEntries = al->size + ts->numRemovedPackages;
ht = htCreate(totalFileCount * 2, 0, fpHashFunction, fpEqual);
+notify(NULL, RPMCALLBACK_TRANS_START, 3, al->size, NULL, notifyData);
+
/* FIXME?: we'd be better off assembling one very large file list and
calling fpLookupList only once. I'm not sure that the speedup is
worth the trouble though. */
fi->h = hdrs[alp - al->list] = relocateFileList(alp, probs, alp->h,
fi->actions);
+notify(fi->h, RPMCALLBACK_TRANS_PROGRESS, (alp - al->list), al->size,
+ NULL, notifyData);
+
headerGetEntryMinMemory(fi->h, RPMTAG_FILENAMES, NULL,
(void *) &fi->fl, &fi->fc);
fi->replaced = NULL;
}
+notify(NULL, RPMCALLBACK_TRANS_START, 4, ts->numRemovedPackages,
+ NULL, notifyData);
+
for (i = 0; i < ts->numRemovedPackages; i++, fi++) {
+
fi->type = REMOVED;
fi->record = ts->removedPackages[i];
fi->h = rpmdbGetRecord(ts->db, fi->record);
/* ACK! */
continue;
}
+
+notify(fi->h, RPMCALLBACK_TRANS_PROGRESS, i, ts->numRemovedPackages,
+ NULL, notifyData);
+
if (!headerGetEntryMinMemory(fi->h, RPMTAG_FILENAMES, NULL,
(void *) &fi->fl, &fi->fc)) {
fi->fc = 0;
chdir("/");
chroot(ts->root);
+notify(NULL, RPMCALLBACK_TRANS_START, 5, flEntries, NULL, notifyData);
+
for (fi = flList; (fi - flList) < flEntries; fi++) {
+
+notify(NULL, RPMCALLBACK_TRANS_PROGRESS, (fi - flList), flEntries,
+ NULL, notifyData);
+
fpLookupList(fi->fl, fi->fps, fi->fc, 1);
for (i = 0; i < fi->fc; i++) {
if (fi->actions[i] != FA_SKIP && fi->actions[i] != FA_SKIPNSTATE)
}
}
+notify(NULL, RPMCALLBACK_TRANS_START, 6, flEntries, NULL, notifyData);
+
for (fi = flList; (fi - flList) < flEntries; fi++) {
matches = malloc(sizeof(*matches) * fi->fc);
if (rpmdbFindFpList(ts->db, fi->fps, matches, fi->fc)) return 1;
htFree(ht);
+notify(NULL, RPMCALLBACK_TRANS_START, 7, al->size, NULL, notifyData);
+
for (alp = al->list, fi = flList; (alp - al->list) < al->size;
alp++, fi++) {
if (fi->fc) {
(probs->numProblems && (!okProbs || psTrim(okProbs, probs)))) {
*newProbs = probs;
+notify(NULL, RPMCALLBACK_TRANS_START, 8, al->size, NULL, notifyData);
+
for (alp = al->list, fi = flList; (alp - al->list) < al->size;
alp++, fi++) {
if (fi->fc) {
return al->size + ts->numRemovedPackages;
}
+notify(NULL, RPMCALLBACK_TRANS_START, 9, al->size, NULL, notifyData);
+
for (alp = al->list, fi = flList; (alp - al->list) < al->size;
alp++, fi++) {
if (alp->fd) {
notifyData);
}
+notify(NULL, RPMCALLBACK_UNINST_START, 0, ts->numRemovedPackages,
+ NULL, notifyData);
+
/* fi is left at the first package which is to be removed */
for (i = 0; i < ts->numRemovedPackages; i++, fi++) {
+
+ notify(fi->h, RPMCALLBACK_UNINST_PROGRESS, i, ts->numRemovedPackages,
+ NULL, notifyData);
+
if (removeBinaryPackage(ts->root, ts->db, ts->removedPackages[i],
flags, fi->actions, ts->scriptFd))
+
ourrc++;
}
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
-"POT-Creation-Date: 1999-02-22 12:47-0500\n"
+"POT-Creation-Date: 1999-02-22 17:05-0500\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
msgid "cannot open file %s\n"
msgstr ""
-#: ../install.c:185 ../lib/query.c:541
+#: ../install.c:185 ../lib/query.c:540
#, c-format
msgid "%s does not appear to be a RPM package\n"
msgstr ""
msgid "installing binary packages\n"
msgstr ""
-#: ../install.c:342 ../lib/query.c:685 ../verify.c:243
+#: ../install.c:342 ../lib/query.c:684 ../verify.c:243
#, c-format
msgid "package %s is not installed\n"
msgstr ""
msgid "error: could not read database record\n"
msgstr ""
-#: ../lib/query.c:595 ../verify.c:179
+#: ../lib/query.c:594 ../verify.c:179
msgid "could not read database record!\n"
msgstr ""
-#: ../lib/query.c:520 ../verify.c:198
+#: ../lib/query.c:519 ../verify.c:198
#, c-format
msgid "open of %s failed\n"
msgstr ""
msgid "%s is not an RPM\n"
msgstr ""
-#: ../lib/query.c:606 ../verify.c:222
+#: ../lib/query.c:605 ../verify.c:222
#, c-format
msgid "group %s does not contain any packages\n"
msgstr ""
-#: ../lib/query.c:654 ../verify.c:232
+#: ../lib/query.c:653 ../verify.c:232
#, c-format
msgid "file %s is not owned by any package\n"
msgstr ""
-#: ../lib/query.c:688 ../verify.c:245
+#: ../lib/query.c:687 ../verify.c:245
#, c-format
msgid "error looking for package %s\n"
msgstr ""
msgid "querying record number %d\n"
msgstr ""
-#: ../lib/query.c:505
+#: ../lib/query.c:504
msgid "rpmQuery: rpmdbOpen() failed\n"
msgstr ""
-#: ../lib/query.c:533
+#: ../lib/query.c:532
msgid "old format source packages cannot be queried\n"
msgstr ""
-#: ../lib/query.c:544
+#: ../lib/query.c:543
#, c-format
msgid "query of %s failed\n"
msgstr ""
-#: ../lib/query.c:563
+#: ../lib/query.c:562
#, c-format
msgid "query of specfile %s failed, can't parse\n"
msgstr ""
-#: ../lib/query.c:616
+#: ../lib/query.c:615
#, c-format
msgid "no package provides %s\n"
msgstr ""
-#: ../lib/query.c:626
+#: ../lib/query.c:625
#, c-format
msgid "no package triggers %s\n"
msgstr ""
-#: ../lib/query.c:636
+#: ../lib/query.c:635
#, c-format
msgid "no package requires %s\n"
msgstr ""
-#: ../lib/query.c:651
+#: ../lib/query.c:650
#, c-format
msgid "file %s: %s\n"
msgstr ""
-#: ../lib/query.c:667
+#: ../lib/query.c:666
#, c-format
msgid "invalid package number: %s\n"
msgstr ""
-#: ../lib/query.c:670
+#: ../lib/query.c:669
#, c-format
msgid "showing package: %d\n"
msgstr ""
-#: ../lib/query.c:673
+#: ../lib/query.c:672
#, c-format
msgid "record %d could not be read\n"
msgstr ""
msgid "Invalid signature spec in rc file"
msgstr ""
-#: ../lib/transaction.c:576
+#: ../lib/transaction.c:624
#, c-format
msgid "relocating %s to %s\n"
msgstr ""
-#: ../lib/transaction.c:582
+#: ../lib/transaction.c:630
#, c-format
msgid "excluding %s\n"
msgstr ""
-#: ../lib/transaction.c:670
+#: ../lib/transaction.c:718
#, c-format
msgid "%s skipped due to missingok flag\n"
msgstr ""