RPM

%{undefinedtag} expands to itself without an error

Bug #638623 reported by Jeff Johnson
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
RPM
New
Undecided
Unassigned
Fedora
Won't Fix
Medium

Bug Description

tracker

Tags: fedora macros
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

Revision history for this message
In , Jeff (jeff-redhat-bugs) wrote :

Yes.

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".

Jeff Johnson (n3npq)
tags: added: fedora macros
Revision history for this message
In , Bug (bug-redhat-bugs) wrote :

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.

The process we are following is described here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

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

rpm-build-4.8.1-5.fc14.x86_64

Revision history for this message
In , Fedora (fedora-redhat-bugs) wrote :

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.

The process we are following is described here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Changed in fedora:
importance: Unknown → Medium
status: Unknown → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.