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

Bug#983314: linux-base: perf fails to report that linux-perf-5.10 is not installed



Hi,

On Fri, Feb 26, 2021 at 06:47:57AM +0100, Salvatore Bonaccorso wrote:
> Control: tags -1 + confirmed
> 
> Hi Bart,
> 
> On Mon, Feb 22, 2021 at 11:57:56AM +0100, Bart Martens wrote:
> > Package: linux-base
> > Version: 4.6
> > Severity: minor
> > File: /usr/bin/perf
> > 
> > Observed behavior:
> > 
> > $ perf
> > /usr/bin/perf: line 13: exec: perf_5.10: not found
> > 
> > Expected behavior:
> > 
> > $ perf
> > /usr/bin/perf: line 14: exec: perf_5.10: not found
> > E: linux-perf-5.10 is not installed.
> 
> That's intersting, confirmed. The script is the same since the buster
> release without changes, but it looks it behaves differently in a buster
> vs.  unstable/bullseye environment when the replacement ${version%%-*}
> is involved after the version setting:
> 
> ,---- [ perf-minimal ]
> | #!/bin/bash
> |
> | version="$(uname -r)"
> | version="${version%%-*}"
> | shopt -s execfail
> | exec "perf_$version" "$@"
> | echo >&2 "E: not installed."
> | exit 1
> `----
> 
> In an buster environment:
> 
> ++ uname -r
> + version=4.19.0-14-amd64
> + version=4.19.0
> + shopt -s execfail
> + exec perf_4.19.0
> ./perf-minimal: line 6: exec: perf_4.19.0: not found
> + echo 'E: not installed.'
> E: not installed.
> + exit 1
> 
> In an unstable environment:
> 
> bash -x ./perf-minimal 
> ++ uname -r
> + version=4.19.0-14-amd64
> + version=4.19.0
> + shopt -s execfail
> + exec perf_4.19.0
> ./perf-minimal: line 6: exec: perf_4.19.0: not found

Experimenting further a bit, and set up a buster system then only
updated bash seems to trigger the issue:

root@bash-test:~# ./perf-minimal
./perf-minimal: line 6: exec: perf_4.19.0: not found
E: not installed.
root@bash-test:~# apt-get install bash
Reading package lists... Done
Building dependency tree
Reading state information... Done
Suggested packages:
  bash-doc
Recommended packages:
  bash-completion
The following packages will be upgraded:
  bash
1 upgraded, 0 newly installed, 0 to remove and 213 not upgraded.
Need to get 1,417 kB of archives.
After this operation, 31.7 kB of additional disk space will be used.
Get:1 http://deb.debian.org/debian bullseye/main amd64 bash amd64 5.1-2+b1 [1,417 kB]
Fetched 1,417 kB in 0s (14.8 MB/s)
(Reading database ... 20940 files and directories currently installed.)
Preparing to unpack .../bash_5.1-2+b1_amd64.deb ...
Unpacking bash (5.1-2+b1) over (5.0-4) ...
Setting up bash (5.1-2+b1) ...
update-alternatives: using /usr/share/man/man7/bash-builtins.7.gz to provide /usr/share/man/man7/builtins.7.gz (builtins.7.gz) in auto mode
root@bash-test:~# ./perf-minimal
./perf-minimal: line 6: exec: perf_4.19.0: not found
root@bash-test:~#

Regards,
Salvatore


Reply to: