[DRE-commits] [gem2deb] 01/01: dh_ruby: only ask questions interactively when called by gem2deb
Antonio Terceiro
terceiro at moszumanska.debian.org
Fri Jul 31 12:42:20 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 082884d6460a55d8f8eb1c975aadd1046579dc68
Author: Antonio Terceiro <terceiro at debian.org>
Date: Fri Jul 31 09:41:26 2015 -0300
dh_ruby: only ask questions interactively when called by gem2deb
---
bin/gem2deb | 2 ++
debian/changelog | 6 ++++++
lib/gem2deb/dh_ruby.rb | 7 ++++++-
3 files changed, 14 insertions(+), 1 deletion(-)
diff --git a/bin/gem2deb b/bin/gem2deb
index 61109f5..70c0905 100755
--- a/bin/gem2deb
+++ b/bin/gem2deb
@@ -118,6 +118,8 @@ exit(0) if $only_source_dir
puts
puts "-- Building Debian package ..."
+ENV['DEB_BUILD_OPTIONS'] =
+ [ENV['DEB_BUILD_OPTIONS'], 'dh_ruby_interactive'].compact.join(' ')
dmr.buildpackage($only_debian_source, $check_build_deps)
puts "-- Debian package successfully built!"
diff --git a/debian/changelog b/debian/changelog
index 168de0c..a23905e 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+gem2deb (0.20.3) UNRELEASED; urgency=medium
+
+ * dh_ruby: only ask questions interactively when called by gem2deb
+
+ -- Antonio Terceiro <terceiro at debian.org> Fri, 31 Jul 2015 09:40:58 -0300
+
gem2deb (0.20.2) unstable; urgency=medium
* gem2deb-test-runner: include version-independent rubygems-integration
diff --git a/lib/gem2deb/dh_ruby.rb b/lib/gem2deb/dh_ruby.rb
index 37c88b7..7440283 100644
--- a/lib/gem2deb/dh_ruby.rb
+++ b/lib/gem2deb/dh_ruby.rb
@@ -112,7 +112,7 @@ module Gem2Deb
return
end
end
- if STDIN.isatty and STDOUT.isatty and STDERR.isatty
+ if interactive
# running interactively
continue = nil
begin
@@ -132,6 +132,11 @@ module Gem2Deb
end
end
+ def interactive
+ STDIN.isatty && STDOUT.isatty && STDERR.isatty &&
+ ENV['DEB_BUILD_OPTIONS'].split.include?('dh_ruby_interactive')
+ end
+
def run_tests
ruby_versions.each do |rubyver|
run_tests_for_version(rubyver)
--
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