[DRE-commits] [gem2deb] 01/01: Fix dependency checks under autopkgtest

Antonio Terceiro terceiro at moszumanska.debian.org
Sat Jun 13 15:14:58 UTC 2015


This is an automated email from the git hooks/post-receive script.

terceiro pushed a commit to branch master
in repository gem2deb.

commit 1e1c5b9081998f10e06ddff2eb048f53d66879f9
Author: Antonio Terceiro <terceiro at debian.org>
Date:   Sat Jun 13 12:14:50 2015 -0300

    Fix dependency checks under autopkgtest
---
 debian/changelog           |  7 +++++++
 lib/gem2deb/test_runner.rb | 12 +++++++-----
 2 files changed, 14 insertions(+), 5 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index d723f7b..dde964f 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+gem2deb (0.18.2) UNRELEASED; urgency=medium
+
+  * gem2deb-test-runner: when under autopkgtest, don't pass any GEM_PATH at
+    all, no even an empty one. This fixes dependency checks under autopkgtest.
+
+ -- Antonio Terceiro <terceiro at debian.org>  Sat, 13 Jun 2015 12:13:45 -0300
+
 gem2deb (0.18.1) unstable; urgency=medium
 
   * gem2deb-test-runner: include `Gem.path` in GEM_PATH so that dependency
diff --git a/lib/gem2deb/test_runner.rb b/lib/gem2deb/test_runner.rb
index c237d3f..250664b 100644
--- a/lib/gem2deb/test_runner.rb
+++ b/lib/gem2deb/test_runner.rb
@@ -52,11 +52,13 @@ module Gem2Deb
       dirs
     end
 
-    def gem_path
+    def env_with_gem_path
       if self.autopkgtest
-        ''
+        { }
       else
-        (Gem.path + Dir.glob('debian/*/usr/share/rubygems-integration/*')).join(':')
+        {
+          'GEM_PATH' => (Gem.path + Dir.glob('debian/*/usr/share/rubygems-integration/*')).join(':')
+        }
       end
     end
 
@@ -71,8 +73,8 @@ module Gem2Deb
       metadata = Gem2Deb::Metadata.new('.')
       if metadata.gemspec
         cmd = [rubyver, '-e', 'gem "%s"' % metadata.name]
-        puts "GEM_PATH=#{gem_path} " + cmd.shelljoin
-        system({ 'GEM_PATH' => gem_path }, *cmd)
+        puts "GEM_PATH=#{env_with_gem_path['GEM_PATH']} " + cmd.shelljoin
+        system(env_with_gem_path, *cmd)
         exitstatus = $?.exitstatus
         if exitstatus != 0
           exit(exitstatus)

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