@pmatilai 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}",

Oh indeed. The logic for setting %builddir does work, but %_top_builddir will 
end up pointing to %builddir instead which is not the intention.

I'll fixup and make all these macros use RPMMACRO_LITERAL, that's the right 
thing here really.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/2885#discussion_r1512242474
You are receiving this because you are subscribed to this thread.

Message ID: <rpm-software-management/rpm/pull/2885/review/1916040...@github.com>
_______________________________________________
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint

Reply via email to