Dirk Mueller
cd26e86b5f
* only update if hostarch isn't there OBS-URL: https://build.opensuse.org/package/show/Base:System/rpm?expand=0&rev=546
27 lines
1.0 KiB
Diff
27 lines
1.0 KiB
Diff
--- ./build/parseSpec.c.orig 2019-10-02 12:38:51.836127743 +0000
|
|
+++ ./build/parseSpec.c 2019-10-02 12:52:33.818447657 +0000
|
|
@@ -926,7 +926,22 @@ static rpmSpec parseSpec(const char *spe
|
|
&(spec->buildrequires));
|
|
break;
|
|
case PART_BUILD:
|
|
- parsePart = parseSimpleScript(spec, "%build", &(spec->build));
|
|
+ if (spec->build) {
|
|
+ rpmlog(RPMLOG_ERR, _("line %d: second %s\n"), spec->lineNum, "%build");
|
|
+ parsePart = PART_ERROR;
|
|
+ break;
|
|
+ }
|
|
+ spec->build = newStringBuf();
|
|
+ appendLineStringBuf(spec->build,
|
|
+ "ref=/usr/lib/rpm; testarch=$(uname -m)\n"
|
|
+ "for s in guess sub; do\n"
|
|
+ " for c in $(find -maxdepth 8 -name \"config.$s\"); do\n"
|
|
+ " grep -q config-patches@ $c || continue\n"
|
|
+ " grep -q $testarch\\[-:\\] $c || install -m 755 $ref/config.$s $c\n"
|
|
+ " done\n"
|
|
+ "done\n"
|
|
+ );
|
|
+ parsePart = parseLines(spec, STRIP_NOTHING, NULL, &(spec->build));
|
|
break;
|
|
case PART_INSTALL:
|
|
parsePart = parseSimpleScript(spec, "%install", &(spec->install));
|