[ruby: 5/5] Fix "invalid regex" warning for non-rubygem packages (rhbz#1154067).
Vít Ondruch
vondruch at fedoraproject.org
Thu Oct 30 13:02:24 UTC 2014
commit 4375d5ca30bd504cc01fef2239e430db2f5b23a1
Author: Vít Ondruch <vondruch at redhat.com>
Date: Thu Oct 30 13:59:52 2014 +0100
Fix "invalid regex" warning for non-rubygem packages (rhbz#1154067).
ruby.spec | 1 +
rubygems.attr | 4 +++-
2 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/ruby.spec b/ruby.spec
index 18aee30..e1f6dbf 100644
--- a/ruby.spec
+++ b/ruby.spec
@@ -865,6 +865,7 @@ make check TESTS="-v $DISABLE_TESTS"
* Wed Oct 29 2014 Vít Ondruch <vondruch at redhat.com> - 2.1.4-23
- Update to Ruby 2.1.4.
- Include only vendor directories, not their content (rhbz#1114071).
+- Fix "invalid regex" warning for non-rubygem packages (rhbz#1154067).
- Use load macro introduced in RPM 4.12.
* Mon Aug 18 2014 Fedora Release Engineering <rel-eng at lists.fedoraproject.org>
diff --git a/rubygems.attr b/rubygems.attr
index f711775..f033d43 100644
--- a/rubygems.attr
+++ b/rubygems.attr
@@ -1,3 +1,5 @@
%__rubygems_requires %{_rpmconfigdir}/rubygems.req
%__rubygems_provides %{_rpmconfigdir}/rubygems.prov
-%__rubygems_path ^%{gem_spec}$
+# In non-gem packages, the %%{gem_name} macro is not available and the macro
+# stays unexpanded which leads to "invalid regex" error (rhbz#1154067).
+%__rubygems_path ^%{?gem_name:%{gem_spec}}%{!?gem_name:this_should_never_match_anything}$
More information about the scm-commits
mailing list