[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Re: patch: verbose without files
- From: Gustavo Niemeyer <niemeyer conectiva com>
- To: rpm-list redhat com
- Subject: Re: patch: verbose without files
- Date: Wed, 10 Jul 2002 21:39:02 -0300
> The attached patch fixes handling of verbose output with packages
> without files.
... but breaks file removing, which is fixed in the attached
patch.
--
Gustavo Niemeyer
[ 2AAC 7928 0FBF 0299 5EB5 60E2 2253 B29A 6664 3A0C ]
--- rpm-4.0.4/lib/psm.c.showtask Thu Jun 27 14:00:17 2002
+++ rpm-4.0.4/lib/psm.c Thu Jun 27 15:36:24 2002
@@ -1609,8 +1609,17 @@
struct availablePackage * alp = fi->ap;
int i;
- if (fi->fc <= 0) break;
- if (ts->transFlags & RPMTRANS_FLAG_JUSTDB) break;
+ if (fi->fc <= 0 || ts->transFlags & RPMTRANS_FLAG_JUSTDB) {
+ psm->cfd = fi->fsm->cfd = NULL;
+ rc = fsmSetup(fi->fsm, FSM_PKGINSTALL, ts, fi,
+ psm->cfd, NULL, &psm->failedFile);
+ xx = fsmTeardown(fi->fsm);
+ psm->what = RPMCALLBACK_INST_PROGRESS;
+ psm->amount = 100;
+ psm->total = psm->amount;
+ xx = psmStage(psm, PSM_NOTIFY);
+ break;
+ }
for (i = 0; i < fi->fc; i++) {
uid_t uid;
--- rpm-4.0.4/lib/fsm.c.showtask Thu Jun 27 14:56:59 2002
+++ rpm-4.0.4/lib/fsm.c Thu Jun 27 15:29:14 2002
@@ -492,8 +492,10 @@
rc = fsmStage(fsm, FSM_CREATE);
if (rc && !ec) ec = rc;
- rc = fsmStage(fsm, fsm->goal);
- if (rc && !ec) ec = rc;
+ if (cfd || goal != FSM_PKGINSTALL) {
+ rc = fsmStage(fsm, fsm->goal);
+ if (rc && !ec) ec = rc;
+ }
if (fsm->archiveSize && ec == 0)
*fsm->archiveSize = (fdGetCpioPos(fsm->cfd) - pos);
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
[]