openSUSE / obs-service-source_validator

The default source validator as used by openSUSE:Factory distribution
GNU General Public License v2.0
3 stars 25 forks source link

Errornously warns about macro in Version line, when multiple lines match #142

Open s-t-e-v-e-n-k opened 1 month ago

s-t-e-v-e-n-k commented 1 month ago

Given the following spec file which has a version set correctly, and then writes out a file with a macro so we don't duplicate information

% grep "^Version: " python-tpm2-pytss.spec
Version:        2.3.0
Version:        %{version}
Running source_service 'source_validator' ...
WARNING: macro used in version line
packager is responsible that the resulting string
is non-empty and contains no "-".
----------
cat <<EOF > PKG-INFO
Metadata-Version: 1.1
Version:        %{version}
EOF
export CFLAGS="%{optflags}"
----------
dirkmueller commented 2 weeks ago

hmm, so this is beyond the current capabilities of the shell/grep based spec file "parsing". I was planning on a larger rewrite anyhow, maybe for hack week.