Rename Spec -> rpmSpec for namespacing
authorPanu Matilainen <pmatilai@redhat.com>
Fri, 21 Sep 2007 12:23:02 +0000 (15:23 +0300)
committerPanu Matilainen <pmatilai@redhat.com>
Fri, 21 Sep 2007 12:23:02 +0000 (15:23 +0300)
27 files changed:
build.c
build/build.c
build/buildio.h
build/expression.c
build/files.c
build/pack.c
build/parseBuildInstallClean.c
build/parseChangelog.c
build/parseDescription.c
build/parseFiles.c
build/parsePreamble.c
build/parsePrep.c
build/parseReqs.c
build/parseScript.c
build/parseSpec.c
build/reqprov.c
build/rpmbuild.h
build/rpmfc.c
build/rpmfc.h
build/rpmspec.h
build/spec.c
lib/rpmlib.h
lib/rpmts.c
lib/rpmts.h
python/rpmts-py.c
python/spec-py.c
python/spec-py.h

diff --git a/build.c b/build.c
index 6fe47ab..6c33108 100644 (file)
--- a/build.c
+++ b/build.c
@@ -102,7 +102,7 @@ static int buildForTarget(rpmts ts, const char * arg, BTA_t ba)
     const char * specURL;
     int specut;
     char buf[BUFSIZ];
-    Spec spec = NULL;
+    rpmSpec spec = NULL;
     int rc;
 
 #ifndef        DYING
index a1cea9b..b654f43 100644 (file)
@@ -15,7 +15,7 @@ static int _build_debug = 0;
 
 /**
  */
-static void doRmSource(Spec spec)
+static void doRmSource(rpmSpec spec)
 {
     struct Source *p;
     Package pkg;
@@ -47,7 +47,7 @@ static void doRmSource(Spec spec)
 /*
  * @todo Single use by %%doc in files.c prevents static.
  */
-int doScript(Spec spec, int what, const char *name, StringBuf sb, int test)
+int doScript(rpmSpec spec, int what, const char *name, StringBuf sb, int test)
 {
     const char * rootURL = spec->rootURL;
     const char * rootDir;
@@ -272,7 +272,7 @@ fprintf(stderr, "*** delMacros\n");
     return rc;
 }
 
-int buildSpec(rpmts ts, Spec spec, int what, int test)
+int buildSpec(rpmts ts, rpmSpec spec, int what, int test)
 {
     int rc = 0;
 
index 3e45140..2a3dfd6 100644 (file)
@@ -33,7 +33,7 @@ extern "C" {
  * @return             0 on success
  */
 int readRPM(const char * fileName,
-               Spec * specp,
+               rpmSpec * specp,
                struct rpmlead * lead,
                Header * sigs,
                CSA_t csa);
index 012ee2b..970722b 100644 (file)
@@ -101,7 +101,7 @@ typedef struct _parseState {
     char *p;           /*!< current position in expression string */
     int nextToken;     /*!< current lookahead token */
     Value tokenValue;  /*!< valid when TOK_INTEGER or TOK_STRING */
-    Spec spec;         /*!< spec file that we are parsing inside of */
+    rpmSpec spec;      /*!< spec file that we are parsing inside of */
 } *ParseState;
 
 
@@ -635,7 +635,7 @@ static Value doLogical(ParseState state)
   return v1;
 }
 
-int parseExpressionBoolean(Spec spec, const char *expr)
+int parseExpressionBoolean(rpmSpec spec, const char *expr)
 {
   struct _parseState state;
   int result = -1;
@@ -682,7 +682,7 @@ int parseExpressionBoolean(Spec spec, const char *expr)
   return result;
 }
 
-char * parseExpressionString(Spec spec, const char *expr)
+char * parseExpressionString(rpmSpec spec, const char *expr)
 {
   struct _parseState state;
   char *result = NULL;
index 9aac1db..113fe30 100644 (file)
@@ -826,7 +826,7 @@ VFA_t virtualFileAttributes[] = {
  * @retval *fileName   file name
  * @return             0 on success
  */
-static int parseForSimple(Spec spec, Package pkg, char * buf,
+static int parseForSimple(rpmSpec spec, Package pkg, char * buf,
                          FileList fl, const char ** fileName)
 {
     char *s, *t;
@@ -1760,7 +1760,7 @@ exit:
 
 /**
  */
-static int processPackageFiles(Spec spec, Package pkg,
+static int processPackageFiles(rpmSpec spec, Package pkg,
                               int installSpecialDoc, int test)
 {
     HGE_t hge = (HGE_t)headerGetEntryMinMemory;
@@ -2009,7 +2009,7 @@ exit:
     return fl.processingFailed;
 }
 
-void initSourceHeader(Spec spec)
+void initSourceHeader(rpmSpec spec)
 {
     HeaderIterator hi;
     int_32 tag, type, count;
@@ -2068,7 +2068,7 @@ void initSourceHeader(Spec spec)
     }
 }
 
-int processSourceFiles(Spec spec)
+int processSourceFiles(rpmSpec spec)
 {
     struct Source *srcPtr;
     StringBuf sourceFiles;
@@ -2277,7 +2277,7 @@ exit:
     return rc;
 }
 
-int processBinaryFiles(Spec spec, int installSpecialDoc, int test)
+int processBinaryFiles(rpmSpec spec, int installSpecialDoc, int test)
 {
     Package pkg;
     int res = 0;
index 419d40c..30d2855 100644 (file)
@@ -28,7 +28,7 @@
 
 /**
  */
-static inline int genSourceRpmName(Spec spec)
+static inline int genSourceRpmName(rpmSpec spec)
 {
     if (spec->sourceRpmName == NULL) {
        const char *name, *version, *release;
@@ -112,7 +112,7 @@ static int cpio_copy(FD_t fdo, CSA_t csa)
 
 /**
  */
-static StringBuf addFileToTagAux(Spec spec,
+static StringBuf addFileToTagAux(rpmSpec spec,
                const char * file, StringBuf sb)
 {
     char buf[BUFSIZ];
@@ -146,7 +146,7 @@ static StringBuf addFileToTagAux(Spec spec,
 
 /**
  */
-static int addFileToTag(Spec spec, const char * file, Header h, int tag)
+static int addFileToTag(rpmSpec spec, const char * file, Header h, int tag)
 {
     HGE_t hge = (HGE_t)headerGetEntryMinMemory;
     StringBuf sb = newStringBuf();
@@ -168,7 +168,7 @@ static int addFileToTag(Spec spec, const char * file, Header h, int tag)
 
 /**
  */
-static int addFileToArrayTag(Spec spec, const char *file, Header h, int tag)
+static int addFileToArrayTag(rpmSpec spec, const char *file, Header h, int tag)
 {
     StringBuf sb = newStringBuf();
     char *s;
@@ -185,7 +185,7 @@ static int addFileToArrayTag(Spec spec, const char *file, Header h, int tag)
 
 /**
  */
-static int processScriptFiles(Spec spec, Package pkg)
+static int processScriptFiles(rpmSpec spec, Package pkg)
 {
     struct TriggerFileEntry *p;
     
@@ -266,11 +266,11 @@ static int processScriptFiles(Spec spec, Package pkg)
     return 0;
 }
 
-int readRPM(const char *fileName, Spec *specp, struct rpmlead *lead,
+int readRPM(const char *fileName, rpmSpec *specp, struct rpmlead *lead,
                Header *sigs, CSA_t csa)
 {
     FD_t fdi;
-    Spec spec;
+    rpmSpec spec;
     rpmRC rc;
 
     fdi = (fileName != NULL)
@@ -709,7 +709,7 @@ static int_32 copyTags[] = {
     0
 };
 
-int packageBinaries(Spec spec)
+int packageBinaries(rpmSpec spec)
 {
     struct cpioSourceArchive_s csabuf;
     CSA_t csa = &csabuf;
@@ -810,7 +810,7 @@ int packageBinaries(Spec spec)
     return 0;
 }
 
-int packageSources(Spec spec)
+int packageSources(rpmSpec spec)
 {
     struct cpioSourceArchive_s csabuf;
     CSA_t csa = &csabuf;
index 148be46..e600fb2 100644 (file)
@@ -8,7 +8,7 @@
 #include "debug.h"
 
 
-int parseBuildInstallClean(Spec spec, rpmParseState parsePart)
+int parseBuildInstallClean(rpmSpec spec, rpmParseState parsePart)
 {
     int nextPart, rc;
     StringBuf *sbp = NULL;
index 1f0df48..cc7d846 100644 (file)
@@ -198,7 +198,7 @@ static int addChangelog(Header h, StringBuf sb)
     return 0;
 }
 
-int parseChangelog(Spec spec)
+int parseChangelog(rpmSpec spec)
 {
     int nextPart, res, rc;
     StringBuf sb = newStringBuf();
index 19198f5..dc7b178 100644 (file)
@@ -20,7 +20,7 @@ extern int noLang;
        { 0, 0, 0, 0, 0,        NULL, NULL}
     };
 
-int parseDescription(Spec spec)
+int parseDescription(rpmSpec spec)
 {
     int nextPart = RPMERR_BADSPEC;     /* assume error */
     StringBuf sb;
index f4271a1..4283253 100644 (file)
@@ -17,7 +17,7 @@
        { 0, 0, 0, 0, 0,        NULL, NULL}
     };
 
-int parseFiles(Spec spec)
+int parseFiles(rpmSpec spec)
 {
     int nextPart;
     Package pkg;
index 5568f06..bda34a3 100644 (file)
@@ -202,7 +202,7 @@ static int isMemberInEntry(Header h, const char *name, rpmTag tag)
 
 /**
  */
-static int checkForValidArchitectures(Spec spec)
+static int checkForValidArchitectures(rpmSpec spec)
 {
 #ifndef        DYING
     const char *arch = NULL;
@@ -377,7 +377,7 @@ exit:
     return rc;
 }
 
-spectag stashSt(Spec spec, Header h, int tag, const char * lang)
+spectag stashSt(rpmSpec spec, Header h, int tag, const char * lang)
 {
     HGE_t hge = (HGE_t)headerGetEntryMinMemory;
     spectag t = NULL;
@@ -417,7 +417,7 @@ extern int noLang;
 
 /**
  */
-static int handlePreambleTag(Spec spec, Package pkg, rpmTag tag,
+static int handlePreambleTag(rpmSpec spec, Package pkg, rpmTag tag,
                const char *macro, const char *lang)
 {
     HGE_t hge = (HGE_t)headerGetEntryMinMemory;
@@ -740,7 +740,7 @@ static inline void initPreambleList(void)
 
 /**
  */
-static int findPreambleTag(Spec spec,rpmTag * tag,
+static int findPreambleTag(rpmSpec spec,rpmTag * tag,
                const char ** macro, char * lang)
 {
     PreambleRec p;
@@ -799,7 +799,7 @@ static int findPreambleTag(Spec spec,rpmTag * tag,
     return 0;
 }
 
-int parsePreamble(Spec spec, int initialPackage)
+int parsePreamble(rpmSpec spec, int initialPackage)
 {
     int nextPart;
     int rc, xx;
index cb99c13..0e8b611 100644 (file)
@@ -59,7 +59,7 @@ static int checkOwners(const char * urlfn)
  * @return             expanded %patch macro (NULL on error)
  */
 
-static char *doPatch(Spec spec, int c, int strip, const char *db,
+static char *doPatch(rpmSpec spec, int c, int strip, const char *db,
                     int reverse, int removeEmpties, int fuzz)
 {
     const char *fn, *urlfn;
@@ -154,7 +154,7 @@ static char *doPatch(Spec spec, int c, int strip, const char *db,
  * @param quietly      should -vv be omitted from tar?
  * @return             expanded %setup macro (NULL on error)
  */
-static const char *doUntar(Spec spec, int c, int quietly)
+static const char *doUntar(rpmSpec spec, int c, int quietly)
 {
     const char *fn, *urlfn;
     static char buf[BUFSIZ];
@@ -274,7 +274,7 @@ static const char *doUntar(Spec spec, int c, int quietly)
  * @param line         current line from spec file
  * @return             0 on success
  */
-static int doSetupMacro(Spec spec, char *line)
+static int doSetupMacro(rpmSpec spec, char *line)
 {
     char buf[BUFSIZ];
     StringBuf before;
@@ -422,7 +422,7 @@ static int doSetupMacro(Spec spec, char *line)
  * @param line         current line from spec file
  * @return             0 on success
  */
-static int doPatchMacro(Spec spec, char *line)
+static int doPatchMacro(rpmSpec spec, char *line)
 {
     char *opt_b;
     int opt_P, opt_p, opt_R, opt_E, opt_F;
@@ -543,7 +543,7 @@ static int doPatchMacro(Spec spec, char *line)
     return 0;
 }
 
-int parsePrep(Spec spec)
+int parsePrep(rpmSpec spec)
 {
     int nextPart, res, rc;
     StringBuf sb;
index 666fad7..0693bf8 100644 (file)
@@ -31,7 +31,7 @@ const char * token;
 #define        SKIPWHITE(_x)   {while(*(_x) && (xisspace(*_x) || *(_x) == ',')) (_x)++;}
 #define        SKIPNONWHITE(_x){while(*(_x) &&!(xisspace(*_x) || *(_x) == ',')) (_x)++;}
 
-int parseRCPOT(Spec spec, Package pkg, const char *field, rpmTag tagN,
+int parseRCPOT(rpmSpec spec, Package pkg, const char *field, rpmTag tagN,
               int index, rpmsenseFlags tagflags)
 {
     const char *r, *re, *v, *ve;
index 028effe..f8a1784 100644 (file)
@@ -60,7 +60,7 @@ static int addTriggerIndex(Package pkg, const char *file,
 /* We then pass the remaining arguments to parseRCPOT, along with   */
 /* an index we just determined.                                     */
 
-int parseScript(Spec spec, int parsePart)
+int parseScript(rpmSpec spec, int parsePart)
 {
     /* There are a few options to scripts: */
     /*  <pkg>                              */
index 4e267be..1251cbe 100644 (file)
@@ -100,7 +100,7 @@ void handleComments(char *s)
 
 /**
  */
-static void forceIncludeFile(Spec spec, const char * fileName)
+static void forceIncludeFile(rpmSpec spec, const char * fileName)
 {
     OFI_t * ofi;
 
@@ -112,7 +112,7 @@ static void forceIncludeFile(Spec spec, const char * fileName)
 
 /**
  */
-static int copyNextLine(Spec spec, OFI_t *ofi, int strip)
+static int copyNextLine(rpmSpec spec, OFI_t *ofi, int strip)
 {
     char *last;
     char ch;
@@ -202,7 +202,7 @@ static int copyNextLine(Spec spec, OFI_t *ofi, int strip)
     return 0;
 }
 
-int readLine(Spec spec, int strip)
+int readLine(rpmSpec spec, int strip)
 {
 #ifdef DYING
     const char *arch;
@@ -382,7 +382,7 @@ retry:
     return 0;
 }
 
-void closeSpec(Spec spec)
+void closeSpec(rpmSpec spec)
 {
     OFI_t *ofi;
 
@@ -407,7 +407,7 @@ int parseSpec(rpmts ts, const char *specFile, const char *rootURL,
     const char *saveArch;
 #endif
     Package pkg;
-    Spec spec;
+    rpmSpec spec;
     
     /* Set up a new Spec structure with no packages. */
     spec = newSpec();
@@ -562,7 +562,7 @@ int parseSpec(rpmts ts, const char *specFile, const char *rootURL,
             * %{_target_cpu}, disagrees with the info in the header.
             */
            if (spec->BACount >= 1) {
-               Spec nspec = spec->BASpecs[0];
+               rpmSpec nspec = spec->BASpecs[0];
                spec->BASpecs = _free(spec->BASpecs);
                spec = freeSpec(spec);
                spec = nspec;
index 3d68ac7..e4575e0 100644 (file)
@@ -8,7 +8,7 @@
 #include "rpmbuild.h"
 #include "debug.h"
 
-int addReqProv(Spec spec, Header h, rpmTag tagN,
+int addReqProv(rpmSpec spec, Header h, rpmTag tagN,
                const char * N, const char * EVR, rpmsenseFlags Flags,
                int index)
 {
index b65380b..7f61b8c 100644 (file)
@@ -42,7 +42,7 @@ typedef enum rpmBuildFlags_e {
 #define PART_NAME     1
 
 /** \ingroup rpmbuild
- * Spec file parser states.
+ * rpmSpec file parser states.
  */
 typedef enum rpmParseState_e {
     PART_NONE          =  0,   /*!< */
@@ -148,13 +148,13 @@ extern int_32 * getBuildTime(void)        ;
  * @param strip                truncate comments?
  * @return             0 on success, 1 on EOF, <0 on error
  */
-int readLine(Spec spec, int strip);
+int readLine(rpmSpec spec, int strip);
 
 /** \ingroup rpmbuild
  * Stop reading from spec file, freeing resources.
  * @param spec         spec file control structure
  */
-void closeSpec(Spec spec);
+void closeSpec(rpmSpec spec);
 
 /** \ingroup rpmbuild
  * Truncate comment lines.
@@ -193,28 +193,28 @@ void addChangelogEntry(Header h, time_t time, const char * name,
  * @param parsePart    current rpmParseState
  * @return             >= 0 next rpmParseState, < 0 on error
  */
-int parseBuildInstallClean(Spec spec, rpmParseState parsePart);
+int parseBuildInstallClean(rpmSpec spec, rpmParseState parsePart);
 
 /** \ingroup rpmbuild
  * Parse %%changelog section of a spec file.
  * @param spec         spec file control structure
  * @return             >= 0 next rpmParseState, < 0 on error
  */
-int parseChangelog(Spec spec);
+int parseChangelog(rpmSpec spec);
 
 /** \ingroup rpmbuild
  * Parse %%description section of a spec file.
  * @param spec         spec file control structure
  * @return             >= 0 next rpmParseState, < 0 on error
  */
-int parseDescription(Spec spec);
+int parseDescription(rpmSpec spec);
 
 /** \ingroup rpmbuild
  * Parse %%files section of a spec file.
  * @param spec         spec file control structure
  * @return             >= 0 next rpmParseState, < 0 on error
  */
-int parseFiles(Spec spec);
+int parseFiles(rpmSpec spec);
 
 /** \ingroup rpmbuild
  * Parse tags from preamble of a spec file.
@@ -222,14 +222,14 @@ int parseFiles(Spec spec);
  * @param initialPackage
  * @return             >= 0 next rpmParseState, < 0 on error
  */
-int parsePreamble(Spec spec, int initialPackage);
+int parsePreamble(rpmSpec spec, int initialPackage);
 
 /** \ingroup rpmbuild
  * Parse %%prep section of a spec file.
  * @param spec         spec file control structure
  * @return             >= 0 next rpmParseState, < 0 on error
  */
-int parsePrep(Spec spec);
+int parsePrep(rpmSpec spec);
 
 /** \ingroup rpmbuild
  * Parse dependency relations from spec file and/or autogenerated output buffer.
@@ -241,7 +241,7 @@ int parsePrep(Spec spec);
  * @param tagflags     dependency flags already known from context
  * @return             0 on success, RPMERR_BADSPEC on failure
  */
-int parseRCPOT(Spec spec, Package pkg, const char * field, rpmTag tagN,
+int parseRCPOT(rpmSpec spec, Package pkg, const char * field, rpmTag tagN,
                int index, rpmsenseFlags tagflags);
 
 /** \ingroup rpmbuild
@@ -250,7 +250,7 @@ int parseRCPOT(Spec spec, Package pkg, const char * field, rpmTag tagN,
  * @param parsePart    current rpmParseState
  * @return             >= 0 next rpmParseState, < 0 on error
  */
-int parseScript(Spec spec, int parsePart);
+int parseScript(rpmSpec spec, int parsePart);
 
 /** \ingroup rpmbuild
  * Evaluate boolean expression.
@@ -258,7 +258,7 @@ int parseScript(Spec spec, int parsePart);
  * @param expr         expression to parse
  * @return
  */
-int parseExpressionBoolean(Spec spec, const char * expr);
+int parseExpressionBoolean(rpmSpec spec, const char * expr);
 
 /** \ingroup rpmbuild
  * Evaluate string expression.
@@ -266,7 +266,7 @@ int parseExpressionBoolean(Spec spec, const char * expr);
  * @param expr         expression to parse
  * @return
  */
-char * parseExpressionString(Spec spec, const char * expr);
+char * parseExpressionString(rpmSpec spec, const char * expr);
 
 /** \ingroup rpmbuild
  * Run a build script, assembled from spec file scriptlet section.
@@ -278,7 +278,7 @@ char * parseExpressionString(Spec spec, const char * expr);
  * @param test         don't execute scripts or package if testing
  * @return             0 on success, RPMERR_SCRIPT on failure
  */
-int doScript(Spec spec, int what, const char * name,
+int doScript(rpmSpec spec, int what, const char * name,
                StringBuf sb, int test);
 
 /** \ingroup rpmbuild
@@ -289,7 +289,7 @@ int doScript(Spec spec, int what, const char * name,
  * @retval pkg         package control structure
  * @return             0 on success, 1 on failure
  */
-int lookupPackage(Spec spec, const char * name, int flag,
+int lookupPackage(rpmSpec spec, const char * name, int flag,
                Package * pkg);
 
 /** \ingroup rpmbuild
@@ -297,7 +297,7 @@ int lookupPackage(Spec spec, const char * name, int flag,
  * @param spec         spec file control structure
  * @return             package control structure
  */
-Package newPackage(Spec spec);
+Package newPackage(rpmSpec spec);
 
 /** \ingroup rpmbuild
  * Destroy all packages associated with spec file.
@@ -324,7 +324,7 @@ Package  freePackage(Package pkg);
  * @param index                (0 always)
  * @return             0 always
  */
-int addReqProv(Spec spec, Header h, rpmTag tagN,
+int addReqProv(rpmSpec spec, Header h, rpmTag tagN,
                const char * N, const char * EVR, rpmsenseFlags Flags,
                int index);
 
@@ -344,20 +344,20 @@ int rpmlibNeedsFeature(Header h, const char * feature, const char * featureEVR);
  * @param test         don't execute scripts or package if testing
  * @return             0 on success
  */
-int processBinaryFiles(Spec spec, int installSpecialDoc, int test);
+int processBinaryFiles(rpmSpec spec, int installSpecialDoc, int test);
 
 /** \ingroup rpmbuild
  * Create and initialize header for source package.
  * @param spec         spec file control structure
  */
-void initSourceHeader(Spec spec);
+void initSourceHeader(rpmSpec spec);
 
 /** \ingroup rpmbuild
  * Post-build processing for source package.
  * @param spec         spec file control structure
  * @return             0 on success
  */
-int processSourceFiles(Spec spec);
+int processSourceFiles(rpmSpec spec);
 
 /** \ingroup rpmbuild
  * Parse spec file into spec control structure.
@@ -388,21 +388,21 @@ int parseSpec(rpmts ts, const char * specFile,
  * @param test         don't execute scripts or package if testing
  * @return             0 on success
  */
-int buildSpec(rpmts ts, Spec spec, int what, int test);
+int buildSpec(rpmts ts, rpmSpec spec, int what, int test);
 
 /** \ingroup rpmbuild
  * Generate binary package(s).
  * @param spec         spec file control structure
  * @return             0 on success
  */
-int packageBinaries(Spec spec);
+int packageBinaries(rpmSpec spec);
 
 /** \ingroup rpmbuild
  * Generate source package.
  * @param spec         spec file control structure
  * @return             0 on success
  */
-int packageSources(Spec spec);
+int packageSources(rpmSpec spec);
 
 #ifdef __cplusplus
 }
index 06f914a..40aa9e2 100644 (file)
@@ -1403,7 +1403,7 @@ static void printDeps(Header h)
 
 /**
  */
-static int rpmfcGenerateDependsHelper(const Spec spec, Package pkg, rpmfi fi)
+static int rpmfcGenerateDependsHelper(const rpmSpec spec, Package pkg, rpmfi fi)
 {
     StringBuf sb_stdin;
     StringBuf sb_stdout;
@@ -1477,7 +1477,7 @@ static int rpmfcGenerateDependsHelper(const Spec spec, Package pkg, rpmfi fi)
     return rc;
 }
 
-int rpmfcGenerateDepends(const Spec spec, Package pkg)
+int rpmfcGenerateDepends(const rpmSpec spec, Package pkg)
 {
     rpmfi fi = pkg->cpioList;
     rpmfc fc = NULL;
index 30171d7..cd621da 100644 (file)
@@ -157,7 +157,7 @@ int rpmfcApply(rpmfc fc);
  * @param pkg          package control
  * @return             0 on success
  */
-int rpmfcGenerateDepends(const Spec spec, Package pkg);
+int rpmfcGenerateDepends(const rpmSpec spec, Package pkg);
 
 #ifdef __cplusplus
 }
index bfe3dee..a0d3dc8 100644 (file)
@@ -3,7 +3,7 @@
 
 /** \ingroup rpmbuild
  * \file build/rpmspec.h
- *  The Spec and Package data structures used during build.
+ *  The rpmSpec and Package data structures used during build.
  */
 
 /** \ingroup rpmbuild
@@ -84,7 +84,7 @@ char **sl_lines;
 /** \ingroup rpmbuild
  * The structure used to store values parsed from a spec file.
  */
-struct Spec_s {
+struct rpmSpec_s {
     const char * specFile;     /*!< Name of the spec file. */
     const char * buildRootURL;
     const char * buildSubdir;
@@ -104,7 +104,7 @@ struct Spec_s {
     struct ReadLevelEntry * readStack;
 
     Header buildRestrictions;
-    Spec * BASpecs;
+    rpmSpec * BASpecs;
     const char ** BANames;
     int BACount;
     int recursing;             /*!< parse is recursive? */
@@ -174,17 +174,17 @@ extern "C" {
 #endif
 
 /** \ingroup rpmbuild
- * Create and initialize Spec structure.
+ * Create and initialize rpmSpec structure.
  * @return spec                spec file control structure
  */
-Spec newSpec(void);
+rpmSpec newSpec(void);
 
 /** \ingroup rpmbuild
  * Destroy Spec structure.
  * @param spec         spec file control structure
  * @return             NULL always
  */
-Spec freeSpec(Spec spec);
+rpmSpec freeSpec(rpmSpec spec);
 
 /** \ingroup rpmbuild
  * Function to query spec file(s).
@@ -205,7 +205,7 @@ struct OpenFileInfo * newOpenFileInfo(void);
  * @param tag
  * @param lang
  */
-spectag stashSt(Spec spec, Header h, int tag, const char * lang);
+spectag stashSt(rpmSpec spec, Header h, int tag, const char * lang);
 
 /** \ingroup rpmbuild
  * @param spec         spec file control structure
@@ -213,14 +213,14 @@ spectag stashSt(Spec spec, Header h, int tag, const char * lang);
  * @param field
  * @param tag
  */
-int addSource(Spec spec, Package pkg, const char * field, int tag);
+int addSource(rpmSpec spec, Package pkg, const char * field, int tag);
 
 /** \ingroup rpmbuild
  * @param spec         spec file control structure
  * @param field
  * @param tag
  */
-int parseNoSource(Spec spec, const char * field, int tag);
+int parseNoSource(rpmSpec spec, const char * field, int tag);
 
 #ifdef __cplusplus
 }
index cb67097..21dfdf4 100644 (file)
@@ -56,7 +56,7 @@ struct Source * freeSources(struct Source * s)
     return NULL;
 }
 
-int lookupPackage(Spec spec, const char *name, int flag,Package *pkg)
+int lookupPackage(rpmSpec spec, const char *name, int flag,Package *pkg)
 {
     const char *pname;
     const char *fullName;
@@ -95,7 +95,7 @@ int lookupPackage(Spec spec, const char *name, int flag,Package *pkg)
     return ((p == NULL) ? 1 : 0);
 }
 
-Package newPackage(Spec spec)
+Package newPackage(rpmSpec spec)
 {
     Package p;
     Package pp;
@@ -185,7 +185,7 @@ Package freePackages(Package packages)
 
 /**
  */
-static inline struct Source *findSource(Spec spec, int num, int flag)
+static inline struct Source *findSource(rpmSpec spec, int num, int flag)
 {
     struct Source *p;
 
@@ -195,7 +195,7 @@ static inline struct Source *findSource(Spec spec, int num, int flag)
     return NULL;
 }
 
-int parseNoSource(Spec spec, const char * field, int tag)
+int parseNoSource(rpmSpec spec, const char * field, int tag)
 {
     const char *f, *fe;
     const char *name;
@@ -239,7 +239,7 @@ int parseNoSource(Spec spec, const char * field, int tag)
     return 0;
 }
 
-int addSource(Spec spec, Package pkg, const char *field, int tag)
+int addSource(rpmSpec spec, Package pkg, const char *field, int tag)
 {
     struct Source *p;
     int flag = 0;
@@ -385,9 +385,9 @@ static inline spectags freeSt(spectags st)
     return _free(st);
 }
 
-Spec newSpec(void)
+rpmSpec newSpec(void)
 {
-    Spec spec = xcalloc(1, sizeof(*spec));
+    rpmSpec spec = xcalloc(1, sizeof(*spec));
     
     spec->specFile = NULL;
 
@@ -443,7 +443,7 @@ Spec newSpec(void)
     return spec;
 }
 
-Spec freeSpec(Spec spec)
+rpmSpec freeSpec(rpmSpec spec)
 {
     struct ReadLevelEntry *rl;
 
@@ -537,7 +537,7 @@ struct OpenFileInfo * newOpenFileInfo(void)
  * @param spec         spec file control structure
  */
 static void
-printNewSpecfile(Spec spec)
+printNewSpecfile(rpmSpec spec)
 {
     Header h;
     speclines sl = spec->sl;
@@ -633,7 +633,7 @@ printNewSpecfile(Spec spec)
 
 int rpmspecQuery(rpmts ts, QVA_t qva, const char * arg)
 {
-    Spec spec = NULL;
+    rpmSpec spec = NULL;
     Package pkg;
     char * buildRoot = NULL;
     int recursing = 0;
index da57aa7..0ad4579 100644 (file)
@@ -51,7 +51,7 @@ typedef struct rpmts_s * rpmts;
 
 /** \ingroup rpmbuild
  */
-typedef struct Spec_s * Spec;
+typedef struct rpmSpec_s * rpmSpec;
 
 /** \ingroup rpmtrans
  * Dependency tag sets from a header, so that a header can be discarded early.
index bbe89c9..c228279 100644 (file)
@@ -1315,14 +1315,14 @@ rpmtransFlags rpmtsSetFlags(rpmts ts, rpmtransFlags transFlags)
     return otransFlags;
 }
 
-Spec rpmtsSpec(rpmts ts)
+rpmSpec rpmtsSpec(rpmts ts)
 {
     return ts->spec;
 }
 
-Spec rpmtsSetSpec(rpmts ts, Spec spec)
+rpmSpec rpmtsSetSpec(rpmts ts, rpmSpec spec)
 {
-    Spec ospec = ts->spec;
+    rpmSpec ospec = ts->spec;
     ts->spec = spec;
     return ospec;
 }
index eb7112b..857b537 100644 (file)
@@ -286,7 +286,7 @@ struct rpmts_s {
 
     pgpDig dig;                        /*!< Current signature/pubkey parameters. */
 
-    Spec spec;                 /*!< Spec file control structure. */
+    rpmSpec spec;              /*!< Spec file control structure. */
 
     rpmtsScore score;          /*!< Transaction Score (autorollback). */
 
@@ -773,7 +773,7 @@ rpmtransFlags rpmtsSetFlags(rpmts ts, rpmtransFlags transFlags);
  * @param ts           transaction set
  * @return             spec control structure
  */
-Spec rpmtsSpec(rpmts ts);
+rpmSpec rpmtsSpec(rpmts ts);
 
 /** \ingroup rpmts
  * Set a spec control structure in transaction set.
@@ -781,7 +781,7 @@ Spec rpmtsSpec(rpmts ts);
  * @param spec         new spec control structure
  * @return             previous spec control structure
  */
-Spec rpmtsSetSpec(rpmts ts, Spec spec);
+rpmSpec rpmtsSetSpec(rpmts ts, rpmSpec spec);
 
 /** \ingroup rpmts
  * Get current relocate transaction element.
index 946d84a..5161c5a 100644 (file)
@@ -1205,7 +1205,7 @@ static specObject *
 spec_Parse(rpmtsObject * s, PyObject * args, PyObject * kwds)
 {
     const char * specfile;
-    Spec spec;
+    rpmSpec spec;
     char * buildRoot = NULL;
     int recursing = 0;
     char * passPhrase = "";
index aab5bd0..727c910 100644 (file)
@@ -54,7 +54,7 @@ spec_print(specObject * s)
 static PyObject * 
 spec_get_buildroot(specObject * s) 
 {
-    Spec spec = specFromSpec(s);
+    rpmSpec spec = specFromSpec(s);
     if (spec != NULL && spec->buildRootURL) {
         return Py_BuildValue("s", spec->buildRootURL);
     }
@@ -66,7 +66,7 @@ spec_get_buildroot(specObject * s)
 static PyObject * 
 spec_get_prep(specObject * s) 
 {
-    Spec spec = specFromSpec(s);
+    rpmSpec spec = specFromSpec(s);
     if (spec != NULL && spec->prep) {
         StringBuf sb = newStringBuf();
         sb=spec->prep;
@@ -80,7 +80,7 @@ spec_get_prep(specObject * s)
 static PyObject * 
 spec_get_build(specObject * s) 
 {
-    Spec spec = specFromSpec(s);
+    rpmSpec spec = specFromSpec(s);
     if (spec != NULL && spec->build) {
         StringBuf sb = newStringBuf();
         sb=spec->build;
@@ -94,7 +94,7 @@ spec_get_build(specObject * s)
 static PyObject * 
 spec_get_install(specObject * s) 
 {
-    Spec spec = specFromSpec(s);
+    rpmSpec spec = specFromSpec(s);
     if (spec != NULL && spec->install) {
         StringBuf sb = newStringBuf();
         sb=spec->install;
@@ -108,7 +108,7 @@ spec_get_install(specObject * s)
 static PyObject * 
 spec_get_clean(specObject * s) 
 {
-    Spec spec = specFromSpec(s);
+    rpmSpec spec = specFromSpec(s);
     if (spec != NULL && spec->clean) {
         StringBuf sb = newStringBuf();
         sb=spec->clean;
@@ -124,7 +124,7 @@ spec_get_sources(specObject *s)
 {
     struct Source * source;
     PyObject *sourceList, *srcUrl;
-    Spec spec;
+    rpmSpec spec;
     char * fullSource;
 
     sourceList = PyList_New(0);
@@ -206,13 +206,13 @@ PyTypeObject spec_Type = {
     0,                         /* tp_is_gc */
 };
 
-Spec specFromSpec(specObject *s) 
+rpmSpec specFromSpec(specObject *s) 
 {
     return s->spec;
 }
 
 specObject *
-spec_Wrap(Spec spec) 
+spec_Wrap(rpmSpec spec) 
 {
     specObject * s = PyObject_New(specObject, &spec_Type);
     if (s == NULL)
index afd9f06..d690983 100644 (file)
 typedef struct specObject_s {
     PyObject_HEAD
     /*type specific fields */
-    Spec spec;
+    rpmSpec spec;
 } specObject;
 
 extern PyTypeObject spec_Type;
 
 /**
  */
-Spec specFromSpec(specObject * spec);
+rpmSpec specFromSpec(specObject * spec);
 
 /**
  */
-specObject * spec_Wrap(Spec spec);
+specObject * spec_Wrap(rpmSpec spec);
 
 #endif /* RPMPYTHON_SPEC */