Hello,
I've encountered an issue while doing an update to vagrant-libvirt 0.5.3.
```
DEBUG: + echo 'gemspec_file =
'\''../vagrant-libvirt-0.5.3.gemspec'\''
DEBUG:
DEBUG: name = '\''rexml'\''
DEBUG: requirements = nil
DEBUG:
DEBUG: type = :runtime
DEBUG:
DEBUG: spec = Gem::Specification.load(gemspec_file)
DEBUG: abort("#{gemspec_file} is not accessible.") unless spec
DEBUG:
DEBUG: dep = spec.dependencies.detect { |d| d.type == type && d.name ==
name }
DEBUG: if dep
DEBUG: dep.requirement.concat requirements
DEBUG: else
DEBUG: spec.public_send "add_#{type}_dependency", name, requirements
DEBUG: end
DEBUG: File.write gemspec_file, spec.to_ruby'
DEBUG: + ruby
DEBUG: /usr/share/rubygems/rubygems/requirement.rb:146:in `concat':
undefined method `flatten' for nil:NilClass (NoMethodError)
DEBUG: from -:13:in `<main>'
```
This is caused by (I've already removed it; and it works now):
```
-# Rexml needs to be required since Ruby 3.0.
-#
https://github.com/vagrant-libvirt/vagrant-libvirt/pull/1277
-%gemspec_add_dep -g rexml -s ../%{vagrant_plugin_name}-%{version}.gemspec
```
As this would be an empty change (rexml was already added), and
`requirements` is `nil`, this is not expected use.
Should we enhance the macros to cover this case with a proper error message?
Regards,
Pavel
Additional notes:
https://github.com/rubygems/rubygems/blob/3387dbf66d3721f1a25ea60d6bab8fd...
https://src.fedoraproject.org/rpms/vagrant-libvirt/pull-request/7