From 82cb2da422db2f86aa3a81e5cfc9537ce4ab8e9f Mon Sep 17 00:00:00 2001 From: Florian Festi Date: Mon, 18 Sep 2023 17:18:32 +0200 Subject: [PATCH] Always start parsing in the main package even on secondary parse runs --- build/parsePreamble.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/build/parsePreamble.c b/build/parsePreamble.c index 72f375bb2c..d4706564ce 100644 --- a/build/parsePreamble.c +++ b/build/parsePreamble.c @@ -962,11 +962,13 @@ int parsePreamble(rpmSpec spec, int initialPackage) NVR = xstrdup(name); pkg = newPackage(NVR, spec->pool, &spec->packages); headerPutString(pkg->header, RPMTAG_NAME, NVR); + } else if (spec->sourcePackage) { + NVR = xstrdup("(main package)"); + pkg = spec->packages; } else { NVR = xstrdup("(main package)"); pkg = newPackage(NULL, spec->pool, &spec->packages); spec->sourcePackage = newPackage(NULL, spec->pool, NULL); - } if ((rc = readLine(spec, STRIP_TRAILINGSPACE | STRIP_COMMENTS)) > 0) {