@dmnks commented on this pull request.
> if (initialPackage) {
if (checkForRequiredForBuild(pkg->header)) {
goto exit;
}
- char *buildRoot = rpmGetPath(spec->buildRoot, NULL);
- free(spec->buildRoot);
- spec->buildRoot = buildRoot;
- rpmPushMacro(spec->macros, "buildroot", NULL, spec->buildRoot,
RMIL_SPEC);
- if (*buildRoot == '\0') {
- rpmlog(RPMLOG_ERR, _("%%{buildroot} couldn't be empty\n"));
- goto exit;
+ /* Grab the top builddir on first entry as we'll override _builddir */
+ if (!rpmMacroIsDefined(spec->macros, "_top_builddir")) {
+ rpmPushMacro(spec->macros, "_top_builddir", NULL, "%{_builddir}",
This seems wrong, indeed; the value is (recursively) expanded through
`%{_top_builddir}` in the `rpmExpand()` call right away, *but* that call only
happens if `spec->buildDir` is unset.
--
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/2885#discussion_r1511453725
You are receiving this because you are subscribed to this thread.
Message ID: <rpm-software-management/rpm/pull/2885/review/1914788...@github.com>
_______________________________________________
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint