- factor all mode-specific options into mode-specific tables.
- treat an unspecified epoch as Epoch: 0 everywhere.
CVS patchset: 5578
CVS date: 2002/07/29 23:06:06
- popt: display sub-table options only once on --usage.
- wire --nosignatures et al as common options, rework CLI options.
- python: don't segfault in ts.GetKeys() on erased packages.
+ - update trpm.
+ - factor all mode-specific options into mode-specific tables.
+ - treat an unspecified epoch as Epoch: 0 everywhere.
4.0.3 -> 4.0.4:
- solaris: translate i86pc to i386 (#57182).
/*@unchecked@*/
struct rpmBuildArguments_s rpmBTArgs;
-#define POPT_USECATALOG -1000
-#define POPT_NOLANG -1001
-#define POPT_RMSOURCE -1002
-#define POPT_RMBUILD -1003
-#define POPT_BUILDROOT -1004
-#define POPT_TARGETPLATFORM -1007
-#define POPT_NOBUILD -1008
-#define POPT_SHORTCIRCUIT -1009
-#define POPT_RMSPEC -1010
-#define POPT_SIGN -1012
+#define POPT_USECATALOG -1011
+#define POPT_NOLANG -1012
+#define POPT_RMSOURCE -1013
+#define POPT_RMBUILD -1014
+#define POPT_BUILDROOT -1015
+#define POPT_TARGETPLATFORM -1016
+#define POPT_NOBUILD -1017
+#define POPT_SHORTCIRCUIT -1018
+#define POPT_RMSPEC -1019
+#define POPT_SIGN -1020
#define POPT_REBUILD 0x4220
#define POPT_RECOMPILE 0x4320
* If no obsoletes version info is available, match all names.
*/
if (rpmdsEVR(obsoletes) == NULL
- || headerMatchesDepFlags(h2, obsoletes))
+ || rpmdsAnyMatchesDep(h2, obsoletes, _rpmds_nopromote))
xx = removePackage(ts, h2, rpmdbGetIteratorOffset(mi), pkgKey);
}
mi = rpmdbFreeIterator(mi);
/**
* Check dep for an unsatisfied dependency.
- * @todo Eliminate rpmrc provides.
* @param ts transaction set
* @param dep dependency
+ * @param adding dependency is from added package set?
* @return 0 if satisfied, 1 if not satisfied, 2 if error
*/
-static int unsatisfiedDepend(rpmts ts, rpmds dep)
+static int unsatisfiedDepend(rpmts ts, rpmds dep, int adding)
/*@globals _cacheDependsRC, rpmGlobalMacroContext,
fileSystem, internalState @*/
/*@modifies ts, _cacheDependsRC, rpmGlobalMacroContext,
rpmdbMatchIterator mi;
const char * Name;
Header h;
+ int _cacheThisRC = 1;
int rc;
int xx;
}
/* Search added packages for the dependency. */
- if (rpmalSatisfiesDepend(ts->addedPackages, dep, NULL) != NULL)
+ if (rpmalSatisfiesDepend(ts->addedPackages, dep, NULL) != NULL) {
+ /*
+ * XXX Ick, context sensitive answers from dependency cache.
+ * XXX Always resolve added dependencies within context to disambiguate.
+ */
+ if (_rpmds_nopromote)
+ _cacheThisRC = 0;
goto exit;
+ }
/* XXX only the installer does not have the database open here. */
if (rpmtsGetRdb(ts) != NULL) {
(void) rpmdbPruneIterator(mi,
ts->removedPackages, ts->numRemovedPackages, 1);
while ((h = rpmdbNextIterator(mi)) != NULL) {
- if (rangeMatchesDepFlags(h, dep)) {
+ if (rpmdsAnyMatchesDep(h, dep, _rpmds_nopromote)) {
rpmdsNotify(dep, _("(db provides)"), rc);
mi = rpmdbFreeIterator(mi);
goto exit;
(void) rpmdbPruneIterator(mi,
ts->removedPackages, ts->numRemovedPackages, 1);
while ((h = rpmdbNextIterator(mi)) != NULL) {
- if (rangeMatchesDepFlags(h, dep)) {
+ if (rpmdsAnyMatchesDep(h, dep, _rpmds_nopromote)) {
rpmdsNotify(dep, _("(db package)"), rc);
mi = rpmdbFreeIterator(mi);
goto exit;
* Search for an unsatisfied dependency.
*/
/*@-boundsread@*/
- if (!(rpmtsFlags(ts) & RPMTRANS_FLAG_NOSUGGEST) && ts->solve != NULL)
- xx = (*ts->solve) (ts, dep);
+ if (adding && !(rpmtsFlags(ts) & RPMTRANS_FLAG_NOSUGGEST)) {
+ if (ts->solve != NULL)
+ xx = (*ts->solve) (ts, dep);
+ }
/*@=boundsread@*/
unsatisfied:
/*
* If dbiOpen/dbiPut fails (e.g. permissions), we can't cache.
*/
- if (_cacheDependsRC) {
+ if (_cacheDependsRC && _cacheThisRC) {
dbiIndex dbi;
dbi = dbiOpen(rpmtsGetRdb(ts), RPMDBI_DEPENDS, 0);
if (dbi == NULL) {
if (multiLib && !isDependsMULTILIB(Flags))
continue;
- rc = unsatisfiedDepend(ts, requires);
+ rc = unsatisfiedDepend(ts, requires, adding);
switch (rc) {
case 0: /* requirements are satisfied. */
if (multiLib && !isDependsMULTILIB(Flags))
continue;
- rc = unsatisfiedDepend(ts, conflicts);
+ rc = unsatisfiedDepend(ts, conflicts, adding);
/* 1 == unsatisfied, 0 == satsisfied */
switch (rc) {
pkgNEVR = hGetNEVR(h, NULL);
requires = rpmdsNew(h, RPMTAG_REQUIRENAME, scareMem);
+ (void) rpmdsSetNoPromote(requires, _rpmds_nopromote);
conflicts = rpmdsNew(h, RPMTAG_CONFLICTNAME, scareMem);
+ (void) rpmdsSetNoPromote(requires, _rpmds_nopromote);
rc = checkPackageDeps(ts, pkgNEVR, requires, conflicts, dep, 0, adding);
conflicts = rpmdsFree(conflicts);
requires = rpmdsFree(requires);
#include "debug.h"
-#ifdef NOTYET
-#define POPT_RCFILE -1022
-#endif
#define POPT_SHOWVERSION -999
#define POPT_SHOWRC -998
+#ifdef NOTYET
+#define POPT_RCFILE -997
+#endif
/*@unchecked@*/
static int _debug = 0;
/*@-exportheadervar@*/
+/*@unchecked@*/
+extern int _rpmds_nopromote;
+
/*@unchecked@*/
extern int _fps_debug;
N_("disable use of libio(3) API"), NULL},
#endif
+ { "promoteepoch", '\0', POPT_ARG_VAL|POPT_ARGFLAG_DOC_HIDDEN, &_rpmds_nopromote, 0,
+ NULL, NULL},
+
{ "fpsdebug", '\0', POPT_ARG_VAL|POPT_ARGFLAG_DOC_HIDDEN, &_fps_debug, -1,
NULL, NULL},
{ "fsmdebug", '\0', POPT_ARG_VAL|POPT_ARGFLAG_DOC_HIDDEN, &_fsm_debug, -1,
/*@unchecked@*/
struct rpmInstallArguments_s rpmIArgs;
-#define POPT_RELOCATE -1016
-#define POPT_EXCLUDEPATH -1019
-#define POPT_ROLLBACK -1024
-
-/*@exits@*/ static void argerror(const char * desc)
- /*@*/
+#define POPT_RELOCATE -1021
+#define POPT_EXCLUDEPATH -1022
+#define POPT_ROLLBACK -1023
+
+/*@exits@*/
+static void argerror(const char * desc)
+ /*@globals stderr, fileSystem @*/
+ /*@modifies stderr, fileSystem @*/
{
/*@-modfilesys -globs @*/
fprintf(stderr, _("%s: %s\n"), __progname, desc);
/*@unused@*/ enum poptCallbackReason reason,
const struct poptOption * opt, const char * arg,
/*@unused@*/ const void * data)
- /*@globals rpmIArgs @*/
- /*@modifies rpmIArgs @*/
+ /*@globals rpmIArgs, stderr, fileSystem @*/
+ /*@modifies rpmIArgs, stderr, fileSystem @*/
{
struct rpmInstallArguments_s * ia = &rpmIArgs;
/*@-branchstate@*/
if (opt->arg == NULL)
switch (opt->val) {
+
+ case 'i':
+ ia->installInterfaceFlags |= INSTALL_INSTALL;
+ break;
+
case POPT_EXCLUDEPATH:
if (arg == NULL || *arg != '/')
argerror(_("exclude paths must begin with a /"));
N_("don't check disk space before installing"), NULL},
{ "includedocs", '\0', POPT_ARGFLAG_DOC_HIDDEN, &rpmIArgs.incldocs, 0,
N_("install documentation"), NULL},
+
+#ifdef DYING
{ "install", '\0', POPT_BIT_SET,
&rpmIArgs.installInterfaceFlags, INSTALL_INSTALL,
N_("install package(s)"), N_("<packagefile>+") },
+#else
+ { "install", 'i', 0, NULL, 'i',
+ N_("install package(s)"), N_("<packagefile>+") },
+#endif
+
{ "justdb", '\0', POPT_BIT_SET, &rpmIArgs.transFlags, RPMTRANS_FLAG_JUSTDB,
N_("update the database, but do not modify the filesystem"), NULL},
+
#ifdef DYING
{ "nodeps", '\0', 0, &rpmIArgs.noDeps, 0,
N_("do not verify package dependencies"), NULL },
{ "nodeps", '\0', 0, NULL, RPMCLI_POPT_NODEPS,
N_("do not verify package dependencies"), NULL },
#endif
+
{ "nomd5", '\0', 0, NULL, RPMCLI_POPT_NOMD5,
N_("don't verify MD5 digest of files"), NULL },
{ "noorder", '\0', POPT_BIT_SET,
case 'I': /* from --import */
case 'K': /* from --checksig, -K */
case 'R': /* from --resign */
- if (qva->qva_mode == ' ') {
+ if (qva->qva_mode == ' ' || qva->qva_mode == '\0') {
qva->qva_mode = opt->val;
qva->qva_char = ' ';
}
}
break;
+ case 'i':
+ if (qva->qva_mode == 'q') {
+ /*@-nullassign -readonlytrans@*/
+ const char * infoCommand[] = { "--info", NULL };
+ /*@=nullassign =readonlytrans@*/
+ (void) poptStuffArgs(con, infoCommand);
+ }
+ break;
+
case RPMCLI_POPT_NODIGEST:
qva->qva_flags |= VERIFY_DIGEST;
break;
N_("list all documentation files"), NULL },
{ "dump", '\0', 0, 0, POPT_DUMP,
N_("dump basic file information"), NULL },
+ { NULL, 'i', POPT_ARGFLAG_DOC_HIDDEN, 0, 'i',
+ NULL, NULL },
{ "list", 'l', 0, 0, 'l',
N_("list files in package"), NULL },
}
/**
+ * Execute triggers.
+ * @todo Trigger on any provides, not just package NVR.
* @param psm package state machine data
* @param sourceH
* @param triggeredH
xx = headerNVR(sourceH, &sourceName, NULL, NULL);
trigger = rpmdsInit(rpmdsNew(triggeredH, RPMTAG_TRIGGERNAME, scareMem));
- if (trigger != NULL)
+ if (trigger == NULL)
+ return rc;
+
+ (void) rpmdsSetNoPromote(trigger, 1);
+
while ((i = rpmdsNext(trigger)) >= 0) {
rpmTagType tit, tst, tpt;
const char * Name;
if (!(Flags & psm->sense))
continue;
- if (!headerMatchesDepFlags(sourceH, trigger))
+ if (!rpmdsNVRMatchesDep(sourceH, trigger, 1))
continue;
if (!( hge(triggeredH, RPMTAG_TRIGGERINDEX, &tit,
/*@unchecked@*/
int _rpmds_debug = 0;
+/*@unchecked@*/
+int _rpmds_nopromote = 1;
+
+/*@unchecked@*/
+int _rpmds_unspecified_epoch_noise = 0;
+
rpmds XrpmdsUnlink(rpmds ds, const char * msg, const char * fn, unsigned ln)
{
if (ds == NULL) return NULL;
ds->N = N;
ds->Nt = Nt;
ds->Count = Count;
+ ds->nopromote = 0;
xx = hge(h, tagEVR, &ds->EVRt, (void **) &ds->EVR, NULL);
xx = hge(h, tagF, &ds->Ft, (void **) &ds->Flags, NULL);
return tagN;
}
+int rpmdsNoPromote(const rpmds ds)
+{
+ int nopromote = 0;
+
+ if (ds != NULL)
+ nopromote = ds->nopromote;
+ return nopromote;
+}
+
+int rpmdsSetNoPromote(const rpmds ds, int nopromote)
+{
+ int onopromote = 0;
+
+ if (ds != NULL) {
+ onopromote = ds->nopromote;
+ ds->nopromote = nopromote;
+ }
+ return onopromote;
+}
+
void rpmdsNotify(rpmds ds, const char * where, int rc)
{
if (!(ds != NULL && ds->i >= 0 && ds->i < ds->Count))
if (aE && *aE && bE && *bE)
sense = rpmvercmp(aE, bE);
else if (aE && *aE && atol(aE) > 0) {
-#ifndef LEGACY_COMPATIBILITY_NEEDS_THIS
- /* XXX legacy epoch-less requires/conflicts compatibility */
- rpmMessage(RPMMESS_DEBUG, _("the \"B\" dependency needs an epoch (assuming same as \"A\")\n\tA %s\tB %s\n"),
+ if (!B->nopromote) {
+ int lvl = (_rpmds_unspecified_epoch_noise ? RPMMESS_WARNING : RPMMESS_DEBUG);
+ rpmMessage(lvl, _("The \"B\" dependency needs an epoch (assuming same epoch as \"A\")\n\tA = \"%s\"\tB = \"%s\"\n"),
aDepend, bDepend);
- sense = 0;
-#else
- sense = 1;
-#endif
+ sense = 0;
+ } else
+ sense = 1;
} else if (bE && *bE && atol(bE) > 0)
sense = -1;
rpmpsAppend(ps, type, pkgNEVR, key, NULL, NULL, DNEVR, adding);
}
-int rangeMatchesDepFlags (Header h, const rpmds req)
+int rpmdsAnyMatchesDep (const Header h, const rpmds req, int nopromote)
{
int scareMem = 1;
rpmds provides = NULL;
provides = rpmdsInit(rpmdsNew(h, RPMTAG_PROVIDENAME, scareMem));
if (provides == NULL)
goto exit; /* XXX should never happen */
+ if (nopromote)
+ (void) rpmdsSetNoPromote(provides, nopromote);
/*
* Rpm prior to 3.0.3 did not have versioned provides.
return result;
}
-int headerMatchesDepFlags(const Header h, const rpmds req)
+int rpmdsNVRMatchesDep(const Header h, const rpmds req, int nopromote)
{
HGE_t hge = (HGE_t)headerGetEntryMinMemory;
const char * pkgN, * v, * r;
/*@=boundswrite@*/
if ((pkg = rpmdsSingle(RPMTAG_PROVIDENAME, pkgN, pkgEVR, pkgFlags)) != NULL) {
+ if (nopromote)
+ (void) rpmdsSetNoPromote(pkg, nopromote);
rc = rpmdsCompare(pkg, req);
pkg = rpmdsFree(pkg);
}
extern int _rpmds_debug;
/*@=exportlocal@*/
+/**
+ */
+/*@-exportlocal@*/
+/*@unchecked@*/
+extern int _rpmds_nopromote;
+/*@=exportlocal@*/
+
#if defined(_RPMDS_INTERNAL)
/**
* A package dependency set.
int_32 * Flags; /*!< Flags identifying context/comparison. */
rpmTagType Nt, EVRt, Ft; /*!< Tag data types. */
int_32 Count; /*!< No. of elements */
+ int nopromote; /*!< Don't promote Epoch: in rpmdsCompare()? */
/*@refs@*/
int nrefs; /*!< Reference count. */
};
rpmTag rpmdsTagN(/*@null@*/ const rpmds ds)
/*@*/;
+/**
+ * Return current "Don't promote Epoch:" flag.
+ *
+ * This flag controls for Epoch: promotion when a dependency set is
+ * compared. If the flag is set (for already installed packages), then
+ * an unspecified value will be treated as Epoch: 0. Otherwise (for added
+ * packages), the Epoch: portion of the comparison is skipped if the value
+ * is not specified, i.e. an unspecified Epoch: is assumed to be equal
+ * in dependency comparisons.
+ *
+ * @param ds dependency set
+ * @return current "Don't promote Epoch:" flag
+ */
+int rpmdsNoPromote(/*@null@*/ const rpmds ds)
+ /*@*/;
+
+/**
+ * Set "Don't promote Epoch:" flag.
+ * @param ds dependency set
+ * @return previous "Don't promote Epoch:" flag
+ */
+int rpmdsSetNoPromote(/*@null@*/ const rpmds ds, int nopromote)
+ /*@*/;
+
/**
* Notify of results of dependency match.
* @param ds dependency set
* Compare package provides dependencies from header with a single dependency.
* @param h header
* @param req dependency set
+ * @param nopromote Don't promote Epoch: in comparison?
+ * @return 1 if any dependency overlaps, 0 otherwise
*/
-int rangeMatchesDepFlags (Header h, const rpmds req)
+int rpmdsAnyMatchesDep (const Header h, const rpmds req, int nopromote)
/*@modifies h @*/;
/**
* Compare package name-version-release from header with a single dependency.
* @deprecated Remove from API when obsoletes is correctly implemented.
* @param h header
- * @param req dependency
+ * @param req dependency set
+ * @param nopromote Don't promote Epoch: in comparison?
* @return 1 if dependency overlaps, 0 otherwise
*/
-int headerMatchesDepFlags(const Header h, const rpmds req)
+int rpmdsNVRMatchesDep(const Header h, const rpmds req, int nopromote)
/*@*/;
#ifdef __cplusplus
time_t htime;
int_32 * ip;
- if (rpmtag == RPMTAG_PROVIDENAME && !rangeMatchesDepFlags(h, ds))
+ if (rpmtag == RPMTAG_PROVIDENAME && !rpmdsAnyMatchesDep(h, ds, 1))
continue;
htime = 0;
/*@=boundswrite@*/
req = rpmdsSingle(RPMTAG_REQUIRENAME, rpmteN(p), reqEVR, reqFlags);
- rc = headerMatchesDepFlags(h, req);
+ rc = rpmdsNVRMatchesDep(h, req, _rpmds_nopromote);
req = rpmdsFree(req);
if (rc == 0) {
#define S_ISDEV(m) (S_ISBLK((m)) || S_ISCHR((m)))
+/*@unchecked@*/
+extern int _rpmds_unspecified_epoch_noise;
+
int rpmVerifyFile(const rpmts ts, const rpmfi fi,
rpmVerifyAttrs * res, rpmVerifyAttrs omitMask)
{
if (fi != NULL) {
if (qva->qva_flags & VERIFY_DEPS) {
+ int save_noise = _rpmds_unspecified_epoch_noise;
+ _rpmds_unspecified_epoch_noise = 1;
if ((rc = verifyDependencies(qva, ts, h)) != 0)
ec = rc;
+ _rpmds_unspecified_epoch_noise = save_noise;
}
if (qva->qva_flags & VERIFY_FILES) {
if ((rc = verifyHeader(qva, ts, fi)) != 0)
#include "findme.h"
#include "poptint.h"
+#ifdef MYDEBUG
+/*@unchecked@*/
+int _popt_debug = 0;
+#endif
+
#ifndef HAVE_STRERROR
static char * strerror(int errno) {
extern int sys_nerr;
if (argv[0] == NULL)
return POPT_ERROR_NOARG;
-#ifdef MYDEBUG
+#ifdef MYDEBUG
+if (_popt_debug)
{ const char ** avp;
fprintf(stderr, "==> execvp(%s) argv[%d]:", argv[0], argc);
for (avp = argv; *avp; avp++)
%{__prefix}/include/popt.h
%changelog
-* Sat Jul 27 2002 Jeff Johnson <jbj@redhat.com> 4.1-0.58
+* Mon Jul 29 2002 Jeff Johnson <jbj@redhat.com> 4.1-0.58
- popt: display sub-table options only once on --usage.
- wire --nosignatures et al as common options, rework CLI options.
- python: don't segfault in ts.GetKeys() on erased packages.
+- update trpm.
+- factor all mode-specific options into mode-specific tables.
+- treat an unspecified epoch as Epoch: 0 everywhere.
* Thu Jul 25 2002 Jeff Johnson <jbj@redhat.com> 4.1-0.57
- python: remove the old initdb/rebuilddb methods, use ts.fooDB().
rpm alias --rebuilddbpath --define '_dbapath_rebuild !#:+'
#==============================================================================
-# [--dbpath <dir>] "use <dir> as the directory for the database"
+# [--dbpath DIRECTORY" "use database in DIRECTORY"
rpm alias --dbpath --define '_dbpath !#:+'
# [--ftpport <port>] "port number of ftp server (or proxy)"
rpm alias --ftpport --define '_ftpport !#:+'
rpm exec --addsign rpmk --addsign
rpm exec -K rpmk -K
rpm exec --checksig rpmk --checksig
+rpm exec --import rpmk --import
rpm exec --resign rpmk --resign
rpm exec -q rpmq -q
--POPTargs=$"<option>"
#==============================================================================
rpmb alias --dbpath --define '_dbpath !#:+' \
- --POPTdesc=$"use <dir> as the directory for the database" \
- --POPTargs=$"<dir>"
+ --POPTdesc=$"use database in DIRECTORY" \
+ --POPTargs=$"DIRECTORY"
rpmb alias --ftpport --define '_ftpport !#:+'
rpmb alias --ftpproxy --define '_ftpproxy !#:+'
rpmb alias --httpport --define '_httpport !#:+'
--POPTargs=$"<option>"
#==============================================================================
rpmbuild alias --dbpath --define '_dbpath !#:+' \
- --POPTdesc=$"use <dir> as the directory for the database" \
- --POPTargs=$"<dir>"
+ --POPTdesc=$"use database in DIRECTORY" \
+ --POPTargs=$"DIRECTORY"
rpmbuild alias --ftpport --define '_ftpport !#:+'
rpmbuild alias --ftpproxy --define '_ftpproxy !#:+'
rpmbuild alias --httpport --define '_httpport !#:+'
--POPTargs=$"<option>"
#==============================================================================
rpmd alias --dbpath --define '_dbpath !#:+' \
- --POPTdesc=$"use <dir> as the directory for the database" \
- --POPTargs=$"<dir>"
+ --POPTdesc=$"use database in DIRECTORY" \
+ --POPTargs=$"DIRECTORY"
rpmd alias --ftpport --define '_ftpport !#:+'
rpmd alias --ftpproxy --define '_ftpproxy !#:+'
rpmd alias --httpport --define '_httpport !#:+'
rpmd alias --httpproxy --define '_httpproxy !#:+'
#==============================================================================
rpmdb alias --dbpath --define '_dbpath !#:+' \
- --POPTdesc=$"use <dir> as the directory for the database" \
- --POPTargs=$"<dir>"
+ --POPTdesc=$"use database in DIRECTORY" \
+ --POPTargs=$"DIRECTORY"
rpmdb alias --ftpport --define '_ftpport !#:+'
rpmdb alias --ftpproxy --define '_ftpproxy !#:+'
rpmdb alias --httpport --define '_httpport !#:+'
rpmdb alias --httpproxy --define '_httpproxy !#:+'
#==============================================================================
rpme alias --dbpath --define '_dbpath !#:+' \
- --POPTdesc=$"use <dir> as the directory for the database" \
- --POPTargs=$"<dir>"
+ --POPTdesc=$"use database in DIRECTORY" \
+ --POPTargs=$"DIRECTORY"
rpme alias --ftpport --define '_ftpport !#:+'
rpme alias --ftpproxy --define '_ftpproxy !#:+'
rpme alias --httpport --define '_httpport !#:+'
rpme alias --httpproxy --define '_httpproxy !#:+'
#==============================================================================
rpmi alias --dbpath --define '_dbpath !#:+' \
- --POPTdesc=$"use <dir> as the directory for the database" \
- --POPTargs=$"<dir>"
+ --POPTdesc=$"use database in DIRECTORY" \
+ --POPTargs=$"DIRECTORY"
rpmi alias --ftpport --define '_ftpport !#:+'
rpmi alias --ftpproxy --define '_ftpproxy !#:+'
rpmi alias --httpport --define '_httpport !#:+'
rpmi alias --httpproxy --define '_httpproxy !#:+'
#==============================================================================
rpmk alias --dbpath --define '_dbpath !#:+' \
- --POPTdesc=$"use <dir> as the directory for the database" \
- --POPTargs=$"<dir>"
+ --POPTdesc=$"use database in DIRECTORY" \
+ --POPTargs=$"DIRECTORY"
rpmk alias --ftpport --define '_ftpport !#:+'
rpmk alias --ftpproxy --define '_ftpproxy !#:+'
rpmk alias --httpport --define '_httpport !#:+'
rpmk alias --httpproxy --define '_httpproxy !#:+'
#==============================================================================
rpmsign alias --dbpath --define '_dbpath !#:+' \
- --POPTdesc=$"use <dir> as the directory for the database" \
- --POPTargs=$"<dir>"
+ --POPTdesc=$"use database in DIRECTORY" \
+ --POPTargs=$"DIRECTORY"
rpmsign alias --ftpport --define '_ftpport !#:+'
rpmsign alias --ftpproxy --define '_ftpproxy !#:+'
rpmsign alias --httpport --define '_httpport !#:+'
rpmsign alias --httpproxy --define '_httpproxy !#:+'
#==============================================================================
rpmq alias --dbpath --define '_dbpath !#:+' \
- --POPTdesc=$"use <dir> as the directory for the database" \
- --POPTargs=$"<dir>"
+ --POPTdesc=$"use database in DIRECTORY" \
+ --POPTargs=$"DIRECTORY"
rpmq alias --ftpport --define '_ftpport !#:+'
rpmq alias --ftpproxy --define '_ftpproxy !#:+'
rpmq alias --httpport --define '_httpport !#:+'
--POPTdesc=$"list all files from each package"
#==============================================================================
rpmquery alias --dbpath --define '_dbpath !#:+' \
- --POPTdesc=$"use <dir> as the directory for the database" \
- --POPTargs=$"<dir>"
+ --POPTdesc=$"use database in DIRECTORY" \
+ --POPTargs=$"DIRECTORY"
rpmquery alias --ftpport --define '_ftpport !#:+'
rpmquery alias --ftpproxy --define '_ftpproxy !#:+'
rpmquery alias --httpport --define '_httpport !#:+'
--POPTdesc=$"list all files from each package"
#==============================================================================
rpmu alias --dbpath --define '_dbpath !#:+' \
- --POPTdesc=$"use <dir> as the directory for the database" \
- --POPTargs=$"<dir>"
+ --POPTdesc=$"use database in DIRECTORY" \
+ --POPTargs=$"DIRECTORY"
rpmu alias --ftpport --define '_ftpport !#:+'
rpmu alias --ftpproxy --define '_ftpproxy !#:+'
rpmu alias --httpport --define '_httpport !#:+'
rpmu alias --httpproxy --define '_httpproxy !#:+'
#==============================================================================
rpmv alias --dbpath --define '_dbpath !#:+' \
- --POPTdesc=$"use <dir> as the directory for the database" \
- --POPTargs=$"<dir>"
+ --POPTdesc=$"use database in DIRECTORY" \
+ --POPTargs=$"DIRECTORY"
rpmv alias --ftpport --define '_ftpport !#:+'
rpmv alias --ftpproxy --define '_ftpproxy !#:+'
rpmv alias --httpport --define '_httpport !#:+'
/*@unchecked@*/
static struct poptOption optionsTable[] = {
- /* XXX colliding options */
-#if defined(IAM_RPMQV) || defined(IAM_RPMEIU)
- { NULL, 'i', POPT_ARGFLAG_DOC_HIDDEN, 0, 'i', NULL, NULL},
-#endif
-
#ifdef IAM_RPMQV
{ NULL, '\0', POPT_ARG_INCLUDE_TABLE, rpmQueryPoptTable, 0,
N_("Query options (with -q or --query):"),
rpmts ts = NULL;
enum modes bigMode = MODE_UNKNOWN;
-#ifdef IAM_RPMQV
+#if defined(IAM_RPMQV)
QVA_t qva = &rpmQVKArgs;
#endif
/*@-nullpass@*/
#ifdef IAM_RPMBT
if (!strcmp(__progname, "rpmb")) bigMode = MODE_BUILD;
+ if (!strcmp(__progname, "lt-rpmb")) bigMode = MODE_BUILD;
if (!strcmp(__progname, "rpmt")) bigMode = MODE_TARBUILD;
if (!strcmp(__progname, "rpmbuild")) bigMode = MODE_BUILD;
#endif
#ifdef IAM_RPMQV
if (!strcmp(__progname, "rpmq")) bigMode = MODE_QUERY;
+ if (!strcmp(__progname, "lt-rpmq")) bigMode = MODE_QUERY;
if (!strcmp(__progname, "rpmv")) bigMode = MODE_VERIFY;
if (!strcmp(__progname, "rpmquery")) bigMode = MODE_QUERY;
if (!strcmp(__progname, "rpmverify")) bigMode = MODE_VERIFY;
#ifdef RPMEIU
if (!strcmp(__progname, "rpme")) bigMode = MODE_ERASE;
if (!strcmp(__progname, "rpmi")) bigMode = MODE_INSTALL;
+ if (!strcmp(__progname, "lt-rpmi")) bigMode = MODE_INSTALL;
if (!strcmp(__progname, "rpmu")) bigMode = MODE_INSTALL;
#endif
/*@=nullpass@*/
+#if defined(IAM_RPMQV)
+ /* Jumpstart option from argv[0] if necessary. */
+ switch (bigMode) {
+ case MODE_QUERY: qva->qva_mode = 'q'; break;
+ case MODE_VERIFY: qva->qva_mode = 'V'; break;
+ case MODE_QUERYTAGS:qva->qva_mode = 'Q'; break;
+ case MODE_CHECKSIG: qva->qva_mode = 'K'; break;
+ case MODE_RESIGN: qva->qva_mode = 'R'; break;
+ case MODE_INSTALL:
+ case MODE_ERASE:
+ case MODE_BUILD:
+ case MODE_REBUILD:
+ case MODE_RECOMPILE:
+ case MODE_TARBUILD:
+ case MODE_INITDB:
+ case MODE_REBUILDDB:
+ case MODE_VERIFYDB:
+ case MODE_UNKNOWN:
+ default:
+ break;
+ }
+#endif
+
/* XXX Eliminate query linkage loop */
/*@-type@*/ /* FIX: casts? */
parseSpecVec = parseSpec;
optArg = poptGetOptArg(optCon);
switch (arg) {
-
-/* XXX options used in multiple rpm modes */
-
-#if defined(IAM_RPMQV) || defined(IAM_RPMEIU)
- case 'i':
-#ifdef IAM_RPMQV
- if (bigMode == MODE_QUERY || qva->qva_mode == 'q') {
- /*@-nullassign -readonlytrans@*/
- const char * infoCommand[] = { "--info", NULL };
- /*@=nullassign =readonlytrans@*/
- (void) poptStuffArgs(optCon, infoCommand);
- } else
-#endif
-#ifdef IAM_RPMEIU
- if (bigMode == MODE_INSTALL ||
- (ia->installInterfaceFlags &
- (INSTALL_UPGRADE|INSTALL_FRESHEN|INSTALL_INSTALL)))
- /*@-ifempty@*/ ;
- else if (bigMode == MODE_UNKNOWN) {
- /*@-nullassign -readonlytrans@*/
- const char * installCommand[] = { "--install", NULL };
- /*@=nullassign =readonlytrans@*/
- (void) poptStuffArgs(optCon, installCommand);
- } else
-#endif
- /*@-ifempty@*/ ;
- /*@switchbreak@*/ break;
-#endif /* IAM_RPMQV || IAM_RPMEIU */
-
default:
fprintf(stderr, _("Internal error in argument processing (%d) :-(\n"), arg);
exit(EXIT_FAILURE);
#!/bin/sh
+ulimit -S -c unlimited
dbg= # echo
rpm=/bin/rpm
+#rpm=/X/src/rpm/rpm
#rpmi=mrpm
-rpmi=/bin/rpm
#rpmi="strace -o xxx /bin/rpm"
+rpmi="$rpm"
rpmb=/usr/bin/rpmbuild
rpmq=/usr/bin/rpmquery
rpmdb=/usr/bin/rpmdb
+rpmk=/usr/bin/rpmsign
+
+pgppubkey=/usr/lib/rpm/RPM-PGP-KEY
+gpgpubkey=/usr/lib/rpm/RPM-GPG-KEY
+betapubkey=/usr/lib/rpm/BETA-GPG-KEY
+jbjpubkey=/usr/lib/rpm/JBJ-GPG-KEY
#rpm=/X/src/rpm402/rpm
#rpmb=/X/src/rpm402/rpmb
grep-
gzip-
info-
+less-
+libacl-2
+libattr-2
mount-
ncurses-[45]
+pcre-
procps-2
psmisc-
sed-
baseglob="
$min2glob
ash-
+bdflush-
console-tools-
-gmp-[23]
+cyrus-sasl-[12]
+cyrus-sasl-md5-
+glib2-2
+gmp-[234]
initscripts-
iputils-
iproute-
+kbd-
kernel-2
+krb5-libs-
+libuser-
losetup-
+lvm-
mkinitrd-
modutils-
+net-tools-
+openldap-2
+openssl-0
pam-0
pamconfig-
sh-utils-
sysklogd-
+usermode-1
util-linux-
vixie-cron-
rpm-[34]
db4-devel-
gdbm-devel-
glibc-devel-
+glibc-kernheaders-
gmp-devel-
kernel-headers-
readline-devel-[24]
db4-utils-
egcs-1
egcs-c++-1
-gcc-2
-gcc-c++-2
+expat-1
+gcc-[23]
+gcc-c++-[23]
gettext-
krb5-configs-
-krb5-libs-
+libgcc-3
libstdc++-
libtool-
make-
m4-
ncurses-devel-
-openssl-0
patch-
perl-5
-python-1
+perl-CGI-
+python-[12]
rpm-build-
+file-3
tcsh-
"
-classes="min0 min1 min2 base devel build"
+
+mozillaglob="
+$buildglob
+mozilla-
+compat-libstdc++-7
+indexhtml-
+redhat-menus-
+gtk+-1
+XFree86-libs-[34]
+ORBit-0
+fontconfig-0
+freetype-2
+XFree86-Mesa-libGL-
+libpng-
+libjpeg-
+vorbis-tools-
+libvorbis-
+libogg-
+libao-0
+curl-
+"
+
+classes="min0 min1 min2 base devel build mozilla"
notallpat="(kernel-[^2h])"
for cmd in $*
debug) dbg=echo ;;
dmalloc) eval `dmalloc -b $dmopts` ;;
db1) db1="--define '%_dbapi 1'" ;;
- 5.2|6.2|7.0|7.1|7.2)
+ 5.2|6.2|7.*|8.*)
dist=$cmd
root=$top/$dist
rc="--rcfile $top/rpmrc-$dist $db1"
;;
--initdb)
$dbg $sudo mkdir -p $root/var/lib/rpm
+ $dbg $sudo mkdir -p $root/etc
+ $dbg $sudo touch $root/etc/fstab
+ $dbg $sudo touch $root/etc/mtab
$dbg $sudo $rpmdb $rc --root $root --initdb
+# $dbg $sudo $rpmk $rc --root $root --import $pgppubkey
+# $dbg $sudo $rpmk $rc --root $root --import $gpgpubkey
+# $dbg $sudo $rpmk $rc --root $root --import $betapubkey
+# $dbg $sudo $rpmk $rc --root $root --import $jbjpubkey
;;
--savedb)
( $dbg cd $root/var/lib && $dbg $sudo tar czvf rpmdb.tar.gz rpm ; )