Skip to content

Commit

Permalink
Always start parsing in the main package
Browse files Browse the repository at this point in the history
even on secondary parse runs
  • Loading branch information
ffesti committed Sep 19, 2023
1 parent 184808c commit 82cb2da
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion build/parsePreamble.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 82cb2da

Please sign in to comment.