summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--build.c64
-rw-r--r--build.h7
-rw-r--r--convertdb.c2
-rw-r--r--lib/macro.c2
-rw-r--r--lib/rpmlib.h17
-rw-r--r--lib/rpmmacro.h2
-rw-r--r--lib/rpmrc.c274
-rw-r--r--macros.in11
-rw-r--r--po/rpm.pot565
-rw-r--r--popt/po/popt.pot2
-rw-r--r--rpm-qo.c4
-rwxr-xr-xrpm.c154
-rw-r--r--rpmio/macro.c2
-rw-r--r--rpmio/rpmmacro.h2
-rw-r--r--tests/macros.in11
-rw-r--r--tools/dumpdb.c2
16 files changed, 539 insertions, 582 deletions
diff --git a/build.c b/build.c
index 68b86f099..39604f009 100644
--- a/build.c
+++ b/build.c
@@ -5,12 +5,12 @@
#include "build.h"
#ifdef DYING
-int buildplatform(char *arg, int buildAmount, char *passPhrase,
+int buildForTarget(char *arg, int buildAmount, char *passPhrase,
char *buildRoot, int fromTarball, int test, char *cookie,
force);
#endif
-int buildplatform(char *arg, int buildAmount, char *passPhrase,
+static int buildForTarget(char *arg, int buildAmount, char *passPhrase,
char *buildRoot, int fromTarball, int test, char *cookie,
int force)
{
@@ -156,30 +156,28 @@ int buildplatform(char *arg, int buildAmount, char *passPhrase,
int build(char *arg, int buildAmount, char *passPhrase,
char *buildRoot, int fromTarball, int test, char *cookie,
- char * rcfile, char * arch, char * os,
- char *buildplatforms, int force)
+ char * rcfile, char *targets, int force)
{
- char *platform, *t;
+ char *target, *t;
int rc;
- if (buildplatforms == NULL) {
- rc = buildplatform(arg, buildAmount, passPhrase, buildRoot,
+ if (targets == NULL) {
+ rc = buildForTarget(arg, buildAmount, passPhrase, buildRoot,
fromTarball, test, cookie, force);
return rc;
}
/* parse up the build operators */
- printf("building these platforms: %s\n", buildplatforms);
+ printf("Building target platforms: %s\n", targets);
- t = buildplatforms;
- while((platform = strtok(t, ",")) != NULL) {
+ t = targets;
+ while((target = strtok(t, ",")) != NULL) {
t = NULL;
- printf("building %s\n", platform);
+ printf("Building for target %s\n", target);
- rpmSetVar(RPMVAR_BUILDPLATFORM,platform);
- rpmReadConfigFiles(rcfile, arch, os, 1, platform);
- rc = buildplatform(arg, buildAmount, passPhrase, buildRoot,
+ rpmReadConfigFiles(rcfile, target);
+ rc = buildForTarget(arg, buildAmount, passPhrase, buildRoot,
fromTarball, test, cookie, force);
if (rc)
return rc;
@@ -193,8 +191,14 @@ int build(char *arg, int buildAmount, char *passPhrase,
#define POPT_RMSOURCE 1002
#define POPT_RMBUILD 1003
#define POPT_BUILDROOT 1004
+#define POPT_BUILDARCH 1005
+#define POPT_BUILDOS 1006
+#define POPT_TARGETPLATFORM 1007
+#define POPT_NOBUILD 1008
+#define POPT_SHORTCIRCUIT 1009
extern int noLang;
+static int noBuild = 0;
static int useCatalog = 0;
static void buildArgCallback(poptContext con, enum poptCallbackReason reason,
@@ -203,7 +207,9 @@ static void buildArgCallback(poptContext con, enum poptCallbackReason reason,
{
switch (opt->val) {
case POPT_USECATALOG: data->useCatalog = 1; break;
+ case POPT_NOBUILD: data->noBuild = 1; break;
case POPT_NOLANG: data->noLang = 1; break;
+ case POPT_SHORTCIRCUIT: data->shortCircuit = 1; break;
case POPT_RMSOURCE: data->buildAmount |= RPMBUILD_RMSOURCE; break;
case POPT_RMBUILD: data->buildAmount |= RPMBUILD_RMBUILD; break;
case POPT_BUILDROOT:
@@ -213,22 +219,50 @@ static void buildArgCallback(poptContext con, enum poptCallbackReason reason,
}
data->buildRootOverride = strdup(arg);
break;
+ case POPT_BUILDARCH:
+ fprintf(stderr, _("--buildarch has been obsoleted. Use the --target option instead.\n"));
+ exit(EXIT_FAILURE);
+ break;
+ case POPT_BUILDOS:
+ fprintf(stderr, _("--buildos has been obsoleted. Use the --target option instead.\n"));
+ exit(EXIT_FAILURE);
+ break;
+ case POPT_TARGETPLATFORM:
+ if (data->targets) {
+ int len = strlen(data->targets) + strlen(arg) + 2;
+ data->targets = realloc(data->targets, len);
+ strcat(data->targets, ",");
+ } else {
+ data->targets = malloc(strlen(arg) + 1);
+ data->targets[0] = '\0';
+ }
+ strcat(data->targets, arg);
+ break;
}
}
struct poptOption rpmBuildPoptTable[] = {
{ NULL, '\0', POPT_ARG_CALLBACK | POPT_CBFLAG_INC_DATA,
buildArgCallback, 0, NULL, NULL },
+ { "buildarch", '\0', POPT_ARG_STRING, 0, POPT_BUILDARCH,
+ N_("override build architecture"), "ARCH" },
+ { "buildos", '\0', POPT_ARG_STRING, 0, POPT_BUILDOS,
+ N_("override build operating system"), "OS" },
{ "buildroot", '\0', POPT_ARG_STRING, 0, POPT_BUILDROOT,
N_("override build root"), "DIRECTORY" },
{ "clean", '\0', 0, 0, POPT_RMBUILD,
N_("remove build tree when done"), NULL},
+ { "nobuild", '\0', 0, &noBuild, POPT_NOBUILD,
+ N_("do not execute any stages of the build"), NULL },
{ "nolang", '\0', 0, &noLang, POPT_NOLANG,
N_("do not accept I18N msgstr's from specfile"), NULL},
{ "rmsource", '\0', 0, 0, POPT_RMSOURCE,
N_("remove sources and specfile when done"), NULL},
+ { "short-circuit", '\0', 0, 0, POPT_SHORTCIRCUIT,
+ N_("skip straight to specified stage (only for c,i)"), NULL },
+ { "target", '\0', POPT_ARG_STRING, 0, POPT_TARGETPLATFORM,
+ N_("override target platform"), "CPU-VENDOR-OS" },
{ "usecatalog", '\0', 0, &useCatalog, POPT_USECATALOG,
N_("lookup I18N strings in specfile catalog"), NULL},
{ 0, 0, 0, 0, 0, NULL, NULL }
};
-
diff --git a/build.h b/build.h
index 6106e0080..e9d31298b 100644
--- a/build.h
+++ b/build.h
@@ -10,14 +10,17 @@ extern struct poptOption rpmBuildPoptTable[];
struct rpmBuildArguments {
int buildAmount;
char *buildRootOverride;
+ char *targets;
int useCatalog;
int noLang;
+ int noBuild;
+ int shortCircuit;
+ char buildChar;
};
int build(char *arg, int buildAmount, char *passPhrase,
char *buildRoot, int fromTarball, int test, char *cookie,
- char * rcfile, char * arch, char * os,
- char * buildplatforms, int force);
+ char * rcfile, char * buildplatforms, int force);
#ifdef __cplusplus
}
diff --git a/convertdb.c b/convertdb.c
index 3f84e508b..254547429 100644
--- a/convertdb.c
+++ b/convertdb.c
@@ -201,7 +201,7 @@ int main(int argc, char ** argv) {
exit(EXIT_FAILURE);
}
- rpmReadConfigFiles(NULL, NULL, NULL, 0, NULL);
+ rpmReadConfigFiles(NULL, NULL);
printf(_("rpmconvert 1.0 - converting database in /var/lib/rpm\n"));
convertDB();
diff --git a/lib/macro.c b/lib/macro.c
index e6d514a06..5ea3c19b3 100644
--- a/lib/macro.c
+++ b/lib/macro.c
@@ -88,7 +88,7 @@ sortMacroTable(MacroContext *mc)
compareMacroName);
}
-static void
+void
dumpMacroTable(MacroContext *mc)
{
int i;
diff --git a/lib/rpmlib.h b/lib/rpmlib.h
index f43a701b6..c2166c20d 100644
--- a/lib/rpmlib.h
+++ b/lib/rpmlib.h
@@ -242,11 +242,11 @@ extern const struct headerSprintfExtension rpmHeaderFormats[];
#define RPMVAR_BZIP2BIN 41
#define RPMVAR_LANGPATT 42
#define RPMVAR_INCLUDE 43
-#define RPMVAR_ARCH 44
-#define RPMVAR_OS 45
-#define RPMVAR_BUILDPLATFORM 46
-#define RPMVAR_BUILDARCH 47
-#define RPMVAR_BUILDOS 48
+/* #define RPMVAR_ARCH 44 -- No longer used */
+/* #define RPMVAR_OS 45 -- No longer used */
+/* #define RPMVAR_BUILDPLATFORM 46 -- No longer used */
+/* #define RPMVAR_BUILDARCH 47 -- No longer used */
+/* #define RPMVAR_BUILDOS 48 -- No longer used */
#define RPMVAR_MACROFILES 49
#define RPMVAR_NUM 50 /* number of RPMVAR entries */
@@ -263,11 +263,8 @@ void rpmSetVar(int var, char *val);
#define RPM_MACHTABLE_BUILDOS 3
#define RPM_MACHTABLE_COUNT 4 /* number of arch/os tables */
-/* rpmReadConfigFiles() is for backwards compatibility only! It won't
- work if building is true! */
-int rpmReadConfigFiles(char * file, char * arch, char * os, int building,
- char * buildplatform);
-int rpmReadRC(char * file);
+int rpmReadConfigFiles(const char * file, const char * target);
+int rpmReadRC(const char * file);
void rpmGetArchInfo(/*@out@*/char ** name, /*@out@*/int * num);
void rpmGetOsInfo(/*@out@*/char ** name, /*@out@*/int * num);
int rpmMachineScore(int type, char * name);
diff --git a/lib/rpmmacro.h b/lib/rpmmacro.h
index 9642e556f..ba01ed6d5 100644
--- a/lib/rpmmacro.h
+++ b/lib/rpmmacro.h
@@ -46,6 +46,8 @@ extern "C" {
int isCompressed(char *file, int *compressed);
+void dumpMacroTable __P((MacroContext *mc));
+
void initMacros __P((MacroContext *mc, const char *macrofile));
void freeMacros __P((MacroContext *mc));
diff --git a/lib/rpmrc.c b/lib/rpmrc.c
index 644f38472..97de51c0d 100644
--- a/lib/rpmrc.c
+++ b/lib/rpmrc.c
@@ -11,9 +11,9 @@
#include "misc.h"
-static char *usrlibrpmrc = LIBRPMRC_FILENAME;
-static char *etcrpmrc = "/etc/rpmrc";
-static char *macrofiles = MACROFILES;
+static const char *usrlibrpmrc = LIBRPMRC_FILENAME;
+static const char *etcrpmrc = "/etc/rpmrc";
+static const char *macrofiles = MACROFILES;
struct MacroContext globalMacroContext;
@@ -90,11 +90,7 @@ static struct tableType tables[RPM_MACHTABLE_COUNT] = {
/* The order of the flags is archSpecific, required, macroize, localize */
static struct rpmOption optionTable[] = {
- { "arch", RPMVAR_ARCH, 0, 1, 1, 2 },
{ "builddir", RPMVAR_BUILDDIR, 0, 0, 1, 2 },
- { "buildarch", RPMVAR_BUILDARCH, 0, 1, 1, 0 },
- { "buildos", RPMVAR_BUILDOS, 0, 1, 1, 0 },
- { "buildplatform", RPMVAR_BUILDPLATFORM, 0, 1, 1, 2 },
{ "buildroot", RPMVAR_BUILDROOT, 0, 0, 1, 0 },
{ "buildshell", RPMVAR_BUILDSHELL, 0, 0, 1, 0 },
{ "bzip2bin", RPMVAR_BZIP2BIN, 0, 1, 1, 2 },
@@ -113,7 +109,6 @@ static struct rpmOption optionTable[] = {
{ "messagelevel", RPMVAR_MESSAGELEVEL, 0, 0, 1, 0 },
{ "netsharedpath", RPMVAR_NETSHAREDPATH, 0, 0, 1, 0 },
{ "optflags", RPMVAR_OPTFLAGS, 1, 0, 1, 0 },
- { "os", RPMVAR_OS, 0, 1, 1, 2 },
{ "packager", RPMVAR_PACKAGER, 0, 0, 1, 0 },
{ "pgp_name", RPMVAR_PGP_NAME, 0, 0, 1, 0 },
{ "pgp_path", RPMVAR_PGP_PATH, 0, 0, 1, 0 },
@@ -121,8 +116,6 @@ static struct rpmOption optionTable[] = {
{ "require_distribution", RPMVAR_REQUIREDISTRIBUTION, 0, 0, 1, 0 },
{ "require_icon", RPMVAR_REQUIREICON, 0, 0, 1, 0 },
{ "require_vendor", RPMVAR_REQUIREVENDOR, 0, 0, 1, 0 },
-/* root is obsolete - use buildroot instead */
-/* { "root", RPMVAR_ROOT, 0, 0, 1, 0 }, */
{ "rpmdir", RPMVAR_RPMDIR, 0, 0, 1, 1 },
{ "rpmfilename", RPMVAR_RPMFILENAME, 0, 1, 1, 2 },
#if defined(RPMVAR_SETENV)
@@ -149,12 +142,12 @@ static struct rpmvarValue values[RPMVAR_NUM];
/* prototypes */
static void defaultMachine(char ** arch, char ** os);
-static int doReadRC(FD_t fd, char * filename);
+static int doReadRC(FD_t fd, const char * filename);
static int optionCompare(const void * a, const void * b);
static int addCanon(struct canonEntry **table, int *tableLen, char *line,
- char *fn, int lineNum);
+ const char *fn, int lineNum);
static int addDefault(struct defaultEntry **table, int *tableLen, char *line,
- char *fn, int lineNum);
+ const char *fn, int lineNum);
static void freeRpmVar(struct rpmvarValue * orig);
static void rpmSetVarArch(int var, char * val, char * arch);
static struct canonEntry *lookupInCanonTable(char *name,
@@ -168,7 +161,7 @@ static void setPathDefault(int var, char * macroname, char * subdir);
static void rebuildCompatTables(int type, char * name);
/* compatiblity tables */
-static int machCompatCacheAdd(char * name, char * fn, int linenum,
+static int machCompatCacheAdd(char * name, const char * fn, int linenum,
struct machCache * cache);
static struct machCacheEntry * machCacheFindEntry(struct machCache * cache,
char * key);
@@ -189,12 +182,12 @@ static int optionCompare(const void * a, const void * b) {
((struct rpmOption *) b)->name);
}
-static void rpmRebuildPlatformVars(char ** buildplatform, char **canonarch,
- char **canonos);
+static void rpmRebuildTargetVars(const char ** canontarget);
static struct machCacheEntry * machCacheFindEntry(struct machCache * cache,
- char * key) {
+ char * key)
+{
int i;
for (i = 0; i < cache->size; i++)
@@ -203,8 +196,9 @@ static struct machCacheEntry * machCacheFindEntry(struct machCache * cache,
return NULL;
}
-static int machCompatCacheAdd(char * name, char * fn, int linenum,
- struct machCache * cache) {
+static int machCompatCacheAdd(char * name, const char * fn, int linenum,
+ struct machCache * cache)
+{
char * chptr, * equivs;
int delEntry = 0;
int i;
@@ -252,27 +246,26 @@ static int machCompatCacheAdd(char * name, char * fn, int linenum,
if (delEntry) return 0;
- chptr = strtok(equivs, " ");
- while (chptr) {
- if (strlen(chptr)) { /* does strtok() return "" ever?? */
- if (entry->count)
- entry->equivs = realloc(entry->equivs, sizeof(*entry->equivs)
+ while ((chptr = strtok(equivs, " ")) != NULL) {
+ equivs = NULL;
+ if (chptr[0] == '\0') /* does strtok() return "" ever?? */
+ continue;
+ if (entry->count)
+ entry->equivs = realloc(entry->equivs, sizeof(*entry->equivs)
* (entry->count + 1));
- else
- entry->equivs = malloc(sizeof(*entry->equivs));
-
- entry->equivs[entry->count] = strdup(chptr);
- entry->count++;
- }
+ else
+ entry->equivs = malloc(sizeof(*entry->equivs));
- chptr = strtok(NULL, " ");
+ entry->equivs[entry->count] = strdup(chptr);
+ entry->count++;
}
return 0;
}
static struct machEquivInfo * machEquivSearch(
- struct machEquivTable * table, char * name) {
+ struct machEquivTable * table, char * name)
+{
int i;
/*
@@ -291,7 +284,8 @@ static struct machEquivInfo * machEquivSearch(
}
static void machAddEquiv(struct machEquivTable * table, char * name,
- int distance) {
+ int distance)
+{
struct machEquivInfo * equiv;
equiv = machEquivSearch(table, name);
@@ -310,7 +304,8 @@ static void machAddEquiv(struct machEquivTable * table, char * name,
static void machCacheEntryVisit(struct machCache * cache,
struct machEquivTable * table,
char * name,
- int distance) {
+ int distance)
+{
struct machCacheEntry * entry;
int i;
@@ -330,7 +325,8 @@ static void machCacheEntryVisit(struct machCache * cache,
static void machFindEquivs(struct machCache * cache,
struct machEquivTable * table,
- char * key) {
+ char * key)
+{
int i;
for (i = 0; i < cache->size; i++)
@@ -346,7 +342,8 @@ static void machFindEquivs(struct machCache * cache,
}
static int addCanon(struct canonEntry **table, int *tableLen, char *line,
- char *fn, int lineNum) {
+ const char *fn, int lineNum)
+{
struct canonEntry *t;
char *s, *s1;
@@ -392,7 +389,8 @@ static int addCanon(struct canonEntry **table, int *tableLen, char *line,
}
static int addDefault(struct defaultEntry **table, int *tableLen, char *line,
- char *fn, int lineNum) {
+ const char *fn, int lineNum)
+{
struct defaultEntry *t;
if (! *tableLen) {
@@ -448,42 +446,24 @@ static char *lookupInDefaultTable(char *name, struct defaultEntry *table,
return name;
}
-int rpmReadConfigFiles(char * file, char * arch, char * os, int building,
- char * buildplatform)
+int rpmReadConfigFiles(const char * file, const char * target)
{
- char * canonarch, * canonos;
+ rpmSetMachine(NULL, NULL);
- rpmSetMachine(arch, os);
- if (!buildplatform)
- rpmRebuildPlatformVars(&buildplatform, &canonarch, &canonos);
- else
- addMacro(&globalMacroContext, "_buildplatform_preset", NULL,
- buildplatform, RMIL_RPMRC);
-
-/*
- addMacro(&globalMacroContext, "buildplatform", NULL, buildplatform,
- RMIL_RPMRC);
-*/
+ if (target == NULL) {
+ rpmRebuildTargetVars(&target);
+ } else {
+ addMacro(&globalMacroContext, "_target", NULL, target, RMIL_RPMRC);
+ }
if (rpmReadRC(file)) return -1;
- rpmRebuildPlatformVars(&buildplatform, &canonarch, &canonos);
-
- /* This is where we finally set the arch and os absolutely */
+ rpmRebuildTargetVars(&target);
-/* rpmSetMachine(canonarch, canonos); */
-
-
- { char *buildarch;
- char *buildos;
-
- /* XXX getMacroBody() may be nuked -- (see below) */
- /* XXX the macro names buildarch/buildos don't exist */
- buildarch = (char *) getMacroBody(&globalMacroContext, "buildarch");
- buildos = (char *) getMacroBody(&globalMacroContext, "buildos");
-
- rpmSetMachine(buildarch, buildos);
+ { const char *cpu = getMacroBody(&globalMacroContext, "_target_cpu");
+ const char *os = getMacroBody(&globalMacroContext, "_target_os");
+ rpmSetMachine(cpu, os);
}
return 0;
@@ -528,9 +508,9 @@ static void setDefaults(void) {
rpmSetVar(RPMVAR_BUILDSHELL, "/bin/sh");
}
-int rpmReadRC(char * file) {
+int rpmReadRC(const char * file) {
FD_t fd;
- char * fn;
+ const char * fn;
char * home;
int rc = 0;
static int first = 1;
@@ -551,26 +531,22 @@ int rpmReadRC(char * file) {
return 1;
}
- if (file)
- fn = file;
- else
- fn = etcrpmrc;
-
+ fn = (file != NULL ? file : etcrpmrc);
fd = fdOpen(fn, O_RDONLY, 0);
if (fdFileno(fd) >= 0) {
rc = doReadRC(fd, fn);
fdClose(fd);
if (rc) return rc;
- } else if (file) {
+ } else if (file != NULL) {
rpmError(RPMERR_RPMRC, _("Unable to open %s for reading: %s."), file,
strerror(errno));
return 1;
}
- if (!file) {
+ if (file == NULL) {
home = getenv("HOME");
- if (home) {
- fn = alloca(strlen(home) + 8);
+ if (home != NULL) {
+ char *fn = alloca(strlen(home) + 8);
strcpy(fn, home);
strcat(fn, "/.rpmrc");
fd = fdOpen(fn, O_RDONLY, 0);
@@ -596,7 +572,7 @@ int rpmReadRC(char * file) {
return 0;
}
-static int doReadRC(FD_t fd, char * filename) {
+static int doReadRC(FD_t fd, const char * filename) {
char buf[BUFSIZ];
char * start, * chptr, * next, * rest;
int linenum = 0;
@@ -713,7 +689,7 @@ static int doReadRC(FD_t fd, char * filename) {
case RPMVAR_INCLUDE:
{ FD_t fdinc;
- rpmRebuildPlatformVars(NULL,NULL,NULL);
+ rpmRebuildTargetVars(NULL);
strcpy(buf, start);
if (expandMacros(NULL, &globalMacroContext, buf, sizeof(buf))) {
@@ -891,11 +867,10 @@ static void defaultMachine(char ** arch, char ** os) {
/* wrong, just for now, find out how to look for i586 later*/
strcpy(un.machine,"i486");
}
-#endif
+#endif /* __linux__ */
/* get rid of the hyphens in the sysname */
- chptr = un.machine;
- while (*chptr++)
+ for (chptr = un.machine; *chptr; chptr++)
if (*chptr == '/') *chptr = '-';
# if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL)
@@ -946,7 +921,7 @@ static void defaultMachine(char ** arch, char ** os) {
strcpy(un.machine, "hppa2.0");
# endif
}
-# endif
+# endif /* hpux */
/* the uname() result goes through the arch_canon table */
canon = lookupInCanonTable(un.machine,
@@ -960,6 +935,7 @@ static void defaultMachine(char ** arch, char ** os) {
tables[RPM_MACHTABLE_INSTOS].canonsLength);
if (canon)
strcpy(un.sysname, canon->short_name);
+ gotDefaults = 1;
}
if (arch) *arch = un.machine;
@@ -1105,30 +1081,30 @@ void rpmGetMachine(char **arch, char **os)
}
void rpmSetMachine(char * arch, char * os) {
- int transOs = os == NULL;
- int transArch = arch == NULL;
- char * realArch, * realOs;
-
- defaultMachine(&realArch, &realOs);
+ char * host_cpu, * host_os;
- if (!arch)
- arch = realArch;
- if (!os)
- os = realOs;
+ defaultMachine(&host_cpu, &host_os);
- if (transArch && tables[currTables[ARCH]].hasTranslate)
- arch = lookupInDefaultTable(arch,
+ if (arch == NULL) {
+ arch = host_cpu;
+ if (tables[currTables[ARCH]].hasTranslate)
+ arch = lookupInDefaultTable(arch,
tables[currTables[ARCH]].defaults,
tables[currTables[ARCH]].defaultsLength);
- if (transOs && tables[currTables[OS]].hasTranslate)
- os = lookupInDefaultTable(os,
+ }
+
+ if (os == NULL) {
+ os = host_os;
+ if (tables[currTables[OS]].hasTranslate)
+ os = lookupInDefaultTable(os,
tables[currTables[OS]].defaults,
tables[currTables[OS]].defaultsLength);
+ }
if (!current[ARCH] || strcmp(arch, current[ARCH])) {
if (current[ARCH]) free(current[ARCH]);
current[ARCH] = strdup(arch);
- rebuildCompatTables(ARCH, realArch);
+ rebuildCompatTables(ARCH, host_cpu);
}
if (!current[OS] || strcmp(os, current[OS])) {
@@ -1144,7 +1120,7 @@ void rpmSetMachine(char * arch, char * os) {
*/
if (!strcmp(current[OS], "linux"))
*current[OS]= 'L';
- rebuildCompatTables(OS, realOs);
+ rebuildCompatTables(OS, host_os);
}
}
@@ -1187,17 +1163,12 @@ void rpmGetOsInfo(char ** name, int * num) {
getMachineInfo(OS, name, num);
}
-void rpmRebuildPlatformVars(char ** buildplatform, char **canonarch,
- char **canonos) {
-
-/* If buildplatform == NULL, don't return anything */
-
+void rpmRebuildTargetVars(const char ** canontarget)
+{
- char * b = NULL, * ca = NULL, * co = NULL;
- char * presetbuildplatform = NULL;
+ char * ct = NULL, * ca = NULL, * co = NULL;
+ const char * target = NULL;
int x;
-/*
-*/
/*
* XXX getMacroBody() may be nuked -- I originally added it for tdyas and it's
@@ -1206,34 +1177,38 @@ void rpmRebuildPlatformVars(char ** buildplatform, char **canonarch,
*
* You can, however, always do
* char buf[BUFSIZ];
- * strcpy(buf, "%_buildplatform_preset")
- * expandMacros(NULL, &globalMacroContext, buf, sizeof(buf))) {
- * presetbuildplatform = strdup(buf);
+ * strcpy(buf, "%_target")
+ * expandMacros(NULL, &globalMacroContext, buf, sizeof(buf)))
+ * target = strdup(buf);
*
*/
- presetbuildplatform= (char *) getMacroBody(&globalMacroContext,
- "_buildplatform_preset");
+ if ((target = getMacroBody(&globalMacroContext, "_target")) != NULL)
+ target = strdup(target);
/* Rebuild the compat table to recalculate the
- current buildarch. */
+ current target arch. */
- rpmSetMachine(NULL, NULL);
- rpmSetTables(RPM_MACHTABLE_INSTARCH, RPM_MACHTABLE_INSTOS);
- rpmSetTables(RPM_MACHTABLE_BUILDARCH, RPM_MACHTABLE_BUILDOS);
+ rpmSetMachine(NULL, NULL);
+ rpmSetTables(RPM_MACHTABLE_INSTARCH, RPM_MACHTABLE_INSTOS);
+ rpmSetTables(RPM_MACHTABLE_BUILDARCH, RPM_MACHTABLE_BUILDOS);
- rpmGetArchInfo(&ca,NULL);
- rpmGetOsInfo(&co,NULL);
+ rpmGetArchInfo(&ca,NULL);
+ rpmGetOsInfo(&co,NULL);
- if (!ca) defaultMachine(&ca,NULL);
- if (!co) defaultMachine(NULL,&co);
+ if (ca == NULL) defaultMachine(&ca, NULL);
+ if (co == NULL) defaultMachine(NULL, &co);
- for (x = 0; ca[x]; x++)
- ca[x] = tolower(ca[x]);
- for (x = 0; co[x]; x++)
- co[x] = tolower(co[x]);
+ for (x = 0; ca[x]; x++)
+ ca[x] = tolower(ca[x]);
+ for (x = 0; co[x]; x++)
+ co[x] = tolower(co[x]);
- b = malloc(strlen(co)+strlen(ca)+2);
- sprintf(b,"%s-%s",ca,co);
+ if (target) {
+ ct = target;
+ } else {
+ ct = malloc(strlen(co)+strlen(ca)+2);
+ sprintf(ct, "%s-%s", ca, co);
+ }
/*
* XXX All this macro pokery/jiggery could be achieved (I think)
@@ -1241,41 +1216,23 @@ void rpmRebuildPlatformVars(char ** buildplatform, char **canonarch,
* initMacros(&globalMacroContext, PER-PLATFORM-MACRO-FILE-NAMES);
* (I haven't looked at the code :-)
*
- * In fact, if you want to get really sophisticatedf, you could encapsulate
+ * In fact, if you want to get really sophisticated, you could encapsulate
* within per-platform MacroContexts (but I'm not quite ready for that yet).
*/
- delMacro(&globalMacroContext, "buildplatform");
-
- if (!presetbuildplatform) {
- addMacro(&globalMacroContext, "buildplatform", NULL, b,
- RMIL_RPMRC);
- } else {
- addMacro(&globalMacroContext, "buildplatform", NULL,
- presetbuildplatform, RMIL_RPMRC);
- }
- delMacro(&globalMacroContext, "arch");
- addMacro(&globalMacroContext, "arch", NULL, ca,
- RMIL_RPMRC);
- delMacro(&globalMacroContext, "os");
- addMacro(&globalMacroContext, "os", NULL, co,
- RMIL_RPMRC);
-
- if (buildplatform) {
- if (presetbuildplatform)
- *buildplatform = presetbuildplatform;
- else
- *buildplatform = b;
- }
- if (canonarch) *canonarch = ca;
- if (canonos) *canonos = co;
-
+ delMacro(&globalMacroContext, "_target");
+ addMacro(&globalMacroContext, "_target", NULL, ct, RMIL_RPMRC);
+ delMacro(&globalMacroContext, "_target_cpu");
+ addMacro(&globalMacroContext, "_target_cpu", NULL, ca, RMIL_RPMRC);
+ delMacro(&globalMacroContext, "_target_os");
+ addMacro(&globalMacroContext, "_target_os", NULL, co, RMIL_RPMRC);
+
+ if (canontarget)
+ *canontarget = ct;
}
int rpmShowRC(FILE *f)
{
struct rpmOption *opt;
- int count = 0;
- char *s;
int i;
struct machEquivTable * equivTable;
@@ -1316,14 +1273,13 @@ int rpmShowRC(FILE *f)
fprintf(f, "\n");
fprintf(f, "\nRPMRC VALUES:\n");
- opt = optionTable;
- while (count < optionTableSize) {
- s = rpmGetVar(opt->var);
+ for (i = 0, opt = optionTable; i < optionTableSize; i++, opt++) {
+ char *s = rpmGetVar(opt->var);
if (s != NULL || rpmGetVerbosity() < RPMMESS_NORMAL)
fprintf(f, "%-21s : %s\n", opt->name, s ? s : "(not set)");
- opt++;
- count++;
}
+ dumpMacroTable(&globalMacroContext);
+
return 0;
}
diff --git a/macros.in b/macros.in
index 556dcf985..e6f49626c 100644
--- a/macros.in
+++ b/macros.in
@@ -61,8 +61,8 @@
RPM_SOURCE_DIR=\"%{_sourcedir}\"\
RPM_BUILD_DIR=\"%{_builddir}\"\
RPM_OPT_FLAGS=\"%{optflags}\"\
- RPM_ARCH=\"%{arch}\"\
- RPM_OS=\"%{os}\"\
+ RPM_ARCH=\"%{_target_cpu}\"\
+ RPM_OS=\"%{_target_os}\"\
export RPM_SOURCE_DIR RPM_BUILD_DIR RPM_OPT_FLAGS RPM_ARCH RPM_OS\
RPM_DOC_DIR=\"%{_docdir}\"\
export RPM_DOC_DIR\
@@ -78,6 +78,7 @@
# ---- configure macros.
# Macro(s) similar to those used by configure.
#
+%_prefix @prefix@
%_build @build@
%_build_alias @build_alias@
%_build_cpu @build_cpu@
@@ -88,4 +89,8 @@
%_host_cpu @host_cpu@
%_host_vendor @host_vendor@
%_host_os @host_os@
-%_prefix @prefix@
+%_target @target@
+%_target_alias @target_alias@
+%_target_cpu @target_cpu@
+%_target_vendor @target_vendor@
+%_target_os @target_os@
diff --git a/po/rpm.pot b/po/rpm.pot
index effdcfc6b..a05ab2f33 100644
--- a/po/rpm.pot
+++ b/po/rpm.pot
@@ -2,12 +2,12 @@
# Copyright (C) YEAR Free Software Foundation, Inc.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
-#: ../rpm.c:189 ../rpm.c:268
+#: ../rpm.c:167 ../rpm.c:246
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
-"POT-Creation-Date: 1998-12-01 12:09-0500\n"
+"POT-Creation-Date: 1998-12-01 18:23-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"
@@ -46,27 +46,55 @@ msgstr ""
msgid "File contains non-printable characters(%c): %s\n"
msgstr ""
-#: ../build.c:211
+#: ../build.c:217
msgid "buildroot already specified"
msgstr ""
#: ../build.c:223
+msgid "--buildarch has been obsoleted. Use the --target option instead.\n"
+msgstr ""
+
+#: ../build.c:227
+msgid "--buildos has been obsoleted. Use the --target option instead.\n"
+msgstr ""
+
+#: ../build.c:248
+msgid "override build architecture"
+msgstr ""
+
+#: ../build.c:250
+msgid "override build operating system"
+msgstr ""
+
+#: ../build.c:252
msgid "override build root"
msgstr ""
-#: ../build.c:225 ../rpm.c:451
+#: ../build.c:254 ../rpm.c:429
msgid "remove build tree when done"
msgstr ""
-#: ../build.c:227
+#: ../build.c:256
+msgid "do not execute any stages of the build"
+msgstr ""
+
+#: ../build.c:258
msgid "do not accept I18N msgstr's from specfile"
msgstr ""
-#: ../build.c:229
+#: ../build.c:260
msgid "remove sources and specfile when done"
msgstr ""
-#: ../build.c:231
+#: ../build.c:262 ../rpm.c:427
+msgid "skip straight to specified stage (only for c,i)"
+msgstr ""
+
+#: ../build.c:264
+msgid "override target platform"
+msgstr ""
+
+#: ../build.c:266
msgid "lookup I18N strings in specfile catalog"
msgstr ""
@@ -319,985 +347,982 @@ msgstr ""
msgid " conflicts with %s-%s-%s\n"
msgstr ""
-#: ../rpm.c:166
+#: ../rpm.c:144
#, c-format
msgid "rpm: %s\n"
msgstr ""
-#: ../rpm.c:177
+#: ../rpm.c:155
#, c-format
msgid "RPM version %s\n"
msgstr ""
-#: ../rpm.c:181
+#: ../rpm.c:159
msgid "Copyright (C) 1998 - Red Hat Software"
msgstr ""
-#: ../rpm.c:182
+#: ../rpm.c:160
msgid ""
"This may be freely redistributed under the terms of the GNU Public License"
msgstr ""
-#: ../rpm.c:191
+#: ../rpm.c:169
msgid "usage: rpm {--help}"
msgstr ""
-#: ../rpm.c:192
+#: ../rpm.c:170
msgid " rpm {--version}"
msgstr ""
-#: ../rpm.c:193
+#: ../rpm.c:171
msgid " rpm {--initdb} [--dbpath <dir>]"
msgstr ""
-#: ../rpm.c:194
+#: ../rpm.c:172
msgid ""
" rpm {--install -i} [-v] [--hash -h] [--percent] [--force] [--test]"
msgstr ""
-#: ../rpm.c:195
+#: ../rpm.c:173
msgid " [--replacepkgs] [--replacefiles] [--root <dir>]"
msgstr ""
-#: ../rpm.c:196
+#: ../rpm.c:174
msgid " [--excludedocs] [--includedocs] [--noscripts]"
msgstr ""
-#: ../rpm.c:197
+#: ../rpm.c:175
msgid ""
" [--rcfile <file>] [--ignorearch] [--dbpath <dir>]"
msgstr ""
-#: ../rpm.c:198
+#: ../rpm.c:176
msgid ""
" [--prefix <dir>] [--ignoreos] [--nodeps] [--allfiles]"
msgstr ""
-#: ../rpm.c:199
+#: ../rpm.c:177
msgid ""
" [--ftpproxy <host>] [--ftpport <port>] [--justdb]"
msgstr ""
-#: ../rpm.c:200 ../rpm.c:208
+#: ../rpm.c:178 ../rpm.c:186
msgid " [--noorder] [--relocate oldpath=newpath]"
msgstr ""
-#: ../rpm.c:201
+#: ../rpm.c:179
msgid ""
" [--badreloc] [--notriggers] file1.rpm ... fileN.rpm"
msgstr ""
-#: ../rpm.c:202
+#: ../rpm.c:180
msgid ""
" rpm {--upgrade -U} [-v] [--hash -h] [--percent] [--force] [--test]"
msgstr ""
-#: ../rpm.c:203
+#: ../rpm.c:181
msgid " [--oldpackage] [--root <dir>] [--noscripts]"
msgstr ""
-#: ../rpm.c:204
+#: ../rpm.c:182
msgid ""
" [--excludedocs] [--includedocs] [--rcfile <file>]"
msgstr ""
-#: ../rpm.c:205
+#: ../rpm.c:183
msgid ""
" [--ignorearch] [--dbpath <dir>] [--prefix <dir>] "
msgstr ""
-#: ../rpm.c:206
+#: ../rpm.c:184
msgid " [--ftpproxy <host>] [--ftpport <port>]"
msgstr ""
-#: ../rpm.c:207
+#: ../rpm.c:185
msgid " [--ignoreos] [--nodeps] [--allfiles] [--justdb]"
msgstr ""
-#: ../rpm.c:209
+#: ../rpm.c:187
msgid " [--badreloc] file1.rpm ... fileN.rpm"
msgstr ""
-#: ../rpm.c:210
+#: ../rpm.c:188
msgid " rpm {--query -q} [-afpg] [-i] [-l] [-s] [-d] [-c] [-v] [-R]"
msgstr ""
-#: ../rpm.c:211
+#: ../rpm.c:189
msgid " [--scripts] [--root <dir>] [--rcfile <file>]"
msgstr ""
-#: ../rpm.c:212
+#: ../rpm.c:190
msgid " [--whatprovides] [--whatrequires] [--requires]"
msgstr ""
-#: ../rpm.c:213
+#: ../rpm.c:191
msgid ""
" [--triggeredby] [--ftpuseport] [--ftpproxy <host>]"
msgstr ""
-#: ../rpm.c:214
+#: ../rpm.c:192
msgid ""
" [--ftpport <port>] [--provides] [--triggers] [--dump]"
msgstr ""
-#: ../rpm.c:215
+#: ../rpm.c:193
msgid " [--changelog] [--dbpath <dir>] [targets]"
msgstr ""
-#: ../rpm.c:216
+#: ../rpm.c:194
msgid " rpm {--verify -V -y} [-afpg] [--root <dir>] [--rcfile <file>]"
msgstr ""
-#: ../rpm.c:217
+#: ../rpm.c:195
msgid ""
" [--dbpath <dir>] [--nodeps] [--nofiles] [--noscripts]"
msgstr ""
-#: ../rpm.c:218
+#: ../rpm.c:196
msgid " [--nomd5] [targets]"
msgstr ""
-#: ../rpm.c:219
+#: ../rpm.c:197
msgid " rpm {--setperms} [-afpg] [target]"
msgstr ""
-#: ../rpm.c:220
+#: ../rpm.c:198
msgid " rpm {--setugids} [-afpg] [target]"
msgstr ""
-#: ../rpm.c:221
+#: ../rpm.c:199
msgid " rpm {--erase -e} [--root <dir>] [--noscripts] [--rcfile <file>]"
msgstr ""
-#: ../rpm.c:222
+#: ../rpm.c:200
msgid " [--dbpath <dir>] [--nodeps] [--allmatches]"
msgstr ""
-#: ../rpm.c:223
+#: ../rpm.c:201
msgid ""
" [--justdb] [--notriggers] rpackage1 ... packageN"
msgstr ""
-#: ../rpm.c:224
+#: ../rpm.c:202
msgid ""
" rpm {-b|t}[plciba] [-v] [--short-circuit] [--clean] [--rcfile <file>]"
msgstr ""
-#: ../rpm.c:225
-msgid " [--sign] [--test] [--timecheck <s>] ]"
+#: ../rpm.c:203
+msgid " [--sign] [--nobuild] [--timecheck <s>] ]"
msgstr ""
-#: ../rpm.c:226
-msgid " [--buildplatform=platform1[,platform2...]]"
+#: ../rpm.c:204
+msgid " [--target=platform1[,platform2...]]"
msgstr ""
-#: ../rpm.c:227
+#: ../rpm.c:205
msgid " [--rmsource] specfile"
msgstr ""
-#: ../rpm.c:228
+#: ../rpm.c:206
msgid " rpm {--rmsource} [--rcfile <file>] [-v] specfile"
msgstr ""
-#: ../rpm.c:229
+#: ../rpm.c:207
msgid ""
" rpm {--rebuild} [--rcfile <file>] [-v] source1.rpm ... sourceN.rpm"
msgstr ""
-#: ../rpm.c:230
+#: ../rpm.c:208
msgid ""
" rpm {--recompile} [--rcfile <file>] [-v] source1.rpm ... sourceN.rpm"
msgstr ""
-#: ../rpm.c:231
+#: ../rpm.c:209
msgid " rpm {--resign} [--rcfile <file>] package1 package2 ... packageN"
msgstr ""
-#: ../rpm.c:232
+#: ../rpm.c:210
msgid " rpm {--addsign} [--rcfile <file>] package1 package2 ... packageN"
msgstr ""
-#: ../rpm.c:233
+#: ../rpm.c:211
msgid " rpm {--checksig -K} [--nopgp] [--nomd5] [--rcfile <file>]"
msgstr ""
-#: ../rpm.c:234
+#: ../rpm.c:212
msgid " package1 ... packageN"
msgstr ""
-#: ../rpm.c:235
+#: ../rpm.c:213
msgid " rpm {--rebuilddb} [--rcfile <file>] [--dbpath <dir>]"
msgstr ""
-#: ../rpm.c:236
+#: ../rpm.c:214
msgid " rpm {--querytags}"
msgstr ""
-#: ../rpm.c:270
+#: ../rpm.c:248
msgid "usage:"
msgstr ""
-#: ../rpm.c:272
+#: ../rpm.c:250
msgid "print this message"
msgstr ""
-#: ../rpm.c:274
+#: ../rpm.c:252
msgid "print the version of rpm being used"
msgstr ""
-#: ../rpm.c:275
+#: ../rpm.c:253
msgid " all modes support the following arguments:"
msgstr ""
-#: ../rpm.c:276
+#: ../rpm.c:254
msgid " --rcfile <file> "
msgstr ""
-#: ../rpm.c:277
+#: ../rpm.c:255
msgid "use <file> instead of /etc/rpmrc and $HOME/.rpmrc"
msgstr ""
-#: ../rpm.c:279
+#: ../rpm.c:257
msgid "be a little more verbose"
msgstr ""
-#: ../rpm.c:281
+#: ../rpm.c:259
msgid "be incredibly verbose (for debugging)"
msgstr ""
-#: ../rpm.c:283
+#: ../rpm.c:261
msgid "query mode"
msgstr ""
-#: ../rpm.c:284 ../rpm.c:342 ../rpm.c:402 ../rpm.c:430
+#: ../rpm.c:262 ../rpm.c:320 ../rpm.c:380 ../rpm.c:408
msgid " --root <dir> "
msgstr ""
-#: ../rpm.c:285 ../rpm.c:343 ../rpm.c:403 ../rpm.c:431 ../rpm.c:491
+#: ../rpm.c:263 ../rpm.c:321 ../rpm.c:381 ../rpm.c:409 ../rpm.c:469
msgid "use <dir> as the top level directory"
msgstr ""
-#: ../rpm.c:286 ../rpm.c:340 ../rpm.c:368 ../rpm.c:418 ../rpm.c:488
+#: ../rpm.c:264 ../rpm.c:318 ../rpm.c:346 ../rpm.c:396 ../rpm.c:466
msgid " --dbpath <dir> "
msgstr ""
-#: ../rpm.c:287 ../rpm.c:341 ../rpm.c:369 ../rpm.c:419 ../rpm.c:489
+#: ../rpm.c:265 ../rpm.c:319 ../rpm.c:347 ../rpm.c:397 ../rpm.c:467
msgid "use <dir> as the directory for the database"
msgstr ""
-#: ../rpm.c:288
+#: ../rpm.c:266
msgid " --queryformat <qfmt>"
msgstr ""
-#: ../rpm.c:289
+#: ../rpm.c:267
msgid "use <qfmt> as the header format (implies -i)"
msgstr ""
-#: ../rpm.c:290
+#: ../rpm.c:268
msgid ""
" install, upgrade and query (with -p) allow ftp URL's to be used in place"
msgstr ""
-#: ../rpm.c:291
+#: ../rpm.c:269
msgid " of file names as well as the following options:"
msgstr ""
-#: ../rpm.c:292
+#: ../rpm.c:270
msgid " --ftpproxy <host> "
msgstr ""
-#: ../rpm.c:293
+#: ../rpm.c:271
msgid "hostname or IP of ftp proxy"
msgstr ""
-#: ../rpm.c:294
+#: ../rpm.c:272
msgid " --ftpport <port> "
msgstr ""
-#: ../rpm.c:295
+#: ../rpm.c:273
msgid "port number of ftp server (or proxy)"
msgstr ""
-#: ../rpm.c:296
+#: ../rpm.c:274
msgid " Package specification options:"
msgstr ""
-#: ../rpm.c:298
+#: ../rpm.c:276
msgid "query all packages"
msgstr ""
-#: ../rpm.c:299
+#: ../rpm.c:277
msgid " -f <file>+ "
msgstr ""
-#: ../rpm.c:300
+#: ../rpm.c:278
msgid "query package owning <file>"
msgstr ""
-#: ../rpm.c:301
+#: ../rpm.c:279
msgid " -p <packagefile>+ "
msgstr ""
-#: ../rpm.c:302
+#: ../rpm.c:280
msgid "query (uninstalled) package <packagefile>"
msgstr ""
-#: ../rpm.c:303
+#: ../rpm.c:281
msgid " --triggeredby <pkg>"
msgstr ""
-#: ../rpm.c:304
+#: ../rpm.c:282
msgid "query packages triggered by <pkg>"
msgstr ""
-#: ../rpm.c:305
+#: ../rpm.c:283
msgid " --whatprovides <cap>"
msgstr ""
-#: ../rpm.c:306
+#: ../rpm.c:284
msgid "query packages which provide <cap> capability"
msgstr ""
-#: ../rpm.c:307
+#: ../rpm.c:285
msgid " --whatrequires <cap>"
msgstr ""
-#: ../rpm.c:308
+#: ../rpm.c:286
msgid "query packages which require <cap> capability"
msgstr ""
-#: ../rpm.c:309
+#: ../rpm.c:287
msgid " Information selection options:"
msgstr ""
-#: ../rpm.c:311
+#: ../rpm.c:289
msgid "display package information"
msgstr ""
-#: ../rpm.c:313
+#: ../rpm.c:291
msgid "display the package's change log"
msgstr ""
-#: ../rpm.c:315
+#: ../rpm.c:293
msgid "display package file list"
msgstr ""
-#: ../rpm.c:317
+#: ../rpm.c:295
msgid "show file states (implies -l)"
msgstr ""
-#: ../rpm.c:319
+#: ../rpm.c:297
msgid "list only documentation files (implies -l)"
msgstr ""
-#: ../rpm.c:321
+#: ../rpm.c:299
msgid "list only configuration files (implies -l)"
msgstr ""
-#: ../rpm.c:323
+#: ../rpm.c:301
msgid ""
"show all verifiable information for each file (must be used with -l, -c, or "
"-d)"
msgstr ""
-#: ../rpm.c:325
+#: ../rpm.c:303
msgid "list capabilities package provides"
msgstr ""
-#: ../rpm.c:326
+#: ../rpm.c:304
msgid " --requires"
msgstr ""
-#: ../rpm.c:328
+#: ../rpm.c:306
msgid "list package dependencies"
msgstr ""
-#: ../rpm.c:330
+#: ../rpm.c:308
msgid "print the various [un]install scripts"
msgstr ""
-#: ../rpm.c:332
+#: ../rpm.c:310
msgid "show the trigger scripts contained in the package"
msgstr ""
-#: ../rpm.c:336
+#: ../rpm.c:314
msgid " --pipe <cmd> "
msgstr ""
-#: ../rpm.c:337
+#: ../rpm.c:315
msgid "send stdout to <cmd>"
msgstr ""
-#: ../rpm.c:339
+#: ../rpm.c:317
msgid ""
"verify a package installation using the same same package specification "
"options as -q"
msgstr ""
-#: ../rpm.c:345 ../rpm.c:389 ../rpm.c:423
+#: ../rpm.c:323 ../rpm.c:367 ../rpm.c:401
msgid "do not verify package dependencies"
msgstr ""
-#: ../rpm.c:347
+#: ../rpm.c:325
msgid "do not verify file md5 checksums"
msgstr ""
-#: ../rpm.c:349
+#: ../rpm.c:327
msgid "do not verify file attributes"
msgstr ""
-#: ../rpm.c:352
+#: ../rpm.c:330
msgid ""
"set the file permissions to those in the package database using the same "
"package specification options as -q"
msgstr ""
-#: ../rpm.c:355
+#: ../rpm.c:333
msgid ""
"set the file owner and group to those in the package database using the same "
"package specification options as -q"
msgstr ""
-#: ../rpm.c:359
+#: ../rpm.c:337
msgid " --install <packagefile>"
msgstr ""
-#: ../rpm.c:360
+#: ../rpm.c:338
msgid " -i <packagefile> "
msgstr ""
-#: ../rpm.c:361
+#: ../rpm.c:339
msgid "install package"
msgstr ""
-#: ../rpm.c:362
+#: ../rpm.c:340
msgid " --relocate <oldpath>=<newpath>"
msgstr ""
-#: ../rpm.c:363
+#: ../rpm.c:341
msgid "relocate files from <oldpath> to <newpath>"
msgstr ""
-#: ../rpm.c:365
+#: ../rpm.c:343
msgid "relocate files even though the package doesn't allow it"
msgstr ""
-#: ../rpm.c:366
+#: ../rpm.c:344
msgid " --prefix <dir> "
msgstr ""
-#: ../rpm.c:367
+#: ../rpm.c:345
msgid "relocate the package to <dir>, if relocatable"
msgstr ""
-#: ../rpm.c:371
+#: ../rpm.c:349
msgid "do not install documentation"
msgstr ""
-#: ../rpm.c:373
+#: ../rpm.c:351
msgid "short hand for --replacepkgs --replacefiles"
msgstr ""
-#: ../rpm.c:376
+#: ../rpm.c:354
msgid "print hash marks as package installs (good with -v)"
msgstr ""
-#: ../rpm.c:378
+#: ../rpm.c:356
msgid "install all files, even configurations which might otherwise be skipped"
msgstr ""
-#: ../rpm.c:381
+#: ../rpm.c:359
msgid "don't verify package architecture"
msgstr ""
-#: ../rpm.c:383
+#: ../rpm.c:361
msgid "don't verify package operating system"
msgstr ""
-#: ../rpm.c:385
+#: ../rpm.c:363
msgid "install documentation"
msgstr ""
-#: ../rpm.c:387 ../rpm.c:421
+#: ../rpm.c:365 ../rpm.c:399
msgid "update the database, but do not modify the filesystem"
msgstr ""
-#: ../rpm.c:391 ../rpm.c:425
+#: ../rpm.c:369 ../rpm.c:403
msgid "do not reorder package installation to satisfy dependencies"
msgstr ""
-#: ../rpm.c:393
+#: ../rpm.c:371
msgid "don't execute any installation scripts"
msgstr ""
-#: ../rpm.c:395 ../rpm.c:429
+#: ../rpm.c:373 ../rpm.c:407
msgid "don't execute any scripts triggered by this package"
msgstr ""
-#: ../rpm.c:397
+#: ../rpm.c:375
msgid "print percentages as package installs"
msgstr ""
-#: ../rpm.c:399
+#: ../rpm.c:377
msgid "install even if the package replaces installed files"
msgstr ""
-#: ../rpm.c:401
+#: ../rpm.c:379
msgid "reinstall if the package is already present"
msgstr ""
-#: ../rpm.c:405
+#: ../rpm.c:383
msgid "don't install, but tell if it would work or not"
msgstr ""
-#: ../rpm.c:407
+#: ../rpm.c:385
msgid " --upgrade <packagefile>"
msgstr ""
-#: ../rpm.c:408
+#: ../rpm.c:386
msgid " -U <packagefile> "
msgstr ""
-#: ../rpm.c:409
+#: ../rpm.c:387
msgid "upgrade package (same options as --install, plus)"
msgstr ""
-#: ../rpm.c:411
+#: ../rpm.c:389
msgid ""
"upgrade to an old version of the package (--force on upgrades does this "
"automatically)"
msgstr ""
-#: ../rpm.c:413
+#: ../rpm.c:391
msgid " --erase <package>"
msgstr ""
-#: ../rpm.c:415
+#: ../rpm.c:393
msgid "erase (uninstall) package"
msgstr ""
-#: ../rpm.c:417
+#: ../rpm.c:395
msgid ""
"remove all packages which match <package> (normally an error is generated if "
"<package> specified multiple packages)"
msgstr ""
-#: ../rpm.c:427
+#: ../rpm.c:405
msgid "do not execute any package specific scripts"
msgstr ""
-#: ../rpm.c:433
+#: ../rpm.c:411
msgid " -b<stage> <spec> "
msgstr ""
-#: ../rpm.c:434
+#: ../rpm.c:412
msgid " -t<stage> <tarball> "
msgstr ""
-#: ../rpm.c:435
+#: ../rpm.c:413
msgid "build package, where <stage> is one of:"
msgstr ""
-#: ../rpm.c:437
+#: ../rpm.c:415
msgid "prep (unpack sources and apply patches)"
msgstr ""
-#: ../rpm.c:439
+#: ../rpm.c:417
#, c-format
msgid "list check (do some cursory checks on %files)"
msgstr ""
-#: ../rpm.c:441
+#: ../rpm.c:419
msgid "compile (prep and compile)"
msgstr ""
-#: ../rpm.c:443
+#: ../rpm.c:421
msgid "install (prep, compile, install)"
msgstr ""
-#: ../rpm.c:445
+#: ../rpm.c:423
msgid "binary package (prep, compile, install, package)"
msgstr ""
-#: ../rpm.c:447
+#: ../rpm.c:425
msgid "bin/src package (prep, compile, install, package)"
msgstr ""
-#: ../rpm.c:449
-msgid "skip straight to specified stage (only for c,i)"
-msgstr ""
-
-#: ../rpm.c:453
+#: ../rpm.c:431
msgid "remove sources and spec file when done"
msgstr ""
-#: ../rpm.c:455
+#: ../rpm.c:433
msgid "generate PGP signature"
msgstr ""
-#: ../rpm.c:456
+#: ../rpm.c:434
msgid " --buildroot <dir> "
msgstr ""
-#: ../rpm.c:457
+#: ../rpm.c:435
msgid "use <dir> as the build root"
msgstr ""
-#: ../rpm.c:458
-msgid " --platform=<platform>+"
+#: ../rpm.c:436
+msgid " --target=<platform>+"
msgstr ""
-#: ../rpm.c:459
-msgid "build the packages for the platform1...platformN build targets."
+#: ../rpm.c:437
+msgid "build the packages for the build targets platform1...platformN."
msgstr ""
-#: ../rpm.c:461
+#: ../rpm.c:439
msgid "do not execute any stages"
msgstr ""
-#: ../rpm.c:462
+#: ../rpm.c:440
msgid " --timecheck <secs> "
msgstr ""
-#: ../rpm.c:463
+#: ../rpm.c:441
msgid "set the time check to <secs> seconds (0 disables)"
msgstr ""
-#: ../rpm.c:465
+#: ../rpm.c:443
msgid " --rebuild <src_pkg> "
msgstr ""
-#: ../rpm.c:466
+#: ../rpm.c:444
msgid ""
"install source package, build binary package and remove spec file, sources, "
"patches, and icons."
msgstr ""
-#: ../rpm.c:467
+#: ../rpm.c:445
msgid " --rmsource <spec> "
msgstr ""
-#: ../rpm.c:468
+#: ../rpm.c:446
msgid "remove sources and spec file"
msgstr ""
-#: ../rpm.c:469
+#: ../rpm.c:447
msgid " --recompile <src_pkg> "
msgstr ""
-#: ../rpm.c:470
+#: ../rpm.c:448
msgid "like --rebuild, but don't build any package"
msgstr ""
-#: ../rpm.c:471
+#: ../rpm.c:449
msgid " --resign <pkg>+ "
msgstr ""
-#: ../rpm.c:472
+#: ../rpm.c:450
msgid "sign a package (discard current signature)"
msgstr ""
-#: ../rpm.c:473
+#: ../rpm.c:451
msgid " --addsign <pkg>+ "
msgstr ""
-#: ../rpm.c:474
+#: ../rpm.c:452
msgid "add a signature to a package"
msgstr ""
-#: ../rpm.c:476
+#: ../rpm.c:454
msgid " --checksig <pkg>+ "
msgstr ""
-#: ../rpm.c:477
+#: ../rpm.c:455
msgid "verify package signature"
msgstr ""
-#: ../rpm.c:479
+#: ../rpm.c:457
msgid "skip any PGP signatures"
msgstr ""
-#: ../rpm.c:481
+#: ../rpm.c:459
msgid "skip any MD5 signatures"
msgstr ""
-#: ../rpm.c:483
+#: ../rpm.c:461
msgid "list the tags that can be used in a query format"
msgstr ""
-#: ../rpm.c:485
+#: ../rpm.c:463
msgid "make sure a valid database exists"
msgstr ""
-#: ../rpm.c:487
+#: ../rpm.c:465
msgid "rebuild database from existing database"
msgstr ""
-#: ../rpm.c:644 ../rpm.c:650 ../rpm.c:657 ../rpm.c:663 ../rpm.c:672
-#: ../rpm.c:679 ../rpm.c:726 ../rpm.c:732 ../rpm.c:796 ../rpm.c:804
-#: ../rpm.c:811 ../rpm.c:820 ../rpm.c:827 ../rpm.c:835 ../rpm.c:860
-#: ../rpm.c:906 ../rpm.c:913
+#: ../rpm.c:591 ../rpm.c:597 ../rpm.c:604 ../rpm.c:610 ../rpm.c:619
+#: ../rpm.c:626 ../rpm.c:673 ../rpm.c:679 ../rpm.c:743 ../rpm.c:751
+#: ../rpm.c:758 ../rpm.c:767 ../rpm.c:774 ../rpm.c:782 ../rpm.c:807
+#: ../rpm.c:849 ../rpm.c:856
msgid "only one major mode may be specified"
msgstr ""
-#: ../rpm.c:665
+#: ../rpm.c:612
msgid "-u and --uninstall are deprecated and no longer work.\n"
msgstr ""
-#: ../rpm.c:667
+#: ../rpm.c:614
msgid "Use -e or --erase instead.\n"
msgstr ""
-#: ../rpm.c:683
+#: ../rpm.c:630
msgid "--build (-b) requires one of a,b,i,c,p,l as its sole argument"
msgstr ""
-#: ../rpm.c:687
+#: ../rpm.c:634
msgid "--tarbuild (-t) requires one of a,b,i,c,p,l as its sole argument"
msgstr ""
-#: ../rpm.c:739 ../rpm.c:746 ../rpm.c:754 ../rpm.c:762 ../rpm.c:772
-#: ../rpm.c:780 ../rpm.c:788 ../rpm.c:920
+#: ../rpm.c:686 ../rpm.c:693 ../rpm.c:701 ../rpm.c:709 ../rpm.c:719
+#: ../rpm.c:727 ../rpm.c:735 ../rpm.c:863
msgid "one type of query/verify may be performed at a time"
msgstr ""
-#: ../rpm.c:843
+#: ../rpm.c:790
msgid "arguments to --dbpath must begin with a /"
msgstr ""
-#: ../rpm.c:866
+#: ../rpm.c:813
msgid "relocations must begin with a /"
msgstr ""
-#: ../rpm.c:868
+#: ../rpm.c:815
msgid "relocations must contain a ="
msgstr ""
-#: ../rpm.c:871
+#: ../rpm.c:818
msgid "relocations must have a / following the ="
msgstr ""
-#: ../rpm.c:883
-msgid "Internal error in argument processing :-(\n"
+#: ../rpm.c:826
+#, c-format
+msgid "Internal error in argument processing (%d) :-(\n"
msgstr ""
-#: ../rpm.c:933
+#: ../rpm.c:876
msgid "--dbpath given for operation that does not use a database"
msgstr ""
-#: ../rpm.c:938
+#: ../rpm.c:881
msgid "--timecheck may only be used during package builds"
msgstr ""
-#: ../rpm.c:941 ../rpm.c:944
+#: ../rpm.c:884 ../rpm.c:887
msgid "unexpected query specifiers"
msgstr ""
-#: ../rpm.c:948
+#: ../rpm.c:891
msgid "unexpected query source"
msgstr ""
-#: ../rpm.c:953
+#: ../rpm.c:896
msgid "only installation, upgrading and rmsource may be forced"
msgstr ""
-#: ../rpm.c:956
+#: ../rpm.c:899
msgid "files may only be relocated during package installation"
msgstr ""
-#: ../rpm.c:959
+#: ../rpm.c:902
msgid "only one of --prefix or --relocate may be used"
msgstr ""
-#: ../rpm.c:962
+#: ../rpm.c:905
msgid "--relocate may only be used when installing new packages"
msgstr ""
-#: ../rpm.c:965
+#: ../rpm.c:908
msgid "--prefix may only be used when installing new packages"
msgstr ""
-#: ../rpm.c:968
+#: ../rpm.c:911
msgid "arguments to --prefix must begin with a /"
msgstr ""
-#: ../rpm.c:971
+#: ../rpm.c:914
msgid "--hash (-h) may only be specified during package installation"
msgstr ""
-#: ../rpm.c:975
+#: ../rpm.c:918
msgid "--percent may only be specified during package installation"
msgstr ""
-#: ../rpm.c:979
+#: ../rpm.c:922
msgid "--replacefiles may only be specified during package installation"
msgstr ""
-#: ../rpm.c:983
+#: ../rpm.c:926
msgid "--replacepkgs may only be specified during package installation"
msgstr ""
-#: ../rpm.c:987
+#: ../rpm.c:930
msgid "--excludedocs may only be specified during package installation"
msgstr ""
-#: ../rpm.c:991
+#: ../rpm.c:934
msgid "--includedocs may only be specified during package installation"
msgstr ""
-#: ../rpm.c:995
+#: ../rpm.c:938
msgid "only one of --excludedocs and --includedocs may be specified"
msgstr ""
-#: ../rpm.c:999
+#: ../rpm.c:942
msgid "--ignorearch may only be specified during package installation"
msgstr ""
-#: ../rpm.c:1003
+#: ../rpm.c:946
msgid "--ignoreos may only be specified during package installation"
msgstr ""
-#: ../rpm.c:1007
+#: ../rpm.c:950
msgid "--allmatches may only be specified during package erasure"
msgstr ""
-#: ../rpm.c:1011
+#: ../rpm.c:954
msgid "--allfiles may only be specified during package installation"
msgstr ""
-#: ../rpm.c:1015
+#: ../rpm.c:958
msgid "--justdb may only be specified during package installation and erasure"
msgstr ""
-#: ../rpm.c:1020
+#: ../rpm.c:963
msgid ""
"--noscripts may only be specified during package installation, erasure, and "
"verification"
msgstr ""
-#: ../rpm.c:1024
+#: ../rpm.c:967
msgid ""
"--notriggers may only be specified during package installation, erasure, and "
"verification"
msgstr ""
-#: ../rpm.c:1029
+#: ../rpm.c:972
msgid ""
"--nodeps may only be specified during package installation, erasure, and "
"verification"
msgstr ""
-#: ../rpm.c:1033
+#: ../rpm.c:976
msgid "--nofiles may only be specified during package verification"
msgstr ""
-#: ../rpm.c:1038
+#: ../rpm.c:981
msgid ""
"--test may only be specified during package installation, erasure, and "
"building"
msgstr ""
-#: ../rpm.c:1043
+#: ../rpm.c:986
msgid ""
"--root (-r) may only be specified during installation, erasure, querying, "
"and database rebuilds"
msgstr ""
-#: ../rpm.c:1048
+#: ../rpm.c:991
msgid "arguments to --root (-r) must begin with a /"
msgstr ""
-#: ../rpm.c:1052
+#: ../rpm.c:995
msgid "--clean may only be used with -b and -t"
msgstr ""
-#: ../rpm.c:1055
+#: ../rpm.c:998
msgid "--rmsource may only be used with -b and -t"
msgstr ""
-#: ../rpm.c:1059
+#: ../rpm.c:1001
msgid "--short-circuit may only be used during package building"
msgstr ""
-#: ../rpm.c:1063
+#: ../rpm.c:1005
msgid "--short-circuit may only be used with -bc, -bi, -bs, -tc -ti, or -ts"
msgstr ""
-#: ../rpm.c:1068
+#: ../rpm.c:1011
msgid "--oldpackage may only be used during upgrades"
msgstr ""
-#: ../rpm.c:1073
+#: ../rpm.c:1016
msgid ""
"ftp options can only be used during package queries, installs, and upgrades"
msgstr ""
-#: ../rpm.c:1080
+#: ../rpm.c:1023
msgid "--nopgp may only be used during signature checking"
msgstr ""
-#: ../rpm.c:1083
+#: ../rpm.c:1026
msgid ""
"--nopgp may only be used during signature checking and package verification"
msgstr ""
-#: ../rpm.c:1096
+#: ../rpm.c:1039
msgid "Pass phrase check failed\n"
msgstr ""
-#: ../rpm.c:1099
+#: ../rpm.c:1042
msgid "Pass phrase is good.\n"
msgstr ""
-#: ../rpm.c:1111
+#: ../rpm.c:1054
msgid "--sign may only be used during package building"
msgstr ""
-#: ../rpm.c:1126
+#: ../rpm.c:1069
msgid "exec failed\n"
msgstr ""
-#: ../rpm.c:1145
+#: ../rpm.c:1088
msgid "unexpected arguments to --querytags "
msgstr ""
-#: ../rpm.c:1156
+#: ../rpm.c:1099
msgid "no packages given for signature check"
msgstr ""
-#: ../rpm.c:1163
+#: ../rpm.c:1106
msgid "no packages given for signing"
msgstr ""
-#: ../rpm.c:1172
+#: ../rpm.c:1115
msgid "no packages files given for rebuild"
msgstr ""
-#: ../rpm.c:1242
+#: ../rpm.c:1172
msgid "no spec files given for build"
msgstr ""
-#: ../rpm.c:1244
+#: ../rpm.c:1174
msgid "no tar files given for build"
msgstr ""
-#: ../rpm.c:1257
+#: ../rpm.c:1187
msgid "no packages given for uninstall"
msgstr ""
-#: ../rpm.c:1297
+#: ../rpm.c:1227
msgid "no packages given for install"
msgstr ""
-#: ../rpm.c:1319
+#: ../rpm.c:1249
msgid "extra arguments given for query of all packages"
msgstr ""
-#: ../rpm.c:1325
+#: ../rpm.c:1255
msgid "no arguments given for query"
msgstr ""
-#: ../rpm.c:1343
+#: ../rpm.c:1273
msgid "no arguments given for verify"
msgstr ""
@@ -2953,92 +2978,92 @@ msgstr ""
msgid "read failed: %s (%d)"
msgstr ""
-#: ../lib/rpmrc.c:218
+#: ../lib/rpmrc.c:212
#, c-format
msgid "missing second ':' at %s:%d"
msgstr ""
-#: ../lib/rpmrc.c:221
+#: ../lib/rpmrc.c:215
#, c-format
msgid "missing architecture name at %s:%d"
msgstr ""
-#: ../lib/rpmrc.c:366
+#: ../lib/rpmrc.c:363
#, c-format
msgid "Incomplete data line at %s:%d"
msgstr ""
-#: ../lib/rpmrc.c:370
+#: ../lib/rpmrc.c:367
#, c-format
msgid "Too many args in data line at %s:%d"
msgstr ""
-#: ../lib/rpmrc.c:377
+#: ../lib/rpmrc.c:374
#, c-format
msgid "Bad arch/os number: %s (%s:%d)"
msgstr ""
-#: ../lib/rpmrc.c:410
+#: ../lib/rpmrc.c:408
#, c-format
msgid "Incomplete default line at %s:%d"
msgstr ""
-#: ../lib/rpmrc.c:415
+#: ../lib/rpmrc.c:413
#, c-format
msgid "Too many args in default line at %s:%d"
msgstr ""
-#: ../lib/rpmrc.c:549 ../lib/rpmrc.c:565
+#: ../lib/rpmrc.c:529 ../lib/rpmrc.c:541
#, c-format
msgid "Unable to open %s for reading: %s."
msgstr ""
-#: ../lib/rpmrc.c:612
+#: ../lib/rpmrc.c:588
#, c-format
msgid "Failed to read %s: %s."
msgstr ""
-#: ../lib/rpmrc.c:643
+#: ../lib/rpmrc.c:619
#, c-format
msgid "missing ':' at %s:%d"
msgstr ""
-#: ../lib/rpmrc.c:659 ../lib/rpmrc.c:754
+#: ../lib/rpmrc.c:635 ../lib/rpmrc.c:730
#, c-format
msgid "missing argument for %s at %s:%d"
msgstr ""
-#: ../lib/rpmrc.c:689
+#: ../lib/rpmrc.c:665
#, c-format
msgid "no macroname for setenv %s:%d"
msgstr ""
-#: ../lib/rpmrc.c:720
+#: ../lib/rpmrc.c:696
#, c-format
msgid "expansion failed at %s:d \"%s\""
msgstr ""
-#: ../lib/rpmrc.c:726
+#: ../lib/rpmrc.c:702
#, c-format
msgid "cannot open %s at %s:%d"
msgstr ""
-#: ../lib/rpmrc.c:744
+#: ../lib/rpmrc.c:720
#, c-format
msgid "missing architecture for %s at %s:%d"
msgstr ""
-#: ../lib/rpmrc.c:811
+#: ../lib/rpmrc.c:787
#, c-format
msgid "bad option '%s' at %s:%d"
msgstr ""
-#: ../lib/rpmrc.c:1176
+#: ../lib/rpmrc.c:1152
#, c-format
msgid "Unknown system: %s\n"
msgstr ""
-#: ../lib/rpmrc.c:1177
+#: ../lib/rpmrc.c:1153
msgid "Please contact rpm-list@redhat.com\n"
msgstr ""
diff --git a/popt/po/popt.pot b/popt/po/popt.pot
index 7912bc45e..8c7091017 100644
--- a/popt/po/popt.pot
+++ b/popt/po/popt.pot
@@ -6,7 +6,7 @@
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
-"POT-Creation-Date: 1998-11-30 18:28-0500\n"
+"POT-Creation-Date: 1998-12-01 16:02-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"
diff --git a/rpm-qo.c b/rpm-qo.c
index a879b8211..4dc7fe416 100644
--- a/rpm-qo.c
+++ b/rpm-qo.c
@@ -131,9 +131,7 @@ int main(int argc, char ** argv) {
char * specFile;
char *passPhrase = "";
char *buildRootOverride = NULL;
- char *arch = NULL;
char * ftpProxy = NULL, * ftpPort = NULL;
- char *os = NULL;
char * smallArgv[2] = { NULL, NULL };
char ** currarg;
int ec = 0;
@@ -175,7 +173,7 @@ int main(int argc, char ** argv) {
textdomain(NLSPACKAGE);
/* reading this early makes it easy to override */
- if (rpmReadConfigFiles(rcfile, arch, os, building))
+ if (rpmReadConfigFiles(rcfile, NULL))
exit(EXIT_FAILURE);
if (showrc) {
rpmShowRC(stdout);
diff --git a/rpm.c b/rpm.c
index d0625ebaf..4d538ba7e 100755
--- a/rpm.c
+++ b/rpm.c
@@ -13,17 +13,12 @@
#define GETOPT_RECOMPILE 1004
#define GETOPT_ADDSIGN 1005
#define GETOPT_RESIGN 1006
-#define GETOPT_BUILDROOT 1007
#define GETOPT_DBPATH 1010
#define GETOPT_TIMECHECK 1012
#define GETOPT_REBUILDDB 1013
#define GETOPT_INSTALL 1014
-#define GETOPT_RMSOURCE 1015
#define GETOPT_RELOCATE 1016
#define GETOPT_SHOWRC 1018
-#define GETOPT_BUILDPLATFORM 1019
-#define GETOPT_BUILDARCH 1020
-#define GETOPT_BUILDOS 1021
char * version = VERSION;
@@ -35,11 +30,7 @@ enum modes { MODE_QUERY, MODE_INSTALL, MODE_UNINSTALL, MODE_VERIFY,
/* the flags for the various options */
static int allFiles;
static int allMatches;
-static char * arch;
static int badReloc;
-#if XXX
-static int clean;
-#endif
static int excldocs;
static int force;
static char * ftpPort;
@@ -58,7 +49,6 @@ static int noOrder;
static int noPgp;
static int noScripts;
static int noTriggers;
-static char * os;
static int oldPackage;
static int showPercents;
static char * pipeOutput;
@@ -69,7 +59,6 @@ static char * rcfile;
static int replaceFiles;
static int replacePackages;
static char * rootdir;
-static int shortCircuit;
static int showrc;
static int signIt;
static int test;
@@ -88,14 +77,7 @@ static struct poptOption optionsTable[] = {
{ "allmatches", '\0', 0, &allMatches, 0, NULL, NULL},
{ "badreloc", '\0', 0, &badReloc, 0, NULL, NULL},
{ "build", 'b', POPT_ARG_STRING, 0, 'b', NULL, NULL},
- { "buildarch", '\0', POPT_ARG_STRING, &arch, GETOPT_BUILDARCH, NULL, NULL},
- { "buildos", '\0', POPT_ARG_STRING, &os, GETOPT_BUILDOS, NULL, NULL},
- { "buildplatform", '\0', POPT_ARG_STRING, 0, GETOPT_BUILDPLATFORM, NULL, NULL},
- { "buildroot", '\0', POPT_ARG_STRING, 0, GETOPT_BUILDROOT, NULL, NULL},
{ "checksig", 'K', 0, 0, 'K', NULL, NULL},
-#if XXX
- { "clean", '\0', 0, &clean, 0, NULL, NULL},
-#endif
{ "dbpath", '\0', POPT_ARG_STRING, 0, GETOPT_DBPATH, NULL, NULL},
{ "erase", 'e', 0, 0, 'e', NULL, NULL},
{ "excludedocs", '\0', 0, &excldocs, 0, NULL, NULL},
@@ -134,11 +116,7 @@ static struct poptOption optionsTable[] = {
{ "replacefiles", '\0', 0, &replaceFiles, 0, NULL, NULL},
{ "replacepkgs", '\0', 0, &replacePackages, 0, NULL, NULL},
{ "resign", '\0', 0, 0, GETOPT_RESIGN, NULL, NULL},
-#if XXX
- { "rmsource", '\0', 0, 0, GETOPT_RMSOURCE, NULL, NULL},
-#endif
{ "root", 'r', POPT_ARG_STRING, &rootdir, 0, NULL, NULL},
- { "short-circuit", '\0', 0, &shortCircuit, 0, NULL, NULL},
{ "showrc", '\0', 0, &showrc, GETOPT_SHOWRC, NULL, NULL},
{ "sign", '\0', 0, &signIt, 0, NULL, NULL},
{ "tarball", 't', POPT_ARG_STRING, 0, 't', NULL, NULL},
@@ -222,8 +200,8 @@ static void printUsage(void) {
puts(_(" [--dbpath <dir>] [--nodeps] [--allmatches]"));
puts(_(" [--justdb] [--notriggers] rpackage1 ... packageN"));
puts(_(" rpm {-b|t}[plciba] [-v] [--short-circuit] [--clean] [--rcfile <file>]"));
- puts(_(" [--sign] [--test] [--timecheck <s>] ]"));
- puts(_(" [--buildplatform=platform1[,platform2...]]"));
+ puts(_(" [--sign] [--nobuild] [--timecheck <s>] ]"));
+ puts(_(" [--target=platform1[,platform2...]]"));
puts(_(" [--rmsource] specfile"));
puts(_(" rpm {--rmsource} [--rcfile <file>] [-v] specfile"));
puts(_(" rpm {--rebuild} [--rcfile <file>] [-v] source1.rpm ... sourceN.rpm"));
@@ -455,9 +433,9 @@ static void printHelp(void) {
_("generate PGP signature"));
printHelpLine(_(" --buildroot <dir> "),
_("use <dir> as the build root"));
- printHelpLine(_(" --platform=<platform>+"),
- _("build the packages for the platform1...platformN build targets."));
- printHelpLine( " --test ",
+ printHelpLine(_(" --target=<platform>+"),
+ _("build the packages for the build targets platform1...platformN."));
+ printHelpLine( " --nobuild ",
_("do not execute any stages"));
printHelpLine(_(" --timecheck <secs> "),
_("set the time check to <secs> seconds (0 disables)"));
@@ -497,15 +475,10 @@ int main(int argc, char ** argv) {
enum verifysources verifySource = VERIFY_PACKAGE;
int arg;
int installFlags = 0, uninstallFlags = 0, interfaceFlags = 0;
- int buildAmount = 0;
- int gotDbpath = 0, building = 0, verifyFlags;
-#if XXX
- int rmsource = 0;
-#endif
+ int gotDbpath = 0, verifyFlags;
int checksigFlags = 0;
unsigned long int timeCheck = 0L;
int addSign = NEW_SIGNATURE;
- char buildChar = ' ';
char * specFile;
char * tce;
char * passPhrase = "";
@@ -522,16 +495,11 @@ int main(int argc, char ** argv) {
int p[2];
struct rpmRelocation * relocations = NULL;
int numRelocations = 0;
- char * buildplatforms = NULL;
/* set the defaults for the various command line options */
allFiles = 0;
allMatches = 0;
- arch = NULL;
badReloc = 0;
-#if XXX
- clean = 0;
-#endif
excldocs = 0;
force = 0;
ftpProxy = NULL;
@@ -551,7 +519,6 @@ int main(int argc, char ** argv) {
noScripts = 0;
noTriggers = 0;
oldPackage = 0;
- os = NULL;
showPercents = 0;
pipeOutput = NULL;
prefix = NULL;
@@ -560,7 +527,6 @@ int main(int argc, char ** argv) {
replaceFiles = 0;
replacePackages = 0;
rootdir = "/";
- shortCircuit = 0;
showrc = 0;
signIt = 0;
test = 0;
@@ -578,49 +544,28 @@ int main(int argc, char ** argv) {
rpmSetVerbosity(RPMMESS_NORMAL); /* XXX silly use by showrc */
/* Make a first pass through the arguments, looking for --rcfile */
- /* as well as --arch and --os. We need to handle that before */
- /* dealing with the rest of the arguments. */
+ /* We need to handle that before dealing with the rest of the arguments. */
optCon = poptGetContext("rpm", argc, argv, optionsTable, 0);
poptReadConfigFile(optCon, LIBRPMALIAS_FILENAME);
poptReadDefaultConfig(optCon, 1);
poptSetExecPath(optCon, RPMCONFIGDIR, 1);
- while ((arg = poptGetNextOpt(optCon)) > 0) {
- optArg = poptGetOptArg(optCon);
+ /* reading rcfile early makes it easy to override */
+ /* XXX only --rcfile (and --showrc) need this pre-parse */
+ while ((arg = poptGetNextOpt(optCon)) > 0) {
switch(arg) {
case 'v':
rpmIncreaseVerbosity(); /* XXX silly use by showrc */
-
break;
- case GETOPT_BUILDARCH:
- fprintf(stderr, "--buildarch has been obsoleted. Use the --buildplatform option\n");
- fprintf(stderr, "with a platform specific rpmrc file with a Buildarch: tag set\n");
- exit(EXIT_FAILURE);
- break;
- case GETOPT_BUILDOS:
- fprintf(stderr, "--buildos has been obsoleted. Use the --buildplatform option\n");
- fprintf(stderr, "with a platform specific rpmrc file with a Buildos: tag set\n");
- exit(EXIT_FAILURE);
- break;
- case 'b':
- case 't':
- case GETOPT_REBUILD:
- case GETOPT_RECOMPILE:
- case GETOPT_SHOWRC: /* showrc set as side effect */
-#if XXX
- case GETOPT_RMSOURCE:
-#endif
- building = 1;
- /* fall thru */
default:
break;
}
}
- /* reading this early makes it easy to override */
- if (rpmReadConfigFiles(rcfile, arch, os, building, NULL))
+ if (rpmReadConfigFiles(rcfile, NULL))
exit(EXIT_FAILURE);
+
if (showrc) {
rpmShowRC(stdout);
exit(EXIT_SUCCESS);
@@ -633,7 +578,9 @@ int main(int argc, char ** argv) {
if (queryArgs.queryFormat) free(queryArgs.queryFormat);
memset(&queryArgs, 0, sizeof(queryArgs));
if (buildArgs.buildRootOverride) free(buildArgs.buildRootOverride);
+ if (buildArgs.targets) free(buildArgs.targets);
memset(&buildArgs, 0, sizeof(buildArgs));
+ buildArgs.buildChar = ' ';
while ((arg = poptGetNextOpt(optCon)) > 0) {
optArg = poptGetOptArg(optCon);
@@ -691,8 +638,8 @@ int main(int argc, char ** argv) {
if (strlen(optArg) > 1)
argerror(errString);
- buildChar = optArg[0];
- switch (buildChar) {
+ buildArgs.buildChar = optArg[0];
+ switch (buildArgs.buildChar) {
case 'a':
case 'b':
case 'i':
@@ -875,12 +822,8 @@ int main(int argc, char ** argv) {
relocations[numRelocations++].newPath = errString;
break;
- case GETOPT_BUILDPLATFORM:
- buildplatforms = optArg;
- break;
-
default:
- fprintf(stderr, _("Internal error in argument processing :-(\n"));
+ fprintf(stderr, _("Internal error in argument processing (%d) :-(\n"), arg);
exit(EXIT_FAILURE);
}
}
@@ -1053,16 +996,16 @@ int main(int argc, char ** argv) {
if (bigMode != MODE_BUILD && bigMode != MODE_TARBUILD && rmsource)
argerror(_("--rmsource may only be used with -b and -t"));
-#endif
- if (bigMode != MODE_BUILD && bigMode != MODE_TARBUILD && shortCircuit)
+ if (bigMode != MODE_BUILD && bigMode != MODE_TARBUILD && buildArgs.shortCircuit)
argerror(_("--short-circuit may only be used during package building"));
- if (shortCircuit && (buildChar != 'c') && (buildChar != 'i')
- && (buildChar != 's')) {
+ if (buildArgs.shortCircuit && (buildArgs.buildChar != 'c') && (buildArgs.buildChar != 'i')
+ && (buildArgs.buildChar != 's')) {
argerror(_("--short-circuit may only be used with -bc, -bi, -bs, -tc "
"-ti, or -ts"));
}
+#endif
if (oldPackage && !(installFlags & RPMINSTALL_UPGRADE))
argerror(_("--oldpackage may only be used during upgrades"));
@@ -1171,20 +1114,20 @@ int main(int argc, char ** argv) {
if (!poptPeekArg(optCon))
argerror(_("no packages files given for rebuild"));
- buildAmount = RPMBUILD_PREP | RPMBUILD_BUILD | RPMBUILD_INSTALL;
+ buildArgs.buildAmount = RPMBUILD_PREP | RPMBUILD_BUILD | RPMBUILD_INSTALL;
if (bigMode == MODE_REBUILD) {
- buildAmount |= RPMBUILD_PACKAGEBINARY;
- buildAmount |= RPMBUILD_RMSOURCE;
- buildAmount |= RPMBUILD_CLEAN;
- buildAmount |= RPMBUILD_RMBUILD;
+ buildArgs.buildAmount |= RPMBUILD_PACKAGEBINARY;
+ buildArgs.buildAmount |= RPMBUILD_RMSOURCE;
+ buildArgs.buildAmount |= RPMBUILD_CLEAN;
+ buildArgs.buildAmount |= RPMBUILD_RMBUILD;
}
while ((pkg = poptGetArg(optCon))) {
if (doSourceInstall("/", pkg, &specFile, &cookie))
exit(EXIT_FAILURE);
- if (build(specFile, buildAmount, passPhrase, buildArgs.buildRootOverride,
- 0, test, cookie, rcfile, arch, os, buildplatforms, force)) {
+ if (build(specFile, buildArgs.buildAmount, passPhrase, buildArgs.buildRootOverride,
+ 0, buildArgs.noBuild, cookie, rcfile, buildArgs.targets, force)) {
exit(EXIT_FAILURE);
}
free(cookie);
@@ -1197,46 +1140,33 @@ int main(int argc, char ** argv) {
if (rpmGetVerbosity() == RPMMESS_NORMAL)
rpmSetVerbosity(RPMMESS_VERBOSE);
- switch (buildChar) {
+ switch (buildArgs.buildChar) {
/* these fallthroughs are intentional */
case 'a':
- buildAmount |= RPMBUILD_PACKAGESOURCE;
+ buildArgs.buildAmount |= RPMBUILD_PACKAGESOURCE;
case 'b':
- buildAmount |= RPMBUILD_PACKAGEBINARY;
- buildAmount |= RPMBUILD_CLEAN;
+ buildArgs.buildAmount |= RPMBUILD_PACKAGEBINARY;
+ buildArgs.buildAmount |= RPMBUILD_CLEAN;
case 'i':
- buildAmount |= RPMBUILD_INSTALL;
- if ((buildChar == 'i') && shortCircuit)
+ buildArgs.buildAmount |= RPMBUILD_INSTALL;
+ if ((buildArgs.buildChar == 'i') && buildArgs.shortCircuit)
break;
case 'c':
- buildAmount |= RPMBUILD_BUILD;
- if ((buildChar == 'c') && shortCircuit)
+ buildArgs.buildAmount |= RPMBUILD_BUILD;
+ if ((buildArgs.buildChar == 'c') && buildArgs.shortCircuit)
break;
case 'p':
- buildAmount |= RPMBUILD_PREP;
+ buildArgs.buildAmount |= RPMBUILD_PREP;
break;
case 'l':
- buildAmount |= RPMBUILD_FILECHECK;
+ buildArgs.buildAmount |= RPMBUILD_FILECHECK;
break;
case 's':
- buildAmount |= RPMBUILD_PACKAGESOURCE;
+ buildArgs.buildAmount |= RPMBUILD_PACKAGESOURCE;
break;
}
-#if XXX
- if (rmsource)
- buildAmount |= RPMBUILD_RMSOURCE;
-
- if (clean)
- buildAmount |= RPMBUILD_RMBUILD;
-#else
- if (buildArgs.buildAmount) {
- buildAmount |=
- (buildArgs.buildAmount & (RPMBUILD_RMSOURCE|RPMBUILD_RMBUILD));
- }
-#endif
-
if (!poptPeekArg(optCon)) {
if (bigMode == MODE_BUILD)
argerror(_("no spec files given for build"));
@@ -1245,9 +1175,9 @@ int main(int argc, char ** argv) {
}
while ((pkg = poptGetArg(optCon)))
- if (build(pkg, buildAmount, passPhrase, buildArgs.buildRootOverride,
- bigMode == MODE_TARBUILD, test, NULL,
- rcfile, arch, os, buildplatforms, force)) {
+ if (build(pkg, buildArgs.buildAmount, passPhrase, buildArgs.buildRootOverride,
+ bigMode == MODE_TARBUILD, buildArgs.noBuild, NULL,
+ rcfile, buildArgs.targets, force)) {
exit(EXIT_FAILURE);
}
break;
diff --git a/rpmio/macro.c b/rpmio/macro.c
index e6d514a06..5ea3c19b3 100644
--- a/rpmio/macro.c
+++ b/rpmio/macro.c
@@ -88,7 +88,7 @@ sortMacroTable(MacroContext *mc)
compareMacroName);
}
-static void
+void
dumpMacroTable(MacroContext *mc)
{
int i;
diff --git a/rpmio/rpmmacro.h b/rpmio/rpmmacro.h
index 9642e556f..ba01ed6d5 100644
--- a/rpmio/rpmmacro.h
+++ b/rpmio/rpmmacro.h
@@ -46,6 +46,8 @@ extern "C" {
int isCompressed(char *file, int *compressed);
+void dumpMacroTable __P((MacroContext *mc));
+
void initMacros __P((MacroContext *mc, const char *macrofile));
void freeMacros __P((MacroContext *mc));
diff --git a/tests/macros.in b/tests/macros.in
index d483ba5b7..378a276d5 100644
--- a/tests/macros.in
+++ b/tests/macros.in
@@ -61,8 +61,8 @@
RPM_SOURCE_DIR=\"%{_sourcedir}\"\
RPM_BUILD_DIR=\"%{_builddir}\"\
RPM_OPT_FLAGS=\"%{optflags}\"\
- RPM_ARCH=\"%{arch}\"\
- RPM_OS=\"%{os}\"\
+ RPM_ARCH=\"%{_target_cpu}\"\
+ RPM_OS=\"%{_target_os}\"\
export RPM_SOURCE_DIR RPM_BUILD_DIR RPM_OPT_FLAGS RPM_ARCH RPM_OS\
RPM_DOC_DIR=\"%{_docdir}\"\
export RPM_DOC_DIR\
@@ -78,6 +78,7 @@
# ---- configure macros.
# Macro(s) similar to those used by configure.
#
+%_prefix @prefix@
%_build @build@
%_build_alias @build_alias@
%_build_cpu @build_cpu@
@@ -88,4 +89,8 @@
%_host_cpu @host_cpu@
%_host_vendor @host_vendor@
%_host_os @host_os@
-%_prefix @prefix@
+%_target @target@
+%_target_alias @target_alias@
+%_target_cpu @target_cpu@
+%_target_vendor @target_vendor@
+%_target_os @target_os@
diff --git a/tools/dumpdb.c b/tools/dumpdb.c
index dcbb343fd..9cdfc6251 100644
--- a/tools/dumpdb.c
+++ b/tools/dumpdb.c
@@ -10,7 +10,7 @@ int main(int argc, char ** argv)
int blockNum = 0;
rpmdb db;
- rpmReadConfigFiles(NULL, NULL, NULL, 0, NULL);
+ rpmReadConfigFiles(NULL, NULL);
if (argc == 2) {
dspBlockNum = atoi(argv[1]);