From 29b504fa55c31bb3f438037e5b83e1b64697b4ed Mon Sep 17 00:00:00 2001 From: Robert-André Mauchin Date: Jun 24 2019 22:47:59 +0000 Subject: Expand listfiles_include and listfiles_exclude in condition listfiles_include and listfiles_exclude can contain multiline data that should be expanded, otherwise it breaks the if condition on newlines. --- diff --git a/macros.fedora-misc b/macros.fedora-misc index 3bd1498..a73b7c5 100644 --- a/macros.fedora-misc +++ b/macros.fedora-misc @@ -12,9 +12,9 @@ # Arguments passed to the macro without flags will be interpreted as inclusion # globs. %listfiles(i:x:) %{expand: -%if "%{?-i*}%{?listfiles_include}%*" != "" +%if "%{?-i*}%{expand:?listfiles_include}%*" != "" listfiles_include=$(realpath -e --relative-base=. %{?-i*} %{?listfiles_include} %* | sort -u) - %if "%{?-x*}%{?listfiles_exclude}" != "" + %if "%{?-x*}%{expand:?listfiles_exclude}" != "" while IFS= read -r finc ; do realpath -qe --relative-base=. %{?-x*} %{?listfiles_exclude} \\ | sort -u | grep -q "${finc}" || echo "${finc}"