diff options
author | Hans de Graaff <graaff@gentoo.org> | 2019-07-25 09:05:28 +0200 |
---|---|---|
committer | Hans de Graaff <graaff@gentoo.org> | 2019-07-27 09:13:50 +0200 |
commit | 1410e0cfd031874130877994872c094fa68c9584 (patch) | |
tree | 111745fa2e8040fd410968268140b889954b0766 /eclass | |
parent | ruby-fakegem.eclass: change default DOC recipe to use rdoc (diff) | |
download | gentoo-1410e0cfd031874130877994872c094fa68c9584.tar.gz gentoo-1410e0cfd031874130877994872c094fa68c9584.tar.bz2 gentoo-1410e0cfd031874130877994872c094fa68c9584.zip |
ruby-fakegem.eclass: warn about using the fallback gemspec
The fallback gemspec does not contain dependencies so it will only
work for packages without any runtime gem dependencies. It is easy to
use it by mistake when switching from a gem to a source-based archive,
because the source-based archive does not contain the generated
metadata, but RUBY_FAKEGEM_GEMSPEC has not been set yet. This warning
alerts developers to this situation and encourages them to set
RUBY_FAKEGEM_GEMSPEC instead.
Signed-off-by: Hans de Graaff <graaff@gentoo.org>
Diffstat (limited to 'eclass')
-rw-r--r-- | eclass/ruby-fakegem.eclass | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/eclass/ruby-fakegem.eclass b/eclass/ruby-fakegem.eclass index 33a9e453f564..a6a7654f9e6d 100644 --- a/eclass/ruby-fakegem.eclass +++ b/eclass/ruby-fakegem.eclass @@ -295,6 +295,15 @@ ruby_fakegem_metadata_gemspec() { # See RUBY_FAKEGEM_NAME and RUBY_FAKEGEM_VERSION for setting name and version. # See RUBY_FAKEGEM_REQUIRE_PATHS for setting extra require paths. ruby_fakegem_genspec() { + case ${EAPI} in + 4|5|6) ;; + *) + eqawarn "Generating generic fallback gemspec *without* dependencies" + eqawarn "This will only work when there are no runtime dependencies" + eqawarn "Set RUBY_FAKEGEM_GEMSPEC to generate a proper specifications file" + ;; + esac + local required_paths="'lib'" for path in ${RUBY_FAKEGEM_REQUIRE_PATHS}; do required_paths="${required_paths}, '${path}'" |