mirror of
https://github.com/clearlinux/common.git
synced 2026-04-28 11:03:48 +00:00
Restrict query to spec sections above %files
In Clear Linux OS, all package spec files define their header fields (and other required sections, like %description) above the first %files section. Restricting the `rpmspec` queries to sections of %files speeds up the command significantly, most notably for `texlive`, which has the largest spec file. Signed-off-by: Patrick McCarty <patrick.mccarty@intel.com>
This commit is contained in:
@@ -49,9 +49,10 @@ endef
|
||||
|
||||
# Query the spec file (or spec files) listed in argument 2 for the field(s)
|
||||
# specified in argument 1. The fields are derived from the source rpm(s)
|
||||
# generated by the specs.
|
||||
# generated by the specs. Queried fields that are declared within the spec file
|
||||
# must be declared above the first %files section.
|
||||
define queryspec
|
||||
rpmspec --define='_vendor clr' --srpm --query --queryformat='$(1)' $(2)
|
||||
rpmspec --define='_vendor clr' --srpm --query --queryformat='$(1)' <(sed -n '1,/%files/p' $(2))
|
||||
endef
|
||||
|
||||
# If GITOLITE_BASE_URL is defined, sets a repo's push URL for that gitolite
|
||||
|
||||
Reference in New Issue
Block a user