int readLine(rpmSpec spec, int strip)
{
-#ifdef DYING
- const char *arch;
- const char *os;
-#endif
char *s;
int match;
struct ReadLevelEntry *rl;
}
}
-#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)
{
rpmParseState parsePart = PART_PREAMBLE;
int initialPackage = 1;
-#ifdef DYING
- const char *saveArch;
-#endif
Package pkg;
rpmSpec spec;
/* 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)
spec = freeSpec(spec);
return RPMERR_BADSPEC;
}
-#ifdef DYING
- rpmSetMachine(saveArch, NULL);
- saveArch = _free(saveArch);
-#else
delMacro(NULL, "_target_cpu");
-#endif
index++;
}
/* 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)) {
}
-#ifdef DYING
- myos = _free(myos);
-#else
platform = _free(platform);
arch = _free(arch);
os = _free(os);
-#endif
}
closeSpec(spec);