fix: rpm -q --specfile --specedit now works even with BuildArch:.

CVS patchset: 2887
CVS date: 1999/03/12 18:20:06
This commit is contained in:
jbj 1999-03-12 18:20:06 +00:00
parent c50cdee669
commit aaaf86cfe1
3 changed files with 22 additions and 7 deletions

View File

@ -1,5 +1,6 @@
2.91 -> 2.92
- fix: --target=arch works.
- fix: rpm --target=arch ... resurrected.
- fix: rpm -q --specfile --specedit now works even with BuildArch:.
2.90 -> 2.91
- fix: memory leaks in rpmRunTransactions plugged.

View File

@ -379,11 +379,14 @@ int parseSpec(Spec *specp, const char *specFile, const char *buildRoot,
}
if (parsePart == PART_BUILDARCHITECTURES) {
#if 0 /* XXX W2DO??? */
spec->buildArchitectureSpecs =
malloc(sizeof(Spec) * spec->buildArchitectureCount);
x = 0;
#else
spec->buildArchitectureSpecs = newSpec();
#endif
index = 0;
while (x < spec->buildArchitectureCount) {
for (x = 0; x < spec->buildArchitectureCount; x++) {
if (rpmMachineScore(RPM_MACHTABLE_BUILDARCH,
spec->buildArchitectures[x])) {
rpmGetMachine(&saveArch, NULL);
@ -400,7 +403,6 @@ int parseSpec(Spec *specp, const char *specFile, const char *buildRoot,
free(saveArch);
index++;
}
x++;
}
spec->buildArchitectureCount = index;
if (! index) {
@ -408,6 +410,18 @@ int parseSpec(Spec *specp, const char *specFile, const char *buildRoot,
rpmError(RPMERR_BADSPEC, _("No buildable architectures"));
return RPMERR_BADSPEC;
}
/* XXX HACK: swap BuildArch sl/st with child */
if (spec->sl && spec->st) {
Spec nspec = *spec->buildArchitectureSpecs;
struct speclines *sl = spec->sl;
struct spectags *st = spec->st;
spec->sl = nspec->sl;
spec->st = nspec->st;
nspec->sl = sl;
nspec->st = st;
}
closeSpec(spec);
*specp = spec;
return 0;

View File

@ -7,7 +7,7 @@
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"POT-Creation-Date: 1999-03-12 09:17-0500\n"
"POT-Creation-Date: 1999-03-12 13:03-0500\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@ -2152,11 +2152,11 @@ msgstr ""
msgid "Timecheck value must be an integer: %s"
msgstr ""
#: ../build/parseSpec.c:408
#: ../build/parseSpec.c:410
msgid "No buildable architectures"
msgstr ""
#: ../build/parseSpec.c:436
#: ../build/parseSpec.c:450
msgid "Package has no %%description: %s"
msgstr ""