Package: devscripts
Version: 2.21.3+deb11u1
Tags: patch

When I invoke `dget -a serf', I get packages not only related to
serf but also golang-github-hashicorp-serf.

This is due to dget using `apt-cache showsrc <pkg-name>' in its
code when it should rather use `apt-cache showsrc --only-source
<pkg-name>'.

The issue can be fixed with a following change:

[~] > diff -Nur /usr/bin/dget /usr/bin/dget.patched
--- /usr/bin/dget       2021-08-18 18:02:14.000000000 +0300
+++ /usr/bin/dget.patched       2023-01-05 09:59:35.730472903 +0200
@@ -516,7 +516,7 @@
         and $arg =~ /^([a-z0-9.+-:]{2,})(?:=([a-zA-Z0-9.:~+-]+))?$/) {
         my ($source, $version, $arch) = ($1, $2);
         ($source, $arch) = split(/:/, $source, 2);
-        my $cmd = "apt-cache showsrc $source";
+        my $cmd = "apt-cache showsrc --only-source $source";
         # unfortunately =version doesn't work here, and even if it did, was the
         # user referring to the source version or the binary version?  The code
         # assumes binary version.

[~] > uname -a
Linux juno 5.10.0-19-amd64 #1 SMP Debian 5.10.149-2 (2022-10-21)
x86_64 GNU/Linux
[~] > ls -l /lib/x86_64-linux-gnu/libc.so.6
lrwxrwxrwx 1 root root 12 elo    27 00:32
/lib/x86_64-linux-gnu/libc.so.6 -> libc-2.31.so

Reply via email to