RPM

Comment 1 for bug 638623

Revision history for this message
In , Jan (jan-redhat-bugs) wrote :

Description of problem:
There is %{?tag} for expand-only-if-defined.
There is no easy way to do expand-but-error-if-not-defined as "%{undefinedtag}" quietly expands to "%{undefinedtag}".

Version-Release number of selected component (if applicable):
rpm-build-4.7.2-1.fc12.x86_64

How reproducible:
Always.

Steps to Reproduce:
cat >undefinedtag.spec <<EOH
Summary: undefinedtag
Name: undefinedtag
Version: 1
Release: 1%{undefinedtag}
License: GPLv3+
%description
undefinedtag
EOH
rpmbuild -bb undefinedtag.spec
echo $?

Actual results:
Checking for unpackaged file(s): /usr/lib/rpm/check-files /.../BUILDROOT/undefinedtag-1-1%{undefinedtag}.x86_64
0

Expected results:
Error at undefinedtag.spec:4: "undefinedtag" is not defined
1