@dmnks commented on this pull request.


> +Spec parts cannot include preamble tags or directives that are needed for, or
+influence, the build process. This includes all build scriptlets, sources and
+patches, *BuildRequires*, *BuildArch* (except for *noarch* sub-packages),
+*BuildSystem*, *ExcludeArch*, *ExclusiveArch*, *ExcludeOS* and *ExclusiveOS*.
+These will terminate the build with an error if encountered in a spec part.
+Declaring macros meant to be used in build scriptlets is not an error, however
+they will not influence the build for obvious reasons.
+
+Generally, _.specpart_ files should be generated by separate executables 
invoked
+from build scriptlets rather than by the scriptlets directly. This is to ensure
+that the spec syntax written to such files is not interpreted prematurely (that
+is, when the spec file is read) as that could have an unintended side effect on
+the build process. Spec directives starting at the beginning of the line should
+thus be avoided entirely as they would be interpreted right away.
+
+*$RPM_SPECPARTS_DIR* is created automatically at the start of the build, and

The exact build stage (as documented in the `rpmbuild(1)` manual) is not that 
important in this context (and not even mentioned in the `rpm-spec(5)` manual 
at all) so let's keep it as-is.

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

Message ID: <rpm-software-management/rpm/pull/4299/review/[email protected]>
_______________________________________________
Rpm-maint mailing list
[email protected]
https://lists.rpm.org/mailman/listinfo/rpm-maint

Reply via email to