[DRE-commits] [gem2deb] 01/01: Gem2Deb::Metadata: fail the build if gemspec fails to load
Antonio Terceiro
terceiro at moszumanska.debian.org
Tue Mar 15 14:58:32 UTC 2016
This is an automated email from the git hooks/post-receive script.
terceiro pushed a commit to branch master
in repository gem2deb.
commit 486bc274fc7e027063ad899542ea35258462472a
Author: Antonio Terceiro <terceiro at debian.org>
Date: Tue Mar 15 11:56:13 2016 -0300
Gem2Deb::Metadata: fail the build if gemspec fails to load
---
debian/changelog | 13 ++++++++-----
lib/gem2deb/metadata.rb | 3 +++
2 files changed, 11 insertions(+), 5 deletions(-)
diff --git a/debian/changelog b/debian/changelog
index dd7f187..ba4593b 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,10 +1,13 @@
gem2deb (0.30) UNRELEASED; urgency=medium
- * Gem2Deb::Metadata: workaround git usage in gemspecs. The fact that Debian
- source packages are *not* git repositories makes it necessary to patch
- upstream gemspec to drop usage of `git ls-files` in several packages. This
- change makes gem2deb try to override that with sane defaults for a Debian
- package. (Closes: #800933)
+ * Gem2Deb::Metadata:
+ - workaround git usage in gemspecs. The fact that Debian source packages
+ are *not* git repositories makes it necessary to patch upstream gemspec to
+ drop usage of `git ls-files` in several packages. This change makes
+ gem2deb try to override that with sane defaults for a Debian package.
+ (Closes: #800933)
+ - fail the build if there is a gemspec in the source package but we fail
+ to load it.
* gem2deb-test-runner: when dependency resolution is requested, fail if
there is no working source gemspec to read the package name from.
diff --git a/lib/gem2deb/metadata.rb b/lib/gem2deb/metadata.rb
index f07007f..cfc25c8 100644
--- a/lib/gem2deb/metadata.rb
+++ b/lib/gem2deb/metadata.rb
@@ -112,6 +112,9 @@ module Gem2Deb
if @gemspec.nil?
@gemspec = load_modified_gemspec(gemspec_files.first)
end
+ if @gemspec.nil?
+ raise "E: cannot load gemspec #{gemspec_files.first}"
+ end
else
unless gemspec_files.empty?
raise "More than one .gemspec file in this directory: #{gemspec_files.join(', ')}"
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ruby-extras/gem2deb.git
More information about the Pkg-ruby-extras-commits
mailing list