RPM Package Manager, CVS Repository
http://rpm5.org/cvs/
____________________________________________________________________________
Server: rpm5.org Name: Jeff Johnson
Root: /v/rpm/cvs Email: jbj@rpm5.org
Module: rpm Date: 10-Feb-2010 21:24:51
Branch: HEAD Handle: 2010021020244901
Modified files:
rpm build.c build.h rpmqv.c
rpm/lib rpmcli.h
Log:
- add specFile to build arguments container.
Summary:
Revision Changes Path
2.124 +5 -4 rpm/build.c
2.22 +1 -2 rpm/build.h
2.99 +1 -0 rpm/lib/rpmcli.h
1.165 +10 -12 rpm/rpmqv.c
____________________________________________________________________________
patch -p0 <<'@@ .'
Index: rpm/build.c
============================================================================
$ cvs diff -u -r2.123 -r2.124 build.c
--- rpm/build.c 1 Aug 2008 12:33:30 -0000 2.123
+++ rpm/build.c 10 Feb 2010 20:24:49 -0000 2.124
@@ -99,7 +99,7 @@
/**
*/
/*@-boundswrite@*/
-static int buildForTarget(rpmts ts, const char * arg, BTA_t ba)
+static int buildForTarget(rpmts ts, BTA_t ba)
/*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/
/*@modifies ts, rpmGlobalMacroContext, fileSystem, internalState @*/
{
@@ -111,6 +111,7 @@
int specut;
const char * s;
char * se;
+ const char * arg = ba->specFile;
size_t nb = strlen(arg) + BUFSIZ;
char * buf = alloca(nb);
Spec spec = NULL;
@@ -257,7 +258,7 @@
}
/*@=boundswrite@*/
-int build(rpmts ts, const char * arg, BTA_t ba, const char * rcfile)
+int build(rpmts ts, BTA_t ba, const char * rcfile)
{
const char *t, *te;
int rc = 0;
@@ -278,7 +279,7 @@
ovsflags = rpmtsSetVSFlags(ts, vsflags);
if (targets == NULL) {
- rc = buildForTarget(ts, arg, ba);
+ rc = buildForTarget(ts, ba);
nbuilds++;
goto exit;
}
@@ -308,7 +309,7 @@
rpmFreeRpmrc();
(void) rpmReadConfigFiles(rcfile, target);
}
- rc = buildForTarget(ts, arg, ba);
+ rc = buildForTarget(ts, ba);
nbuilds++;
if (rc)
break;
@@ .
patch -p0 <<'@@ .'
Index: rpm/build.h
============================================================================
$ cvs diff -u -r2.21 -r2.22 build.h
--- rpm/build.h 6 Jul 2007 18:45:52 -0000 2.21
+++ rpm/build.h 10 Feb 2010 20:24:49 -0000 2.22
@@ -5,8 +5,7 @@
extern "C" {
#endif
-int build(rpmts ts, const char * arg, BTA_t ba,
- /*@null@*/ const char * rcfile)
+int build(rpmts ts, BTA_t ba, /*@null@*/ const char * rcfile)
/*@globals rpmGlobalMacroContext, rpmCLIMacroContext,
h_errno, fileSystem, internalState @*/
/*@modifies ts, ba->buildAmount, rpmGlobalMacroContext, rpmCLIMacroContext,
@@ .
patch -p0 <<'@@ .'
Index: rpm/lib/rpmcli.h
============================================================================
$ cvs diff -u -r2.98 -r2.99 rpmcli.h
--- rpm/lib/rpmcli.h 4 Jan 2010 03:51:37 -0000 2.98
+++ rpm/lib/rpmcli.h 10 Feb 2010 20:24:50 -0000 2.99
@@ -736,6 +736,7 @@
const char * passPhrase; /*!< Pass phrase. */
/*@only@*/ /*@null@*/
const char * cookie; /*!< NULL for binary, ??? for source, rpm's */
+ const char * specFile; /*!< from --rebuild/--recompile build */
int noBuild; /*!< from --nobuild */
int noDeps; /*!< from --nodeps */
int noLang; /*!< from --nolang */
@@ .
patch -p0 <<'@@ .'
Index: rpm/rpmqv.c
============================================================================
$ cvs diff -u -r1.164 -r1.165 rpmqv.c
--- rpm/rpmqv.c 4 Jan 2010 03:51:37 -0000 1.164
+++ rpm/rpmqv.c 10 Feb 2010 20:24:49 -0000 1.165
@@ -394,15 +394,15 @@
#endif
#ifdef IAM_RPMEIU
- QVA_t ia = &rpmIArgs;
+ QVA_t ia = &rpmIArgs;
#endif
#if defined(IAM_RPMDB)
- QVA_t da = &rpmDBArgs;
+ QVA_t da = &rpmDBArgs;
#endif
#if defined(IAM_RPMK)
- QVA_t ka = &rpmQVKArgs;
+ QVA_t ka = &rpmQVKArgs;
#endif
#if defined(IAM_RPMBT) || defined(IAM_RPMK)
@@ -781,22 +781,21 @@
}
while ((pkg = poptGetArg(optCon))) {
- const char * specFile = NULL;
-
if (nbuilds++ > 0) {
rpmFreeMacros(NULL);
rpmFreeRpmrc();
(void) rpmReadConfigFiles(NULL, NULL);
}
+ ba->specFile = NULL;
ba->cookie = NULL;
- ec = rpmInstallSource(ts, pkg, &specFile, &ba->cookie);
+ ec = rpmInstallSource(ts, pkg, &ba->specFile, &ba->cookie);
if (ec == 0) {
ba->rootdir = rpmioRootDir;
ba->passPhrase = passPhrase;
- ec = build(ts, specFile, ba, NULL);
+ ec = build(ts, ba, NULL);
}
ba->cookie = _free(ba->cookie);
- specFile = _free(specFile);
+ ba->specFile = _free(ba->specFile);
if (ec)
/*@loopbreak@*/ break;
@@ -806,8 +805,7 @@
case MODE_BUILD:
case MODE_TARBUILD:
- { const char * pkg;
- int nbuilds = 0;
+ { int nbuilds = 0;
#if defined(RPM_VENDOR_OPENPKG) /* no-auto-verbose-increase-for-track-and-fetch */
if (ba->buildChar != 't' && ba->buildChar != 'f')
@@ -871,7 +869,7 @@
argerror(_("no tar files given for build"));
}
- while ((pkg = poptGetArg(optCon))) {
+ while ((ba->specFile = poptGetArg(optCon))) {
if (nbuilds++ > 0) {
rpmFreeMacros(NULL);
rpmFreeRpmrc();
@@ -880,7 +878,7 @@
ba->rootdir = rpmioRootDir;
ba->passPhrase = passPhrase;
ba->cookie = NULL;
- ec = build(ts, pkg, ba, NULL);
+ ec = build(ts, ba, NULL);
if (ec)
/*@loopbreak@*/ break;
}
@@ .
Received on Wed Feb 10 21:24:51 2010