[Rpm-maint] [rpm-software-management/rpm] platform: Ensure empty buildroot for %install (#1039)

Panu Matilainen notifications at github.com
Wed Feb 5 08:41:58 UTC 2020


pmatilai commented on this pull request.



> @@ -67,6 +67,20 @@
 #==============================================================================
 # ---- Build policy macros.
 #
+
+%__buildroot_clean %{__rm} -rf "%{buildroot}"} \
+    %{__mkdir_p} "%{dirname:%{buildroot}}"\
+    %{__mkdir} "%{buildroot}"\
+%{nil}
+
+#---------------------------------------------------------------------
+#	Expanded at beginning of %install scriptlet.
+#
+
+%__spec_install_pre %{___build_pre}\
+   %{?buildroot:%{?__buildroot_clean}}\
+%{nil}
+
 #---------------------------------------------------------------------

The test whether buildroot is defined is still there.
Oh and one more thing: I think the name "clean" sends the wrong message here, it's easily associated with the %clean section when that's not the case at all. The simplest way to eliminate the naming question would be just putting this all into %__spec_install_pre directly (ie without making it a function). It's not like this is going to be useful in any other section.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/1039#pullrequestreview-353541877
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20200205/e20f8d66/attachment-0001.html>


More information about the Rpm-maint mailing list