[DRE-commits] [SCM] gem2deb.git branch, master, updated. 0.3.1-23-ge069485

Antonio Terceiro terceiro at debian.org
Thu May 30 21:36:40 UTC 2013


The following commit has been merged in the master branch:
commit cc9820df0f159e8071258366a730b12266605f9c
Author: Antonio Terceiro <terceiro at debian.org>
Date:   Thu May 30 17:43:51 2013 -0300

    Fix CHANGELOG installation for multi-binary packages

diff --git a/lib/gem2deb/installer.rb b/lib/gem2deb/installer.rb
index b55082e..f594390 100644
--- a/lib/gem2deb/installer.rb
+++ b/lib/gem2deb/installer.rb
@@ -272,8 +272,8 @@ module Gem2Deb
     end
 
     def install_changelog
-      Dir.glob(File.join(root, 'CHANGELOG*')).each do |changelog|
-        changelog = File.basename(changelog)
+      changelog = Dir.glob(File.join(root, 'CHANGELOG*')).first
+      if changelog
         run("dh_installchangelogs -p#{binary_package} #{changelog} upstream")
       end
     end
diff --git a/test/integration/gem2deb_test.rb b/test/integration/gem2deb_test.rb
index d32e7ec..6095a9d 100644
--- a/test/integration/gem2deb_test.rb
+++ b/test/integration/gem2deb_test.rb
@@ -37,6 +37,20 @@ class Gem2DebTest < Gem2DebTestCase
     end
   end
 
+  self.build_tree('test/sample/examples') do |dir|
+
+    should 'not compress *.rb files installed as examples' do
+      assert_no_file_exists "#{dir}/debian/ruby-examples/usr/share/doc/ruby-examples/examples/test.rb.gz"
+      assert_file_exists "#{dir}/debian/ruby-examples/usr/share/doc/ruby-examples/examples/test.rb"
+    end
+
+    should 'install CHANGELOG.rdoc as upstream changelog' do
+      changelog = "#{dir}/debian/ruby-examples/usr/share/doc/ruby-examples/changelog.gz"
+      assert_file_exists changelog
+    end
+
+  end
+
   self.build_tree('test/sample/multibinary') do |dir|
     context "multibinary source package" do
       should "install foo in ruby-foo" do
@@ -51,21 +65,10 @@ class Gem2DebTest < Gem2DebTestCase
       should 'install bar.rb ruby-bar' do
         assert_file_exists "#{dir}/debian/ruby-bar/usr/lib/ruby/vendor_ruby/bar.rb"
       end
+      should 'support installing upstream CHANGELOG in multibinary package' do
+        assert_file_exists "#{dir}/debian/ruby-bar/usr/share/doc/ruby-bar/changelog.gz"
+      end
     end
   end
 
-  self.build_tree('test/sample/examples') do |dir|
-
-    should 'not compress *.rb files installed as examples' do
-      assert_no_file_exists "#{dir}/debian/ruby-examples/usr/share/doc/ruby-examples/examples/test.rb.gz"
-      assert_file_exists "#{dir}/debian/ruby-examples/usr/share/doc/ruby-examples/examples/test.rb"
-    end
-
-    should 'install CHANGELOG.rdoc as upstream changelog' do
-      changelog = "#{dir}/debian/ruby-examples/usr/share/doc/ruby-examples/changelog.gz"
-      assert_file_exists changelog
-    end
-
-  end
-
 end
diff --git a/test/sample/examples/CHANGELOG.rdoc b/test/sample/multibinary/bar/CHANGELOG.md
similarity index 100%
copy from test/sample/examples/CHANGELOG.rdoc
copy to test/sample/multibinary/bar/CHANGELOG.md

-- 
gem2deb.git



More information about the Pkg-ruby-extras-commits mailing list