From 3e63d3b76801048ab26c6314d67aa213474b86a0 Mon Sep 17 00:00:00 2001 From: jbj Date: Fri, 2 Mar 2001 08:28:18 +0000 Subject: [PATCH] Flesh out init/pre/process/post/fini PSM stages. CVS patchset: 4592 CVS date: 2001/03/02 08:28:18 --- lib/psm.c | 342 +++++++++++++++++++++++++---------------------------------- lib/psm.h | 3 + po/rpm.pot | 34 +++--- scripts/trpm | 22 +++- 4 files changed, 185 insertions(+), 216 deletions(-) diff --git a/lib/psm.c b/lib/psm.c index 5b5ae7d..9e003a5 100644 --- a/lib/psm.c +++ b/lib/psm.c @@ -573,26 +573,10 @@ static int installArchive(PSM_t psm, int allFiles) } /* Retrieve type of payload compression. */ -#ifndef DYING - { const char * payload_compressor = NULL; - char * t; - - if (!headerGetEntry(fi->h, RPMTAG_PAYLOADCOMPRESSOR, NULL, - (void **) &payload_compressor, NULL)) - payload_compressor = "gzip"; - psm->rpmio_flags = t = xmalloc(sizeof("r.gzdio")); - *t++ = 'r'; - if (!strcmp(payload_compressor, "gzip")) - t = stpcpy(t, ".gzdio"); - if (!strcmp(payload_compressor, "bzip2")) - t = stpcpy(t, ".bzdio"); - } -#else rc = psmStage(psm, PSM_RPMIO_FLAGS); -#endif psm->cfd = Fdopen(fdDup(Fileno(alp->fd)), psm->rpmio_flags); - rc = psmStage(psm, PSM_PKGINSTALL); + rc = psmStage(psm, PSM_PROCESS); saveerrno = errno; /* XXX FIXME: Fclose with libio destroys errno */ Fclose(psm->cfd); psm->cfd = NULL; @@ -1348,47 +1332,126 @@ int psmStage(PSM_t psm, pkgStage stage) TFI_t fi = psm->fi; HGE_t hge = (HGE_t)fi->hge; int rc = psm->rc; - int i; switch (stage) { case PSM_UNKNOWN: break; case PSM_INIT: + rpmMessage(RPMMESS_DEBUG, _("%s: %s-%s-%s has %d files, test = %d\n"), + psm->stepName, fi->name, fi->version, fi->release, + fi->fc, (ts->transFlags & RPMTRANS_FLAG_TEST)); break; case PSM_PRE: + if (psm->goal == PSM_PKGINSTALL) { + psm->scriptTag = RPMTAG_PREIN; + psm->progTag = RPMTAG_PREINPROG; + rc = psmStage(psm, PSM_SCRIPT); + } + if (psm->goal == PSM_PKGERASE) { + psm->scriptTag = RPMTAG_PREUN; + psm->progTag = RPMTAG_PREUNPROG; + psm->sense = RPMSENSE_TRIGGERUN; + psm->countCorrection = -1; + rc = psmStage(psm, PSM_TRIGGERS); + if (rc) break; + + rc = psmStage(psm, PSM_IMMED_TRIGGERS); + if (rc) break; + + rc = psmStage(psm, PSM_SCRIPT); + } break; case PSM_PROCESS: + if (psm->goal == PSM_PKGINSTALL) { + rc = fsmSetup(fi->fsm, FSM_PKGINSTALL, ts, fi, + psm->cfd, NULL, &psm->failedFile); + (void) fsmTeardown(fi->fsm); + } + if (psm->goal == PSM_PKGERASE) { + const void * pkgKey = NULL; + + if (fi->fc <= 0) break; + if (ts->transFlags & RPMTRANS_FLAG_JUSTDB) break; + + if (ts->notify) + (void) ts->notify(fi->h, RPMCALLBACK_UNINST_START, + fi->fc, fi->fc, pkgKey, ts->notifyData); + + rc = fsmSetup(fi->fsm, FSM_PKGERASE, ts, fi, + NULL, NULL, &psm->failedFile); + (void) fsmTeardown(fi->fsm); + + if (ts->notify) + (void) ts->notify(fi->h, RPMCALLBACK_UNINST_STOP, + 0, fi->fc, pkgKey, ts->notifyData); + } + if (psm->goal == PSM_PKGSAVE) { + fileAction * actions = fi->actions; + fileAction action = fi->action; + + fi->action = FA_COPYOUT; + fi->actions = NULL; + + /* XXX failedFile? */ + rc = fsmSetup(fi->fsm, FSM_PKGBUILD, ts, fi, psm->cfd, NULL, NULL); + (void) fsmTeardown(fi->fsm); + + fi->action = action; + fi->actions = actions; + } break; case PSM_POST: + if (psm->goal == PSM_PKGINSTALL) { + psm->scriptTag = RPMTAG_POSTIN; + psm->progTag = RPMTAG_POSTINPROG; + psm->sense = RPMSENSE_TRIGGERIN; + psm->countCorrection = 0; + + rc = psmStage(psm, PSM_RPMDB_ADD); + if (rc) break; + + rc = psmStage(psm, PSM_SCRIPT); + if (rc) break; + + rc = psmStage(psm, PSM_TRIGGERS); + if (rc) break; + + rc = psmStage(psm, PSM_IMMED_TRIGGERS); + if (rc) break; + + markReplacedFiles(ts, fi); + } + if (psm->goal == PSM_PKGERASE) { + psm->scriptTag = RPMTAG_POSTUN; + psm->progTag = RPMTAG_POSTUNPROG; + psm->sense = RPMSENSE_TRIGGERPOSTUN; + psm->countCorrection = -1; + + /* XXX WTFO? postun failures are not cause for erasure failure. */ + (void) psmStage(psm, PSM_SCRIPT); + + rc = psmStage(psm, PSM_TRIGGERS); + } break; case PSM_UNDO: break; case PSM_FINI: + /* Restore root directory if changed. */ + (void) psmStage(psm, PSM_CHROOT_OUT); + + if (fi->h && (psm->goal == PSM_PKGERASE || psm->goal == PSM_PKGSAVE)) { + headerFree(fi->h); + fi->h = NULL; + } + psm->pkgURL = _free(psm->pkgURL); + psm->rpmio_flags = _free(psm->rpmio_flags); + psm->failedFile = _free(psm->failedFile); break; case PSM_PKGINSTALL: - rc = fsmSetup(fi->fsm, FSM_PKGINSTALL, ts, fi, - psm->cfd, NULL, &psm->failedFile); - (void) fsmTeardown(fi->fsm); break; case PSM_PKGERASE: - if (fi->fc <= 0) break; - if (ts->transFlags & RPMTRANS_FLAG_JUSTDB) break; - { const void * pkgKey = NULL; - - if (ts->notify) - (void)ts->notify(fi->h, RPMCALLBACK_UNINST_START, - fi->fc, fi->fc, pkgKey, ts->notifyData); - - /* XXX failedFile? */ - rc = fsmSetup(fi->fsm, FSM_PKGERASE, ts, fi, - NULL, NULL, &psm->failedFile); - (void) fsmTeardown(fi->fsm); - - if (ts->notify) - (void)ts->notify(fi->h, RPMCALLBACK_UNINST_STOP, - 0, fi->fc, pkgKey, ts->notifyData); - } break; + break; case PSM_PKGCOMMIT: if (!(ts->transFlags & RPMTRANS_FLAG_PKGCOMMIT)) break; rc = fsmSetup(fi->fsm, FSM_PKGCOMMIT, ts, fi, @@ -1396,19 +1459,7 @@ int psmStage(PSM_t psm, pkgStage stage) (void) fsmTeardown(fi->fsm); break; case PSM_PKGSAVE: - { fileAction * actions = fi->actions; - fileAction action = fi->action; - - fi->action = FA_COPYOUT; - fi->actions = NULL; - - /* XXX failedFile? */ - rc = fsmSetup(fi->fsm, FSM_PKGBUILD, ts, fi, psm->cfd, NULL, NULL); - (void) fsmTeardown(fi->fsm); - - fi->action = action; - fi->actions = actions; - } break; + break; case PSM_CREATE: break; @@ -1473,11 +1524,13 @@ int psmStage(PSM_t psm, pkgStage stage) (void **) &payload_compressor, NULL)) payload_compressor = "gzip"; psm->rpmio_flags = t = xmalloc(sizeof("w9.gzdio")); - t = stpcpy(t, "w9"); + *t = '\0'; + t = stpcpy(t, ((psm->goal == PSM_PKGSAVE) ? "w9" : "r")); if (!strcmp(payload_compressor, "gzip")) t = stpcpy(t, ".gzdio"); if (!strcmp(payload_compressor, "bzip2")) t = stpcpy(t, ".bzdio"); + rc = 0; } break; case PSM_RPMDB_LOAD: @@ -1519,16 +1572,13 @@ int installBinaryPackage(PSM_t psm) TFI_t fi = psm->fi; HGE_t hge = (HGE_t)fi->hge; Header oldH = NULL; - int otherOffset = 0; int ec = 2; /* assume error return */ int rc; psm->goal = PSM_PKGINSTALL; -psm->stepName = " install"; +psm->stepName = " install"; - rpmMessage(RPMMESS_DEBUG, _("%s: %s-%s-%s has %d files, test = %d\n"), - psm->stepName, fi->name, fi->version, fi->release, - fi->fc, (ts->transFlags & RPMTRANS_FLAG_TEST)); + rc = psmStage(psm, PSM_INIT); /* * When we run scripts, we pass an argument which is the number of @@ -1543,7 +1593,7 @@ psm->stepName = " install"; rpmdbSetIteratorVersion(mi, fi->version); rpmdbSetIteratorRelease(mi, fi->release); while ((oldH = rpmdbNextIterator(mi))) { - otherOffset = rpmdbGetIteratorOffset(mi); + fi->record = rpmdbGetIteratorOffset(mi); oldH = (ts->transFlags & RPMTRANS_FLAG_MULTILIB) ? headerCopy(oldH) : NULL; break; @@ -1590,9 +1640,7 @@ psm->stepName = " install"; goto exit; } - psm->scriptTag = RPMTAG_PREIN; - psm->progTag = RPMTAG_PREINPROG; - rc = psmStage(psm, PSM_SCRIPT); + rc = psmStage(psm, PSM_PRE); if (rc) { rpmError(RPMERR_SCRIPT, _("skipping %s-%s-%s install, %%pre scriptlet failed rc %d\n"), @@ -1636,8 +1684,8 @@ psm->stepName = " install"; * If this package has already been installed, remove it from the database * before adding the new one. */ - if (otherOffset) - rpmdbRemove(ts->rpmdb, ts->id, otherOffset); + if (fi->record) + rpmdbRemove(ts->rpmdb, ts->id, fi->record); if (ts->transFlags & RPMTRANS_FLAG_MULTILIB) { uint_32 multiLib, * newMultiLib, * p; @@ -1653,34 +1701,14 @@ psm->stepName = " install"; goto exit; } - rc = psmStage(psm, PSM_RPMDB_ADD); - if (rc) - goto exit; - - psm->scriptTag = RPMTAG_POSTIN; - psm->progTag = RPMTAG_POSTINPROG; - psm->sense = RPMSENSE_TRIGGERIN; - psm->countCorrection = 0; - - rc = psmStage(psm, PSM_SCRIPT); - if (rc) - goto exit; - - rc = psmStage(psm, PSM_TRIGGERS); - if (rc) - goto exit; - - rc = psmStage(psm, PSM_IMMED_TRIGGERS); + rc = psmStage(psm, PSM_POST); if (rc) goto exit; - markReplacedFiles(ts, fi); - ec = 0; exit: - /* Restore root directory if changed. */ - (void) psmStage(psm, PSM_CHROOT_OUT); + (void) psmStage(psm, PSM_FINI); if (oldH) headerFree(oldH); @@ -1694,12 +1722,10 @@ int removeBinaryPackage(PSM_t psm) int rc = 0; psm->goal = PSM_PKGERASE; -psm->stepName = " erase"; - rpmMessage(RPMMESS_DEBUG, _("%s: %s-%s-%s has %d files, test = %d\n"), - psm->stepName, fi->name, fi->version, fi->release, - fi->fc, (ts->transFlags & RPMTRANS_FLAG_TEST)); +psm->stepName = " erase"; + + rc = psmStage(psm, PSM_INIT); -assert(fi->type == TR_REMOVED); /* * When we run scripts, we pass an argument which is the number of * versions of this package that will be installed when we are finished. @@ -1710,105 +1736,53 @@ assert(fi->type == TR_REMOVED); goto exit; } + /* Load header from rpm database. */ rc = psmStage(psm, PSM_RPMDB_LOAD); if (rc) { rc = 2; goto exit; } - psm->scriptTag = RPMTAG_PREUN; - psm->progTag = RPMTAG_PREUNPROG; - psm->sense = RPMSENSE_TRIGGERUN; - psm->countCorrection = -1; - /* Change root directory if requested and not already done. */ (void) psmStage(psm, PSM_CHROOT_IN); - rc = psmStage(psm, PSM_TRIGGERS); - if (rc) { - rc = 2; - goto exit; - } - rc = psmStage(psm, PSM_IMMED_TRIGGERS); + rc = psmStage(psm, PSM_PRE); if (rc) { rc = 1; goto exit; } - rc = psmStage(psm, PSM_SCRIPT); + rc = psmStage(psm, PSM_PROCESS); + /* XXX WTFO? erase failures are not cause for stopping. */ + + rc = psmStage(psm, PSM_POST); if (rc) { rc = 1; goto exit; } -#ifndef DYING - if (fi->fc > 0 && !(ts->transFlags & RPMTRANS_FLAG_JUSTDB)) { - const void * pkgKey = NULL; - - if (ts->notify) - (void)ts->notify(fi->h, RPMCALLBACK_UNINST_START, fi->fc, fi->fc, - pkgKey, ts->notifyData); - - rc = fsmSetup(fi->fsm, FSM_PKGERASE, ts, fi, - NULL, NULL, &psm->failedFile); - (void) fsmTeardown(fi->fsm); - - if (ts->notify) - (void)ts->notify(fi->h, RPMCALLBACK_UNINST_STOP, 0, fi->fc, - pkgKey, ts->notifyData); - } -#else - rc = psmStage(psm, PSM_PKGERASE); -#endif - /* XXX WTFO? erase failures are not cause for stopping. */ - - psm->scriptTag = RPMTAG_POSTUN; - psm->progTag = RPMTAG_POSTUNPROG; - psm->sense = RPMSENSE_TRIGGERPOSTUN; - psm->countCorrection = -1; - - rc = psmStage(psm, PSM_SCRIPT); - /* XXX WTFO? postun failures are not cause for erasure failure. */ + rc = psmStage(psm, PSM_RPMDB_REMOVE); - rc = psmStage(psm, PSM_TRIGGERS); - if (rc) { - rc = 2; - goto exit; - } rc = 0; exit: - /* Restore root directory if changed. */ - (void) psmStage(psm, PSM_CHROOT_OUT); - - if (!rc) - (void) psmStage(psm, PSM_RPMDB_REMOVE); - - if (fi->h) { - headerFree(fi->h); - fi->h = NULL; - } - psm->failedFile = _free(psm->failedFile); + (void) psmStage(psm, PSM_FINI); return rc; } int repackage(PSM_t psm) { - const rpmTransactionSet ts = psm->ts; TFI_t fi = psm->fi; - HGE_t hge = fi->hge; - FD_t fd = NULL; - const char * pkgURL = NULL; - const char * pkgfn = NULL; Header oh = NULL; int saveerrno; int rc = 0; psm->goal = PSM_PKGSAVE; -psm->stepName = " save"; +psm->stepName = "repackage"; + + rc = psmStage(psm, PSM_INIT); -assert(fi->type == TR_REMOVED); /* Retrieve installed header. */ rc = psmStage(psm, PSM_RPMDB_LOAD); if (rc) { @@ -1819,9 +1793,9 @@ assert(fi->type == TR_REMOVED); /* Regenerate original header. */ { void * uh = NULL; int_32 uht, uhc; - HFD_t hfd = fi->hfd; if (headerGetEntry(fi->h, RPMTAG_HEADERIMMUTABLE, &uht, &uh, &uhc)) { + HFD_t hfd = fi->hfd; oh = headerCopyLoad(uh); uh = hfd(uh, uht); } else { @@ -1835,36 +1809,20 @@ assert(fi->type == TR_REMOVED); headerSprintf(fi->h, bfmt, rpmTagTable, rpmHeaderFormats, NULL); bfmt = _free(bfmt); - pkgURL = rpmGenPath( "%{?_repackage_root:%{_repackage_root}}", - "%{?_repackage_dir:%{_repackage_dir}}", + psm->pkgURL = rpmGenPath("%{?_repackage_root:%{_repackage_root}}", + "%{?_repackage_dir:%{_repackage_dir}}", pkgbn); pkgbn = _free(pkgbn); - (void) urlPath(pkgURL, &pkgfn); - fd = Fopen(pkgfn, "w.ufdio"); - if (fd == NULL || Ferror(fd)) { + (void) urlPath(psm->pkgURL, &psm->pkgfn); + psm->fd = Fopen(psm->pkgfn, "w.ufdio"); + if (psm->fd == NULL || Ferror(psm->fd)) { rc = 1; goto exit; } } /* Retrieve type of payload compression. */ -#ifndef DYING - { const char * payload_compressor = NULL; - char * t; - - if (!hge(fi->h, RPMTAG_PAYLOADCOMPRESSOR, NULL, - (void **) &payload_compressor, NULL)) - payload_compressor = "gzip"; - psm->rpmio_flags = t = xmalloc(sizeof("w9.gzdio")); - t = stpcpy(t, "w9"); - if (!strcmp(payload_compressor, "gzip")) - t = stpcpy(t, ".gzdio"); - if (!strcmp(payload_compressor, "bzip2")) - t = stpcpy(t, ".bzdio"); - } -#else rc = psmStage(psm, PSM_RPMIO_FLAGS); -#endif /* Write the lead section into the package. */ { int archnum = -1; @@ -1890,10 +1848,10 @@ assert(fi->type == TR_REMOVED); strncpy(lead.name, buf, sizeof(lead.name)); } - rc = writeLead(fd, &lead); + rc = writeLead(psm->fd, &lead); if (rc) { rpmError(RPMERR_NOSPACE, _("Unable to write package: %s\n"), - Fstrerror(fd)); + Fstrerror(psm->fd)); rc = 1; goto exit; } @@ -1901,47 +1859,41 @@ assert(fi->type == TR_REMOVED); /* Write the signature section into the package. */ { Header sig = headerRegenSigHeader(fi->h); - rc = rpmWriteSignature(fd, sig); + rc = rpmWriteSignature(psm->fd, sig); headerFree(sig); if (rc) goto exit; } /* Write the metadata section into the package. */ - rc = headerWrite(fd, oh, HEADER_MAGIC_YES); + rc = headerWrite(psm->fd, oh, HEADER_MAGIC_YES); if (rc) goto exit; /* Change root directory if requested and not already done. */ (void) psmStage(psm, PSM_CHROOT_IN); /* Write the payload into the package. */ - Fflush(fd); - psm->cfd = Fdopen(fdDup(Fileno(fd)), psm->rpmio_flags); - rc = psmStage(psm, PSM_PKGSAVE); + Fflush(psm->fd); + psm->cfd = Fdopen(fdDup(Fileno(psm->fd)), psm->rpmio_flags); + rc = psmStage(psm, PSM_PROCESS); saveerrno = errno; /* XXX FIXME: Fclose with libio destroys errno */ Fclose(psm->cfd); - errno = saveerrno; psm->cfd = NULL; + errno = saveerrno; exit: - /* Restore root directory if changed. */ - (void) psmStage(psm, PSM_CHROOT_OUT); - if (fi->h) { - headerFree(fi->h); - fi->h = NULL; - } - if (oh) headerFree(oh); - if (fd) { + if (psm->fd) { saveerrno = errno; /* XXX FIXME: Fclose with libio destroys errno */ - Fclose(fd); + Fclose(psm->fd); errno = saveerrno; } if (!rc) - rpmMessage(RPMMESS_VERBOSE, _("Wrote: %s\n"), pkgURL); + rpmMessage(RPMMESS_VERBOSE, _("Wrote: %s\n"), psm->pkgURL); - pkgURL = _free(pkgURL); - psm->rpmio_flags = _free(psm->rpmio_flags); + if (oh) headerFree(oh); + + (void) psmStage(psm, PSM_FINI); return rc; } diff --git a/lib/psm.h b/lib/psm.h index 925610e..3c94c9c 100644 --- a/lib/psm.h +++ b/lib/psm.h @@ -138,9 +138,12 @@ struct psm_s { rpmTransactionSet ts; TFI_t fi; FD_t cfd; + FD_t fd; /*@observer@*/ const char * stepName; /*@owned@*/ const char * rpmio_flags; /*@owned@*/ const char * failedFile; +/*@owned@*/ const char * pkgURL; +/*@dependent@*/ const char * pkgfn; int scriptTag; /*!< Scriptlet data tag. */ int progTag; /*!< Scriptlet interpreter tag. */ int scriptArg; /*!< No. of installed instances. */ diff --git a/po/rpm.pot b/po/rpm.pot index c0c27a3..591ebc7 100644 --- a/po/rpm.pot +++ b/po/rpm.pot @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" -"POT-Creation-Date: 2001-03-01 13:01-0500\n" +"POT-Creation-Date: 2001-03-02 03:25-0500\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -1808,7 +1808,7 @@ msgstr "" msgid "Could not open %s: %s\n" msgstr "" -#: build/pack.c:484 lib/psm.c:1913 +#: build/pack.c:484 lib/psm.c:1853 #, c-format msgid "Unable to write package: %s\n" msgstr "" @@ -1838,7 +1838,7 @@ msgstr "" msgid "Unable to write payload to %s: %s\n" msgstr "" -#: build/pack.c:566 lib/psm.c:1959 +#: build/pack.c:566 lib/psm.c:1892 #, c-format msgid "Wrote: %s\n" msgstr "" @@ -2894,58 +2894,58 @@ msgstr "" #. * was used up - if so, we should return a different error. #. #. XXX FIXME: Fclose with libio destroys errno -#: lib/psm.c:608 +#: lib/psm.c:592 #, c-format msgid "unpacking of archive failed%s%s: %s\n" msgstr "" -#: lib/psm.c:609 +#: lib/psm.c:593 msgid " on file " msgstr "" -#: lib/psm.c:652 +#: lib/psm.c:636 #, c-format msgid "cannot create %s %s\n" msgstr "" -#: lib/psm.c:658 +#: lib/psm.c:642 #, c-format msgid "cannot write to %s\n" msgstr "" -#: lib/psm.c:680 +#: lib/psm.c:664 msgid "installing a source package\n" msgstr "" -#: lib/psm.c:730 +#: lib/psm.c:714 msgid "source package contains no .spec file\n" msgstr "" -#: lib/psm.c:817 +#: lib/psm.c:801 msgid "source package expected, binary found\n" msgstr "" -#: lib/psm.c:1087 +#: lib/psm.c:1071 #, c-format msgid "execution of %s scriptlet from %s-%s-%s failed, waitpid returned %s\n" msgstr "" -#: lib/psm.c:1094 +#: lib/psm.c:1078 #, c-format msgid "execution of %s scriptlet from %s-%s-%s failed, exit status %d\n" msgstr "" -#: lib/psm.c:1455 +#: lib/psm.c:1340 #, c-format -msgid "%s: running %s script(s) (if any)\n" +msgid "%s: %s-%s-%s has %d files, test = %d\n" msgstr "" -#: lib/psm.c:1529 lib/psm.c:1698 +#: lib/psm.c:1506 #, c-format -msgid "%s: %s-%s-%s has %d files, test = %d\n" +msgid "%s: running %s script(s) (if any)\n" msgstr "" -#: lib/psm.c:1598 +#: lib/psm.c:1646 msgid "skipping %s-%s-%s install, %%pre scriptlet failed rc %d\n" msgstr "" diff --git a/scripts/trpm b/scripts/trpm index f5e48b7..2219eae 100755 --- a/scripts/trpm +++ b/scripts/trpm @@ -5,7 +5,12 @@ dbg= # echo rpm=/bin/rpm rpmb=/usr/bin/rpmbuild rpmq=/usr/bin/rpmquery -rpmdb=$rpm +rpmdb=/usr/bin/rpmdb + +#rpm=/X/src/rpm402/rpm +#rpmb=/X/src/rpm402/rpmb +#rpmq=/X/src/rpm402/rpmq +#rpmdb=/X/src/rpm402/rpmdb #rpm=/X/src/rpm307/rpm #rpmb=$rpm @@ -121,22 +126,27 @@ buildglob=" $develglob autoconf- automake- +bash2- binutils- cpp- cvs- db3-utils- -egcs-2 +egcs-1 +egcs-c++-1 gcc-2 +gcc-c++-2 gettext- krb5-configs- krb5-libs- -libstdc++-2 +libstdc++- libtool- make- m4- openssl-0 +patch- perl-5 python-1 +rpm-build- tcsh- " classes="min0 min1 min2 base devel build" @@ -144,6 +154,9 @@ notallpat="(kernel-[^2h])" for cmd in $* do + [ $# -eq 0 ] && break + shift + echo "******** args: $*" echo "=======> start $cmd `date`" case $cmd in debug) dbg=echo ;; @@ -223,7 +236,8 @@ EOF echo $type-$dist-$arch not found exit 1 } - $dbg $sudo $rpm $rc --root $root --force $cmd `cat $type-$dist-$arch` + $dbg $sudo $rpm $rc --root $root $cmd $* `cat $type-$dist-$arch` + set "" ;; -[Vqei]*|--showrc) $dbg $sudo $rpm $rc --root $root $cmd -- 2.7.4