From e227e8722b03a5d7d3ec240223b043e2eb94308f Mon Sep 17 00:00:00 2001 From: Patrick McCarty Date: Mon, 14 Dec 2020 03:52:58 +0000 Subject: [PATCH] Use %{NVR} queryformat when possible The `%{NVR}` format is equivalent to `%{NAME}-%{VERSION]-%{RELEASE}`. Signed-off-by: Patrick McCarty --- Makefile.common | 2 +- Makefile.toplevel | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile.common b/Makefile.common index 185f176..2e76d7a 100644 --- a/Makefile.common +++ b/Makefile.common @@ -11,7 +11,7 @@ SHELL = /bin/bash SPECFILE = $(addsuffix .spec, $(PKG_NAME)) -SRPMVERS = $(shell [ ! -f $(SPECFILE) ] || $(call queryspec,%{NAME}-%{VERSION}-%{RELEASE}\n,$(SPECFILE))) +SRPMVERS = $(shell [ ! -f $(SPECFILE) ] || $(call queryspec,%{NVR}\n,$(SPECFILE))) SRPMFILE = results/$(SRPMVERS).src.rpm LATEST_RPMS = $(wildcard rpms/*.rpm) diff --git a/Makefile.toplevel b/Makefile.toplevel index 66f74cf..23fb97b 100644 --- a/Makefile.toplevel +++ b/Makefile.toplevel @@ -184,7 +184,7 @@ versions: $(PACKAGES_FILE) $(addprefix packages/,$(PKGS_LOCAL)) #help releases: Like 'make versions', but also displays the release number. releases: $(PACKAGES_FILE) $(addprefix packages/,$(PKGS_LOCAL)) @for p in $(addprefix packages/,$(PKGS_LOCAL)); do \ - (cd $$p; if ls *.spec &> /dev/null; then $(call queryspec,%{NAME}-%{VERSION}-%{RELEASE}\n,*.spec) | head -n1; fi) ;\ + (cd $$p; if ls *.spec &> /dev/null; then $(call queryspec,%{NVR}\n,*.spec) | head -n1; fi) ;\ done #help provides: Is used to find out which RPM package provides some file.