[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#942261: reportbug: When searching for executables in packages, consider full PATH not first match



Package: reportbug
Version: 7.5.3
Severity: normal

Hi,

I just noticed this issue with reportbug;

$ reportbug date
*** Welcome to reportbug.  Use ? for help at prompts. ***
Note: bug reports are publicly archived (including the email address of the submitter).
Detected character set: UTF-8
Please change your locale if this is incorrect.

Using 'Witold Baryluk <witold.baryluk@gmail.com>' as your from address.
Getting status for date...
W: Unable to locate package date
No matching source or binary packages.
A package named "date" does not appear to be installed; do you want to search for a similar-looking filename in an installed
package [Y|n|q|?]? 
Finding package for 'date'...
Resolved as '/usr/bin/date'.
No packages match.
This package does not appear to be installed; continue with this report [y|N|q|?]? 
reportbug: exiting due to user interrupt.
$

$ echo $PATH
/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games
$


$ dpkg -S /usr/bin/date
dpkg-query: no path found matching pattern /usr/bin/date
$

$ dpkg -S /bin/date
coreutils: /bin/date
$

$ ls -l / | grep bin
lrwxrwxrwx   1 root root    7 Oct 10 14:23 bin -> usr/bin
lrwxrwxrwx   1 root root    8 Oct 10 14:23 sbin -> usr/sbin
$


reportbug can probably be smarter here about this.

There might be multiple ways to solve this problem, but one of the
simpler ones might be to inspect all elements of PATH, or add special
cases for {/usr,}/bin and {/usr,}/sbin.

Best regards,
Witold


-- Package-specific info:
** Environment settings:
INTERFACE="text"

** /home/user/.reportbugrc:
reportbug_version "7.5.3"
mode standard
ui text
realname "Witold Baryluk"
email "witold.baryluk@gmail.com"
no-cc
list-cc-me
smtphost reportbug.debian.org

-- System Information:
Debian Release: bullseye/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 5.2.0-3-amd64 (SMP w/32 CPU cores)
Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages reportbug depends on:
ii  apt                1.8.4
ii  python3            3.7.5-1
ii  python3-reportbug  7.5.3
ii  sensible-utils     0.0.12

reportbug recommends no packages.

Versions of packages reportbug suggests:
ii  claws-mail                                 3.17.4-1+b1
pn  debconf-utils                              <none>
ii  debsums                                    2.2.3
pn  dlocate                                    <none>
ii  emacs-bin-common                           1:26.3+1-1
ii  exim4-daemon-light [mail-transport-agent]  4.92.2-3+b1
ii  file                                       1:5.37-5
ii  gnupg                                      2.2.17-3
ii  python3-urwid                              2.0.1-2+b1
pn  reportbug-gtk                              <none>
ii  xdg-utils                                  1.1.3-1

Versions of packages python3-reportbug depends on:
ii  apt                1.8.4
ii  file               1:5.37-5
ii  python3            3.7.5-1
ii  python3-apt        1.8.4
ii  python3-debian     0.1.36
ii  python3-debianbts  2.8.2
ii  python3-requests   2.21.0-1
ii  sensible-utils     0.0.12

python3-reportbug suggests no packages.

-- no debconf information


Reply to: