diff options
Diffstat (limited to 'build/parseSpec.c')
-rw-r--r-- | build/parseSpec.c | 49 |
1 files changed, 0 insertions, 49 deletions
diff --git a/build/parseSpec.c b/build/parseSpec.c index 382f12124..72effbd8b 100644 --- a/build/parseSpec.c +++ b/build/parseSpec.c @@ -207,10 +207,6 @@ static int copyNextLine(rpmSpec spec, OFI_t *ofi, int strip) int readLine(rpmSpec spec, int strip) { -#ifdef DYING - const char *arch; - const char *os; -#endif char *s; int match; struct ReadLevelEntry *rl; @@ -268,13 +264,6 @@ retry: } } -#ifdef DYING - arch = NULL; - rpmGetArchInfo(&arch, NULL); - os = NULL; - rpmGetOsInfo(&os, NULL); -#endif - /* Copy next file line into the spec line buffer */ if ((rc = copyNextLine(spec, ofi, strip)) != 0) { if (rc == RPMERR_UNMATCHEDIF) @@ -405,9 +394,6 @@ int parseSpec(rpmts ts, const char *specFile, const char *rootURL, { rpmParseState parsePart = PART_PREAMBLE; int initialPackage = 1; -#ifdef DYING - const char *saveArch; -#endif Package pkg; rpmSpec spec; @@ -521,13 +507,7 @@ int parseSpec(rpmts ts, const char *specFile, const char *rootURL, /* Skip if not arch is not compatible. */ if (!rpmMachineScore(RPM_MACHTABLE_BUILDARCH, spec->BANames[x])) continue; -#ifdef DYING - rpmGetMachine(&saveArch, NULL); - saveArch = xstrdup(saveArch); - rpmSetMachine(spec->BANames[x], NULL); -#else addMacro(NULL, "_target_cpu", NULL, spec->BANames[x], RMIL_RPMRC); -#endif spec->BASpecs[index] = NULL; if (parseSpec(ts, specFile, spec->rootURL, buildRootURL, 1, passPhrase, cookie, anyarch, force) @@ -537,12 +517,7 @@ int parseSpec(rpmts ts, const char *specFile, const char *rootURL, spec = freeSpec(spec); return RPMERR_BADSPEC; } -#ifdef DYING - rpmSetMachine(saveArch, NULL); - saveArch = _free(saveArch); -#else delMacro(NULL, "_target_cpu"); -#endif index++; } @@ -578,29 +553,9 @@ int parseSpec(rpmts ts, const char *specFile, const char *rootURL, /* Check for description in each package and add arch and os */ { -#ifdef DYING - const char *arch = NULL; - const char *os = NULL; - char *myos = NULL; - - rpmGetArchInfo(&arch, NULL); - rpmGetOsInfo(&os, NULL); - /* - * XXX Capitalizing the 'L' is needed to insure that old - * XXX os-from-uname (e.g. "Linux") is compatible with the new - * XXX os-from-platform (e.g "linux" from "sparc-*-linux"). - * XXX A copy of this string is embedded in headers. - */ - if (!strcmp(os, "linux")) { - myos = xstrdup(os); - *myos = 'L'; - os = myos; - } -#else const char *platform = rpmExpand("%{_target_platform}", NULL); const char *arch = rpmExpand("%{_target_cpu}", NULL); const char *os = rpmExpand("%{_target_os}", NULL); -#endif for (pkg = spec->packages; pkg != NULL; pkg = pkg->next) { if (!headerIsEntry(pkg->header, RPMTAG_DESCRIPTION)) { @@ -622,13 +577,9 @@ int parseSpec(rpmts ts, const char *specFile, const char *rootURL, } -#ifdef DYING - myos = _free(myos); -#else platform = _free(platform); arch = _free(arch); os = _free(os); -#endif } closeSpec(spec); |