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
Macros that are undefined are passed through literally. The
original reason was so that section markers like %prep could
be overloaded with identically named macros.
(aside) The two lines that need to be added to
make an undefined macro expansion an error have been in
the code, either under an #ifdef or commented out, since 1998.
There is a %{!?foo:...} ("if not defined") construct and a %error primitive that
can be combined to produce an error msg when a macro is undefined.
But that's hardly "easy".
This message is a reminder that Fedora 12 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 12. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as WONTFIX if it remains open with a Fedora
'version' of '12'.
Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version'
to a later Fedora version prior to Fedora 12's end of life.
Bug Reporter: Thank you for reporting this issue and we are sorry that
we may not be able to fix it before Fedora 12 is end of life. If you
would still like to see this bug fixed and are able to reproduce it
against a later version of Fedora please change the 'version' of this
bug to the applicable version. If you are unable to change the version,
please add a comment here and someone will do it for you.
Although we aim to fix as many bugs as possible during every release's
lifetime, sometimes those efforts are overtaken by events. Often a
more recent Fedora release includes newer upstream software that fixes
bugs or makes them obsolete.
This message is a notice that Fedora 14 is now at end of life. Fedora
has stopped maintaining and issuing updates for Fedora 14. It is
Fedora's policy to close all bug reports from releases that are no
longer maintained. At this time, all open bugs with a Fedora 'version'
of '14' have been closed as WONTFIX.
(Please note: Our normal process is to give advanced warning of this
occurring, but we forgot to do that. A thousand apologies.)
Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, feel free to reopen
this bug and simply change the 'version' to a later Fedora version.
Bug Reporter: Thank you for reporting this issue and we are sorry that
we were unable to fix it before Fedora 14 reached end of life. If you
would still like to see this bug fixed and are able to reproduce it
against a later version of Fedora, you are encouraged to click on
"Clone This Bug" (top right of this page) and open it against that
version of Fedora.
Although we aim to fix as many bugs as possible during every release's
lifetime, sometimes those efforts are overtaken by events. Often a
more recent Fedora release includes newer upstream software that fixes
bugs or makes them obsolete.
Description of problem: only-if- defined. but-error- if-not- defined as "%{undefinedtag}" quietly expands to "%{undefinedtag}".
There is %{?tag} for expand-
There is no easy way to do expand-
Version-Release number of selected component (if applicable): 4.7.2-1. fc12.x86_ 64
rpm-build-
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: rpm/check- files /.../BUILDROOT/ undefinedtag- 1-1%{undefinedt ag}.x86_ 64
Checking for unpackaged file(s): /usr/lib/
0
Expected results: spec:4: "undefinedtag" is not defined
Error at undefinedtag.
1