@pmatilai commented on this pull request.


> -         goto exit;
-       }
-       if (rstreq(buildRoot, "/")) {
-           rpmlog(RPMLOG_ERR, _("%%{buildroot} can not be \"/\"\n"));
-           goto exit;
+       if (!spec->buildDir) {
+           /* Grab top builddir on first entry as we'll override _builddir */
+           if (!rpmMacroIsDefined(spec->macros, "_top_builddir")) {
+               char *top_builddir = rpmExpand("%{_builddir}", NULL);
+               rpmPushMacroFlags(spec->macros, "_top_builddir", NULL,
+                               top_builddir, RMIL_GLOBAL, RPMMACRO_LITERAL);
+               free(top_builddir);
+           }
+
+           /* Using release here causes a buildid no-recompute test to fail */
+           spec->buildDir = 
rpmExpand("%{_top_builddir}/%{NAME}-%{VERSION}-%{_arch}", NULL);

Oh and FWIW, I would love to get the full build paths somehow abstracted out 
anyhow. I don't know how much is really doable in that space, but on systems 
that support this kind of stuff, builds would run temp directory inside their 
build directory and writes limited to their own build directory, bind-mounted 
so that the build thinks its running in /build directory instead of 
/home/whatever/somewhere path etc.

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

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

Reply via email to