summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPanu Matilainen <pmatilai@redhat.com>2019-11-08 12:27:37 +0200
committerPanu Matilainen <pmatilai@redhat.com>2019-11-18 12:46:29 +0200
commita0f691b4028c23a3ed578a670660def0d5d9abd4 (patch)
tree516d92e04bb1d4c0e84edae070848acd98e40368
parent097027e5226bfd12276d3701696ed35a54b8feab (diff)
downloadrpm-a0f691b4028c23a3ed578a670660def0d5d9abd4.tar.gz
Fix Icon tag crash on src.rpm build, regression in 4.15.0 (RhBug:1769579)
Commit e68eb68c4a6c3635b8cf58a05277f7da49058d16 introduced a regression on Icon tag causing a crash on source rpm build, due to spec->numSources being off by one if an icon was present. A nicer fix would be eliminating numSources entirely but it's not as easy as it should be due to dynamic buildrequires messing with it, leaving that for another time. (cherry picked from commit 4e1fe6af0b9b2d3155605e4416dbbb7d7cf09e35)
-rw-r--r--build/parsePreamble.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/build/parsePreamble.c b/build/parsePreamble.c
index f29434276..c4799e9e5 100644
--- a/build/parsePreamble.c
+++ b/build/parsePreamble.c
@@ -893,6 +893,7 @@ static rpmRC handlePreambleTag(rpmSpec spec, Package pkg, rpmTagVal tag,
SINGLE_TOKEN_ONLY;
if (addIcon(pkg, field))
goto exit;
+ spec->numSources++;
break;
case RPMTAG_NOSOURCE:
case RPMTAG_NOPATCH: