rpmbuild does not do expand with %if %with(...)
Bug #651490 reported by
Jeff Johnson
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
RPM |
New
|
Undecided
|
Unassigned | ||
Fedora |
Won't Fix
|
Medium
|
Bug Description
tracker
tags: | added: macros rpmbuild |
tags: | added: rhel |
Changed in fedora: | |
importance: | Unknown → Medium |
status: | Unknown → Won't Fix |
To post a comment you must log in.
Description of problem:
Sometimes rpmbuild do does not do expand with %if %with(...)
Version-Release number of selected component (if applicable):
rpm-build- 4.4.2.3- 18.el5
How reproducible:
100%
Steps to Reproduce: %define _extension .gz} /%{name} -%{version} -%{release} -root-% (%{__id_ u} -n) ROOT%{_ infodir} alternatives: 1}%{!?with_ alternatives: 0} ROOT%{_ infodir} /gperf- ace.info% {_extension} -,root, root,-) /gperf- ace.info% {_extension}
1. cat > test.spec
# for testing
%bcond_without alternatives
%{!?_extension:
Name: test
Version: 1.0
Release: 1%{?dist}
Summary: Just a test
Group: Testing
License: BSD
BuildRoot: %{_tmppath}
%description
Just a Joke
%prep
true
%build
true
%install
rm -rf $RPM_BUILD_ROOT
install -d $RPM_BUILD_
#%if %{?with_
%if %with(alternatives)
echo ft | gzip > $RPM_BUILD_
%endif
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(
%doc
%{_infodir}
%changelog
2. rpmbuild -bb test.spec
Actual results: test-1. 0-1.el5- root-root/ usr/share/ info/gperf- ace.info% {_extension}
error: File not found: /var/tmp/
Expected results: test-1. 0-1.el5- root-root/ usr/share/ info/gperf- ace.info. gz
rpmbuild expand the correct result: /var/tmp/
Additional info:
replace '%if %with(alternati ves)' with '%if %{?with_ alternatives: 1}%{!?with_ alternatives: 0}' could temporaryly fix this proble.
replace '%if %with(alternati ves)' with '%if %{?with_ alternatives: 1}%{!?with_ alternatives: 0}' could temporaryly fix this problem.
replace '%{!?_extension :%define _extension .gz}' with '%{!?_extension :%global _extension .gz}' could temporaryly fix this problem.