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 - 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 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}$