Ubuntu Pastebin

Paste from mwhudson at Wed, 30 Mar 2016 22:48:30 +0000

Download as text
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
diff --git a/debian/changelog b/debian/changelog
index 5a7b1f9..d92b257 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+dh-golang (1.12ubuntu1) xenial; urgency=medium
+
+  * Follow /usr/bin/go symlink when computing Built-Using. (LP: #1564124)
+
+ -- Michael Hudson-Doyle <michael.hudson@canonical.com>  Thu, 31 Mar 2016 11:42:07 +1300
+
 dh-golang (1.12) unstable; urgency=medium
 
   [ Hilko Bengen ]
diff --git a/script/dh_golang b/script/dh_golang
index fad7998..cfc56d3 100755
--- a/script/dh_golang
+++ b/script/dh_golang
@@ -111,8 +111,10 @@ if (defined($build_depends) && $build_depends ne '') {
                                 map { flatten($_) }
                                 $deps->get_deps());
     if ($golang_deps ne '') {
-        $built_using = `dpkg-query -f='\${source:Package} (= \${source:Version}), ' -W $golang_deps`;
+        $golang_deps .= " ";
     }
+    $golang_deps .= `dpkg-query --search \$(readlink -f \$(which go)) | cut -d: -f1`;
+    $built_using = `dpkg-query -f='\${source:Package} (= \${source:Version}), ' -W $golang_deps`;
 }
 
 # If there is an easier way to have a universal misc:Built-Using on all binary
Download as text