All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Arnaldo Carvalho de Melo" <acme@kernel.org>
Cc: linux-perf-users@vger.kernel.org
Subject: Re: [PATCH 7/7] perf build: install-build-deps: add RHEL family devel package mapping
Date: Mon, 10 Aug 2026 18:35:09 +0000	[thread overview]
Message-ID: <20260810183510.3BBD21F00A3E@smtp.kernel.org> (raw)
In-Reply-To: <20260810181526.24603-8-acme@kernel.org>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] The script outputs a `missing_file: unbound variable` error to stderr and alters the exit code to 1 upon successful completion due to `set -u` and local variable scope lifecycle.
--

--- Patch [7]: [PATCH 7/7] perf build: install-build-deps: add RHEL family devel package mapping ---
commit 5192f0f9f2879409655c946317c1f14bc8dff929
Author: Arnaldo Carvalho de Melo <acme@redhat.com>

perf build: install-build-deps: add RHEL family devel package mapping

With the Fedora mapping in place, this patch extends it to the RHEL
family (RHEL, CentOS Stream, Rocky Linux, AlmaLinux, Oracle Linux),
which shares most Fedora package names and runs dnf (RHEL 8 and
later).

> diff --git a/tools/perf/scripts/install-build-deps.sh b/tools/perf/scripts/install-build-deps.sh
> index 4a6f4bda49094..ef2226bd79b5f 100755
> --- a/tools/perf/scripts/install-build-deps.sh
> +++ b/tools/perf/scripts/install-build-deps.sh

[ ... ]

> @@ -377,23 +518,46 @@ main() {

[ ... ]

> +	missing_file=$(mktemp) || {
> +		echo "error: cannot create a temporary file (mktemp failed)" >&2
> +		exit 1
> +	}
> +	# package_set() runs in a subshell, doing dnf repoquery loops that
> +	# may be interrupted: remove the temp file on any exit and turn
> +	# SIGINT/SIGTERM into an exit, so the script terminates instead of
> +	# resuming after the interrupted command.
> +	trap 'rm -f "$missing_file"' EXIT

[Severity: Medium]
Since missing_file is declared as a local variable in main(), will this
trap trigger an unbound variable error when the script completes?

Because single quotes are used for the trap command, the missing_file
variable is evaluated when the trap fires at the very end of the script.
When the default install action succeeds, main() returns normally and its
local variables go out of scope.

Will this unbound variable evaluation cause the script to exit with code 1
on a successful run, failing the make install-build-deps target?

[ ... ]

> @@ -410,6 +574,7 @@ main() {
>  		echo "error: the install command failed, see the output above" >&2
>  		exit 1
>  	}
> +	note_missing "$missing_pkgs"
>  }
>  
>  main "$@"

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260810181526.24603-1-acme@kernel.org?part=7

  reply	other threads:[~2026-08-10 18:35 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 1/7] tools build: Only probe the compiler at parse time when it is installed 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 18:15 ` [PATCH 3/7] perf build: install-build-deps: add Fedora devel package mapping Arnaldo Carvalho de Melo
2026-08-10 18:15 ` [PATCH 4/7] perf build: install-build-deps: add Ubuntu " Arnaldo Carvalho de Melo
2026-08-10 18:15 ` [PATCH 5/7] perf build: install-build-deps: add Debian " Arnaldo Carvalho de Melo
2026-08-10 18:15 ` [PATCH 6/7] perf build: Remove leftover feature tests for removed cxx and clang support Arnaldo Carvalho de Melo
2026-08-10 18:15 ` [PATCH 7/7] perf build: install-build-deps: add RHEL family devel package mapping Arnaldo Carvalho de Melo
2026-08-10 18:35   ` sashiko-bot [this message]
  -- strict thread matches above, loose matches on Subject: below --
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 7/7] perf build: install-build-deps: add RHEL family devel package mapping 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 7/7] perf build: install-build-deps: add RHEL family devel package mapping 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 7/7] perf build: install-build-deps: add RHEL family devel package mapping Arnaldo Carvalho de Melo
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 7/7] perf build: install-build-deps: add RHEL family devel package mapping 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 7/7] perf build: install-build-deps: add RHEL family devel package mapping Arnaldo Carvalho de Melo
2026-08-10 16:09   ` sashiko-bot
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 7/7] perf build: install-build-deps: add RHEL family devel package mapping Arnaldo Carvalho de Melo
2026-08-10  1:00   ` sashiko-bot

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=20260810183510.3BBD21F00A3E@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.