Skip to content

Fix resolving /etc/localtime#1701

Merged
debarshiray merged 1 commit intocontainers:mainfrom
debarshiray:wip/rishi/toolbox-deprecated-readlink-localtime-sc2328
Aug 8, 2025
Merged

Fix resolving /etc/localtime#1701
debarshiray merged 1 commit intocontainers:mainfrom
debarshiray:wip/rishi/toolbox-deprecated-readlink-localtime-sc2328

Conversation

@debarshiray
Copy link
Copy Markdown
Member

Detected by https://www.shellcheck.net/:

  Line 1255:
  if ! localtime_target=$(readlink /etc/localtime >/dev/null 2>&3) \
                        ^-- SC2327 (warning): This command substitution
                            will be empty because the command's output
                            gets redirected away.
                                                  ^-- SC2328 (error):
                                                      This redirection
                                                      takes output away
                                                      from the command
                                                      substitution.

See:
https://www.shellcheck.net/wiki/SC2327
https://www.shellcheck.net/wiki/SC2328

Fallout from 8db414d

Detected by https://www.shellcheck.net/:
  Line 1255:
  if ! localtime_target=$(readlink /etc/localtime >/dev/null 2>&3) \
                        ^-- SC2327 (warning): This command substitution
                            will be empty because the command's output
                            gets redirected away.
                                                  ^-- SC2328 (error):
                                                      This redirection
                                                      takes output away
                                                      from the command
                                                      substitution.

See:
https://www.shellcheck.net/wiki/SC2327
https://www.shellcheck.net/wiki/SC2328

Fallout from 8db414d

containers#1701
@debarshiray debarshiray force-pushed the wip/rishi/toolbox-deprecated-readlink-localtime-sc2328 branch from a13d881 to d32dd5d Compare August 7, 2025 23:06
@softwarefactory-project-zuul
Copy link
Copy Markdown

@debarshiray
Copy link
Copy Markdown
Member Author

recheck

@softwarefactory-project-zuul
Copy link
Copy Markdown

@debarshiray
Copy link
Copy Markdown
Member Author

Build failed. https://softwarefactory-project.io/zuul/t/local/buildset/92ccf3c2defb4525b07f6883b9acbf05

system-test-fedora-rawhide-commands-options FAILURE in 1h 07m 16s

The error is the same as we have seen recently on Fedora Rawhide:

fedora-rawhide | not ok 186 run: Try /etc as a command
fedora-rawhide | # tags: commands-options
fedora-rawhide | # (from function `assert_line' in file test/system/libs/bats-assert/src/assert.bash, line 488,
fedora-rawhide | #  in test file test/system/104-run.bats, line 814)
fedora-rawhide | #   `assert_line --index 1 "bash: line 1: exec: /etc: cannot execute: Is a directory"' failed
fedora-rawhide | # ~ /home/zuul-worker/src/github.com/containers/toolbox
fedora-rawhide | #
fedora-rawhide | # -- line differs --
fedora-rawhide | # index    : 1
fedora-rawhide | # expected : bash: line 1: exec: /etc: cannot execute: Is a directory
fedora-rawhide | # actual   : Error: failed to invoke command /etc in container fedora-toolbox-43
fedora-rawhide | # --

It seems unrelated, and is probably due to some change in Fedora Rawhide.

@debarshiray debarshiray merged commit d32dd5d into containers:main Aug 8, 2025
2 of 3 checks passed
@debarshiray debarshiray deleted the wip/rishi/toolbox-deprecated-readlink-localtime-sc2328 branch August 8, 2025 05:00
debarshiray added a commit to debarshiray/toolbox that referenced this pull request Jan 25, 2026
Detected by https://www.shellcheck.net/:
  Line 1255:
  if ! localtime_target=$(readlink /etc/localtime >/dev/null 2>&3) \
                        ^-- SC2327 (warning): This command substitution
                            will be empty because the command's output
                            gets redirected away.
                                                  ^-- SC2328 (error):
                                                      This redirection
                                                      takes output away
                                                      from the command
                                                      substitution.

See:
https://www.shellcheck.net/wiki/SC2327
https://www.shellcheck.net/wiki/SC2328

Fallout from 8db414d

containers#1701
(cherry picked from commit d32dd5d)
debarshiray added a commit to debarshiray/toolbox that referenced this pull request Jan 25, 2026
Detected by https://www.shellcheck.net/:
  Line 1255:
  if ! localtime_target=$(readlink /etc/localtime >/dev/null 2>&3) \
                        ^-- SC2327 (warning): This command substitution
                            will be empty because the command's output
                            gets redirected away.
                                                  ^-- SC2328 (error):
                                                      This redirection
                                                      takes output away
                                                      from the command
                                                      substitution.

See:
https://www.shellcheck.net/wiki/SC2327
https://www.shellcheck.net/wiki/SC2328

Fallout from 8db414d

containers#1701
containers#1739
(cherry picked from commit d32dd5d)
debarshiray added a commit to debarshiray/toolbox that referenced this pull request Jan 27, 2026
Detected by https://www.shellcheck.net/:
  Line 1255:
  if ! localtime_target=$(readlink /etc/localtime >/dev/null 2>&3) \
                        ^-- SC2327 (warning): This command substitution
                            will be empty because the command's output
                            gets redirected away.
                                                  ^-- SC2328 (error):
                                                      This redirection
                                                      takes output away
                                                      from the command
                                                      substitution.

See:
https://www.shellcheck.net/wiki/SC2327
https://www.shellcheck.net/wiki/SC2328

Fallout from 8db414d

containers#1701
containers#1739
containers#1743
(cherry picked from commit d32dd5d)
(cherry picked from commit a67f614)
debarshiray added a commit to debarshiray/toolbox that referenced this pull request Jan 27, 2026
Detected by https://www.shellcheck.net/:
  Line 1255:
  if ! localtime_target=$(readlink /etc/localtime >/dev/null 2>&3) \
                        ^-- SC2327 (warning): This command substitution
                            will be empty because the command's output
                            gets redirected away.
                                                  ^-- SC2328 (error):
                                                      This redirection
                                                      takes output away
                                                      from the command
                                                      substitution.

See:
https://www.shellcheck.net/wiki/SC2327
https://www.shellcheck.net/wiki/SC2328

Fallout from 8db414d

containers#1701
containers#1739
containers#1744
(cherry picked from commit d32dd5d)
(cherry picked from commit a67f614)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant