From: sashiko-bot@kernel.org
To: "Arnaldo Carvalho de Melo" <acme@kernel.org>
Cc: linux-perf-users@vger.kernel.org
Subject: Re: [PATCH 2/7] perf build: Add install-build-deps framework to install devel packages
Date: Fri, 14 Aug 2026 00:45:52 +0000 [thread overview]
Message-ID: <20260814004558.E8B801F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260810193506.18949-3-acme@kernel.org>
Thank you for your contribution! Sashiko AI review found 3 potential issue(s) to consider:
- [Low] The `--distro` option's error message suggests `rhel` and `debian` as valid choices, but the script then rejects them as unsupported.
- [Low] The local variable `pkg` is declared but never used.
- [Low] Sourcing `/etc/os-release` without existence checks or stderr redirection leaks error messages on unsupported systems.
--
--- Patch [2]: [PATCH 2/7] perf build: Add install-build-deps framework to install devel packages ---
commit f7444376f9bbb9f83dcea58b5ac3f7286c4455dd
Author: Arnaldo Carvalho de Melo <acme@redhat.com>
perf build: Add install-build-deps framework to install devel packages
This patch adds a 'make -C tools/perf install-build-deps' target and a
companion script to automatically install the development packages needed
to build perf. The script includes distro detection and handles the base
toolchain packages for Fedora and Ubuntu.
> diff --git a/tools/perf/scripts/install-build-deps.sh b/tools/perf/scripts/install-build-deps.sh
> new file mode 100755
> index 0000000000000..6b9a1142f32ac
> --- /dev/null
> +++ b/tools/perf/scripts/install-build-deps.sh
[ ... ]
> +detect_distro() {
> + if [ -n "$DISTRO" ]; then
> + echo "$DISTRO"
> + return
> + fi
> + local id
> + id=$( . /etc/os-release && echo "${ID:-}" )
[Severity: Low]
Is it possible for a minimal container to lack /etc/os-release?
If so, sourcing it without an existence check or stderr redirection will
print a "No such file or directory" error to the terminal. Does this
contradict the commit message's goal of avoiding error spew in fresh
containers?
[ ... ]
> +main() {
> + local action="install"
> + local srcdir distro pkgs pkg cmd
[Severity: Low]
This isn't a bug, but it looks like the local variable pkg is declared
here but never used in the main() function.
> +
> + while [ $# -gt 0 ]; do
> + case "$1" in
> + --list) action="list"; shift ;;
> + --dry-run) action="dry-run"; shift ;;
> + --distro)
> + [ $# -ge 2 ] || {
> + echo "error: --distro requires an argument (fedora, rhel, ubuntu, debian)" >&2
[Severity: Low]
This error message suggests "rhel" and "debian" as valid options, but the
distro validation block later in main() explicitly rejects them as
unsupported.
Could this error message be updated to only list the distros that are
actually supported by the script?
> + exit 1
> + }
> + DISTRO="$2"; shift 2 ;;
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260810193506.18949-1-acme@kernel.org?part=2
next prev parent reply other threads:[~2026-08-14 0:45 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-10 19:34 [PATCHES v4 0/7] perf build: Add target to install devel packages needed to build perf Arnaldo Carvalho de Melo
2026-08-10 19:35 ` [PATCH 1/7] tools build: Only probe the compiler at parse time when it is installed Arnaldo Carvalho de Melo
2026-08-10 19:35 ` [PATCH 2/7] perf build: Add install-build-deps framework to install devel packages Arnaldo Carvalho de Melo
2026-08-14 0:45 ` sashiko-bot [this message]
2026-08-10 19:35 ` [PATCH 3/7] perf build: install-build-deps: add Fedora devel package mapping Arnaldo Carvalho de Melo
2026-08-10 19:35 ` [PATCH 4/7] perf build: install-build-deps: add Ubuntu " Arnaldo Carvalho de Melo
2026-08-10 19:35 ` [PATCH 5/7] perf build: install-build-deps: add Debian " Arnaldo Carvalho de Melo
2026-08-10 19:35 ` [PATCH 6/7] perf build: Remove leftover feature tests for removed cxx and clang support Arnaldo Carvalho de Melo
2026-08-10 19:35 ` [PATCH 7/7] perf build: install-build-deps: add RHEL family devel package mapping Arnaldo Carvalho de Melo
-- strict thread matches above, loose matches on Subject: below --
2026-08-11 18:28 [PATCHES v9 0/7] perf build: Add target to install devel packages needed to build perf Arnaldo Carvalho de Melo
2026-08-11 18:28 ` [PATCH 2/7] perf build: Add install-build-deps framework to install devel packages Arnaldo Carvalho de Melo
2026-08-11 15:19 [PATCHES v8 0/7] perf build: Add target to install devel packages needed to build perf Arnaldo Carvalho de Melo
2026-08-11 15:19 ` [PATCH 2/7] perf build: Add install-build-deps framework to install devel packages Arnaldo Carvalho de Melo
2026-08-11 1:28 [PATCHES v7 0/7] perf build: Add target to install devel packages needed to build perf Arnaldo Carvalho de Melo
2026-08-11 1:29 ` [PATCH 2/7] perf build: Add install-build-deps framework to install devel packages Arnaldo Carvalho de Melo
2026-08-11 0:46 [PATCHES v6 0/7] perf build: Add target to install devel packages needed to build perf Arnaldo Carvalho de Melo
2026-08-11 0:46 ` [PATCH 2/7] perf build: Add install-build-deps framework to install devel packages Arnaldo Carvalho de Melo
2026-08-10 21:46 [PATCHES v5 0/7] perf build: Add target to install devel packages needed to build perf Arnaldo Carvalho de Melo
2026-08-10 21:46 ` [PATCH 2/7] perf build: Add install-build-deps framework to install devel packages Arnaldo Carvalho de Melo
2026-08-10 18:15 [PATCHES v3 0/7] perf build: Add target to install devel packages needed to build perf Arnaldo Carvalho de Melo
2026-08-10 18:15 ` [PATCH 2/7] perf build: Add install-build-deps framework to install devel packages Arnaldo Carvalho de Melo
2026-08-10 15:44 [PATCHES v2 0/7] perf build: Add target to install devel packages needed to build perf Arnaldo Carvalho de Melo
2026-08-10 15:44 ` [PATCH 2/7] perf build: Add install-build-deps framework to install devel packages Arnaldo Carvalho de Melo
2026-08-10 0:51 [PATCHES v1 0/7] perf build: Add target to install devel packages needed to build perf Arnaldo Carvalho de Melo
2026-08-10 0:51 ` [PATCH 2/7] perf build: Add install-build-deps framework to install devel packages Arnaldo Carvalho de Melo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260814004558.E8B801F000E9@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=acme@kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.