Skip to content

Commit

Permalink
RPM packaging: use %global inside %{!?...}
Browse files Browse the repository at this point in the history
According to
https://www.redhat.com/archives/fedora-devel-list/2010-January/msg00093.html

scope of %define lasts until the end brace; earlier RPM up to Fedora 12
didn't necessarily honor the scope, but later versions corrected the bug.

Problem and solution both pointed out by Todd Zullinger.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Junio C Hamano committed Jan 31, 2010
1 parent 6ddf75a commit 9f7a3c1
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion git.spec.in
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ BuildRequires: perl(Error)
Perl interface to Git

%define path_settings ETC_GITCONFIG=/etc/gitconfig prefix=%{_prefix} mandir=%{_mandir} htmldir=%{_docdir}/%{name}-%{version}
%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}

%prep
%setup -q
Expand Down Expand Up @@ -192,6 +192,9 @@ rm -rf $RPM_BUILD_ROOT
# No files for you!

%changelog
* Sun Jan 31 2010 Junio C Hamano <gitster@pobox.com>
- Do not use %define inside %{!?...} construct.

* Sat Jan 30 2010 Junio C Hamano <gitster@pobox.com>
- We don't ship Python bits until a real foreign scm interface comes.

Expand Down

0 comments on commit 9f7a3c1

Please sign in to comment.