Bug#784556: gem2deb: should generate Build-Depends and Depends with one item per line
On 11/05/15 at 19:16 -0300, Antonio Terceiro wrote: On Mon, May 11, 2015 at 11:06:32PM +0200, Lucas Nussbaum wrote: Could you please review the attached patch? I'm not sure if we should introduce an option to disable this. But I tend to agree with you (= I can't think of a reason to not want that, ever.) Let's always do it and see if anyone complains. ;-) OK, pushed with your proposed change. Thanks for the feedback! Lucas signature.asc Description: Digital signature
Bug#784556: gem2deb: should generate Build-Depends and Depends with one item per line
On 06/05/15 at 14:36 -0300, Antonio Terceiro wrote: On Wed, May 06, 2015 at 07:21:37PM +0200, Lucas Nussbaum wrote: On 06/05/15 at 13:58 -0300, Antonio Terceiro wrote: On Wed, May 06, 2015 at 06:29:03PM +0200, Lucas Nussbaum wrote: Package: gem2deb Version: 0.15 Severity: minor Hi, It would be much nicer if gem2deb generated Build-Depends and Depends with one item per line. It makes diffing much easier. (I could make the change, but I wanted to check that I'm not the only one thinking that first) It would indeed be useful. since gem2deb already depends on devscripts anyway, why don't we just call wrap-and-sort at the end of the process? That's an even better way to achieve that! (probably with --wrap-always) I can't think of a reason to not want that, ever. Hi Antonio, Could you please review the attached patch? I'm not sure if we should introduce an option to disable this. But I tend to agree with you (= I can't think of a reason to not want that, ever.) Lucas From d11ee113a49cdaae7c3474887300677855b8ac8f Mon Sep 17 00:00:00 2001 From: Lucas Nussbaum lu...@debian.org Date: Mon, 11 May 2015 23:00:59 +0200 Subject: [PATCH] Run wrap-and-sort after generation from templates --- debian/changelog | 3 +++ lib/gem2deb/dh_make_ruby.rb| 1 + test/unit/dh_make_ruby_test.rb | 6 +++--- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/debian/changelog b/debian/changelog index 4cd68d8..8a75f14 100644 --- a/debian/changelog +++ b/debian/changelog @@ -8,6 +8,9 @@ gem2deb (0.16) UNRELEASED; urgency=medium Closes: #733171 * bin/dh-make-ruby: use '.' (current directory) as default target. Closes: #47 + * dh-make-ruby: run wrap-and-sort after generating boilerplate from +templates. test/unit/dh_make_ruby_test.rb also had to be modified +to robustify the dependencies extractor. Closes: #784556 -- Lucas Nussbaum lu...@debian.org Mon, 11 May 2015 21:10:48 +0200 diff --git a/lib/gem2deb/dh_make_ruby.rb b/lib/gem2deb/dh_make_ruby.rb index 156a4a2..97a883e 100644 --- a/lib/gem2deb/dh_make_ruby.rb +++ b/lib/gem2deb/dh_make_ruby.rb @@ -281,6 +281,7 @@ module Gem2Deb end end FileUtils.chmod 0755, 'debian/rules' + run('wrap-and-sort') end def templates diff --git a/test/unit/dh_make_ruby_test.rb b/test/unit/dh_make_ruby_test.rb index 883ef72..a96f358 100644 --- a/test/unit/dh_make_ruby_test.rb +++ b/test/unit/dh_make_ruby_test.rb @@ -134,9 +134,9 @@ class DhMakeRubyTest Gem2DebTestCase context 'dependencies' do setup do - text = File.read(File.join(DEBIANIZED_SIMPLE_GEM, 'debian/control')) - line = text.lines.find { |l| l =~ /^Depends: / }.strip - @dependencies = line.gsub(/^Depends:\s*/, '').split(/\s*,\s*/) + file = File.join(DEBIANIZED_SIMPLE_GEM, 'debian/control') + deps = `grep-dctrl -sDepends -n '' #{file}` + @dependencies = deps.split(/\s*,\s*/) end should 'get simple dependency' do assert_include @dependencies, 'ruby-dep' -- 2.1.4 signature.asc Description: Digital signature
Bug#784556: gem2deb: should generate Build-Depends and Depends with one item per line
On Mon, May 11, 2015 at 11:06:32PM +0200, Lucas Nussbaum wrote: Could you please review the attached patch? I'm not sure if we should introduce an option to disable this. But I tend to agree with you (= I can't think of a reason to not want that, ever.) Let's always do it and see if anyone complains. ;-) From d11ee113a49cdaae7c3474887300677855b8ac8f Mon Sep 17 00:00:00 2001 From: Lucas Nussbaum lu...@debian.org Date: Mon, 11 May 2015 23:00:59 +0200 Subject: [PATCH] Run wrap-and-sort after generation from templates --- debian/changelog | 3 +++ lib/gem2deb/dh_make_ruby.rb| 1 + test/unit/dh_make_ruby_test.rb | 6 +++--- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/debian/changelog b/debian/changelog index 4cd68d8..8a75f14 100644 --- a/debian/changelog +++ b/debian/changelog @@ -8,6 +8,9 @@ gem2deb (0.16) UNRELEASED; urgency=medium Closes: #733171 * bin/dh-make-ruby: use '.' (current directory) as default target. Closes: #47 + * dh-make-ruby: run wrap-and-sort after generating boilerplate from +templates. test/unit/dh_make_ruby_test.rb also had to be modified +to robustify the dependencies extractor. Closes: #784556 -- Lucas Nussbaum lu...@debian.org Mon, 11 May 2015 21:10:48 +0200 diff --git a/lib/gem2deb/dh_make_ruby.rb b/lib/gem2deb/dh_make_ruby.rb index 156a4a2..97a883e 100644 --- a/lib/gem2deb/dh_make_ruby.rb +++ b/lib/gem2deb/dh_make_ruby.rb @@ -281,6 +281,7 @@ module Gem2Deb end end FileUtils.chmod 0755, 'debian/rules' + run('wrap-and-sort') I would make the call instead at the end of #build_in_directory, like this: diff --git a/lib/gem2deb/dh_make_ruby.rb b/lib/gem2deb/dh_make_ruby.rb index 156a4a2..91359a8 100644 --- a/lib/gem2deb/dh_make_ruby.rb +++ b/lib/gem2deb/dh_make_ruby.rb @@ -186,9 +186,14 @@ module Gem2Deb other_files test_suite create_debian_boilerplates +wrap_and_sort end end +def wrap_and_sort + run('wrap-and-sort') +end + def read_upstream_source_info read_metadata('.') initialize_binary_package -- Antonio Terceiro terce...@debian.org signature.asc Description: Digital signature
Bug#784556: gem2deb: should generate Build-Depends and Depends with one item per line
On Wed, May 06, 2015 at 06:29:03PM +0200, Lucas Nussbaum wrote: Package: gem2deb Version: 0.15 Severity: minor Hi, It would be much nicer if gem2deb generated Build-Depends and Depends with one item per line. It makes diffing much easier. (I could make the change, but I wanted to check that I'm not the only one thinking that first) It would indeed be useful. since gem2deb already depends on devscripts anyway, why don't we just call wrap-and-sort at the end of the process? -- Antonio Terceiro terce...@debian.org signature.asc Description: Digital signature
Bug#784556: gem2deb: should generate Build-Depends and Depends with one item per line
Package: gem2deb Version: 0.15 Severity: minor Hi, It would be much nicer if gem2deb generated Build-Depends and Depends with one item per line. It makes diffing much easier. (I could make the change, but I wanted to check that I'm not the only one thinking that first) Thanks, Lucas -- System Information: Debian Release: 8.0 APT prefers stable APT policy: (990, 'stable'), (500, 'stable-updates'), (500, 'oldstable'), (300, 'unstable'), (150, 'experimental') Architecture: amd64 (x86_64) Foreign Architectures: i386 Kernel: Linux 3.16.0-4-amd64 (SMP w/4 CPU cores) Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Init: systemd (via /run/systemd/system) Versions of packages gem2deb depends on: ii build-essential 11.7 ii debhelper9.20150101 ii devscripts 2.15.3 ii gem2deb-test-runner 0.15 ii perl 5.20.2-3 ii ruby 1:2.1.5 ii ruby-all-dev 1:2.1.5 ii ruby-setup 3.4.1-7 Versions of packages gem2deb recommends: ii apt-file 2.5.4 gem2deb suggests no packages. -- no debconf information -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#784556: gem2deb: should generate Build-Depends and Depends with one item per line
On 06/05/15 at 13:58 -0300, Antonio Terceiro wrote: On Wed, May 06, 2015 at 06:29:03PM +0200, Lucas Nussbaum wrote: Package: gem2deb Version: 0.15 Severity: minor Hi, It would be much nicer if gem2deb generated Build-Depends and Depends with one item per line. It makes diffing much easier. (I could make the change, but I wanted to check that I'm not the only one thinking that first) It would indeed be useful. since gem2deb already depends on devscripts anyway, why don't we just call wrap-and-sort at the end of the process? That's an even better way to achieve that! (probably with --wrap-always) Lucas signature.asc Description: Digital signature
Bug#784556: gem2deb: should generate Build-Depends and Depends with one item per line
On Wed, May 06, 2015 at 07:21:37PM +0200, Lucas Nussbaum wrote: On 06/05/15 at 13:58 -0300, Antonio Terceiro wrote: On Wed, May 06, 2015 at 06:29:03PM +0200, Lucas Nussbaum wrote: Package: gem2deb Version: 0.15 Severity: minor Hi, It would be much nicer if gem2deb generated Build-Depends and Depends with one item per line. It makes diffing much easier. (I could make the change, but I wanted to check that I'm not the only one thinking that first) It would indeed be useful. since gem2deb already depends on devscripts anyway, why don't we just call wrap-and-sort at the end of the process? That's an even better way to achieve that! (probably with --wrap-always) I can't think of a reason to not want that, ever. -- Antonio Terceiro terce...@debian.org signature.asc Description: Digital signature