Eliminate parseSpec() from librpmbuild, trim unused arguments
authorPanu Matilainen <pmatilai@redhat.com>
Wed, 1 Sep 2010 14:09:34 +0000 (17:09 +0300)
committerPanu Matilainen <pmatilai@redhat.com>
Wed, 1 Sep 2010 14:09:34 +0000 (17:09 +0300)
- We can't keep compatibility while eliminating goo like transaction set
  from the arguments so dont bother trying.

build/parseSpec.c
build/rpmbuild.h

index f48a132..aa3c42b 100644 (file)
@@ -519,9 +519,9 @@ static void addTargets(Package Pkgs)
 
 extern int noLang;             /* XXX FIXME: pass as arg */
 
-int parseSpec(rpmts ts, const char *specFile, const char *rootDir,
-               const char *buildRoot, int recursing, const char *passPhrase,
-               const char *cookie, int anyarch, int force)
+static int parseSpec(rpmts ts, const char *specFile, 
+               const char *buildRoot, int recursing,
+               int anyarch, int force)
 {
     rpmParseState parsePart = PART_PREAMBLE;
     int initialPackage = 1;
@@ -627,8 +627,7 @@ int parseSpec(rpmts ts, const char *specFile, const char *rootDir,
                    continue;
                addMacro(NULL, "_target_cpu", NULL, spec->BANames[x], RMIL_RPMRC);
                spec->BASpecs[index] = NULL;
-               if (parseSpec(ts, specFile, NULL, buildRoot, 1,
-                                 NULL, NULL, anyarch, force)
+               if (parseSpec(ts, specFile, buildRoot, 1, anyarch, force)
                 || (spec->BASpecs[index] = rpmtsSetSpec(ts, NULL)) == NULL)
                {
                        spec->BACount = index;
@@ -703,7 +702,7 @@ rpmSpec rpmSpecParse(const char *specFile, rpmSpecFlags flags,
     rpmts ts = rpmtsCreate();
     rpmSpec spec = NULL;
 
-    if (parseSpec(ts, specFile, NULL, buildRoot, 0, NULL, NULL,
+    if (parseSpec(ts, specFile, buildRoot, 0,
                  (flags & RPMSPEC_ANYARCH), (flags & RPMSPEC_FORCE)) == 0) {
        spec = rpmtsSetSpec(ts, NULL);
     }
index a923909..cf98153 100644 (file)
@@ -82,27 +82,6 @@ rpmSpec rpmSpecParse(const char *specFile, rpmSpecFlags flags,
                     const char *buildRoot);
 
 /** \ingroup rpmbuild
- * Parse spec file into spec control structure.
- * @param ts           transaction set (spec file control in ts->spec)
- * @param specFile
- * @param rootDir      (unused)
- * @param buildRoot
- * @param recursing    parse is recursive?
- * @param passPhrase   (unused)
- * @param cookie       (unused)
- * @param anyarch
- * @param force
- * @return
- */
-int parseSpec(rpmts ts, const char * specFile,
-               const char * rootDir,
-               const char * buildRoot,
-               int recursing,
-               const char * passPhrase,
-               const char * cookie,
-               int anyarch, int force);
-
-/** \ingroup rpmbuild
  * Build stages state machine driver.
  * @param buildArgs    build arguments
  * @param spec         spec file control structure