Grr, this patch!

On 3 May 2016 at 10:05, Michael Hudson-Doyle
<michael.hud...@canonical.com> wrote:
> Much simpler patch.
>
> On 3 May 2016 at 09:02, Michael Hudson-Doyle
> <michael.hud...@canonical.com> wrote:
>> On 3 May 2016 at 05:21, Tianon Gravi <admwig...@gmail.com> wrote:
>>> On 1 May 2016 at 03:41, Michael Hudson-Doyle <michael.hud...@ubuntu.com> 
>>> wrote:
>>>> dh_golang can fail when compiling with gccgo because in this case it's 
>>>> possible
>>>> for go list to report no dependencies at all. Patch coming as soon as I 
>>>> get a
>>>> bug number :-)
>>>
>>> Couldn't this also be fixed by just adding "-r" to the "xargs" invocation?
>>
>> Ah TIL, yes. That would be easier :-)
>>
>> Cheers,
>> mwh
From 1ac10deabc29d593fb4f9ed7136243cf2b523d95 Mon Sep 17 00:00:00 2001
From: Michael Hudson-Doyle <michael.hud...@canonical.com>
Date: Sun, 1 May 2016 22:50:00 +1200
Subject: [PATCH] Yet another corner case in dh_golang, this one only shows up
 with gccgo. (Closes: 823136)

---
 debian/changelog | 7 +++++++
 script/dh_golang | 4 ++--
 2 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index c943d98..b1d9f76 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+dh-golang (1.17) UNRELEASED; urgency=medium
+
+  * Yet another corner case in dh_golang, this one only shows up with gccgo.
+    (Closes: 823136)
+
+ -- Michael Hudson-Doyle <michael.hud...@ubuntu.com>  Sun, 01 May 2016 22:28:04 +1200
+
 dh-golang (1.16) unstable; urgency=medium
 
   [ Michael Hudson-Doyle ]
diff --git a/script/dh_golang b/script/dh_golang
index d39523b..391b2a9 100755
--- a/script/dh_golang
+++ b/script/dh_golang
@@ -64,10 +64,10 @@ while (<$inp>) {
 close($inp);
 close($outp);
 
-system("cat $tmpdir/realgodirs | xargs dpkg-query --search > $tmpdir/pkgs") == 0
+system("cat $tmpdir/realgodirs | xargs -r dpkg-query --search > $tmpdir/pkgs") == 0
     or die "dpkg-query --search failed with code $?, $!";
 
-my $built_using = `cut -d: -f1 $tmpdir/pkgs | sort -u | xargs dpkg-query -f='\${source:Package} (= \${source:Version}), ' -W`;
+my $built_using = `cut -d: -f1 $tmpdir/pkgs | sort -u | xargs -r dpkg-query -f='\${source:Package} (= \${source:Version}), ' -W`;
 if ($? != 0) {
     die "dpkg-query -W failed with code $?, $!";
 }
-- 
2.7.4

Reply via email to