guix-install.sh REQUIRE check for SYSV_INIT_REQUIRE

  • Open
  • quality assurance status badge
Details
2 participants
  • Nyi Nyi Zaw
  • Richard Sent
Owner
unassigned
Submitted by
Nyi Nyi Zaw
Severity
normal
N
N
Nyi Nyi Zaw wrote on 21 Jun 12:15 +0200
(address . bug-guix@gnu.org)
d800f507-24fd-4767-99e9-efc8ded18bfe@gmail.com
Cause>>

Toggle quote (7 lines)
>
>   MX linux 23.3(Debian 12.5 “bookworm” base) return sysv-init as
> lowercase with dash
>   which cause install script fails with sysv-init_REQUIRE[@]: invalid
> variable name
>

ERROR>>

Toggle quote (9 lines)
> This script installs GNU Guix on your system
> To uninstall, pass in the '--uninstall' parameter.
> Press return to continue...
> [1718953785.295]: Starting installation (Fri Jun 21 01:39:45 PM +0630
> 2024)
> [1718953785.306]: [ INFO ] init system is: sysv-init
> ./guix-install.sh: line 164: sysv-init_REQUIRE[@]: invalid variable name

Fix Patch >> Convert sysv-init to SYSV_INIT_REQUIRE to match with
variable name

Toggle quote (14 lines)
>   --- guix-install.sh     2024-06-21 15:22:03.000000000 +0630
>   +++ guix-install-patched.sh     2024-06-21 16:09:17.454668652 +0630
>   @@ -157,7 +157,9 @@
>
>   add_init_sys_require()
>   { # Add the elements of FOO_INIT_SYS to REQUIRE
>       -    local init_require="${INIT_SYS}_REQUIRE[@]"
>       + # Convert INIT_SYS return string to uppercase and replace dash
> with underscore
>       +    local init_require="${INIT_SYS^^}_REQUIRE[@]"
>       + init_require="${init_require//-/_}"
> if[[ !-z "$init_require"]]; then
> # Have to add piecemeal because ${!foo[@]} performs direct array key
> # expansion, not indirect plain array expansion.
Attachment: file
R
R
Richard Sent wrote on 22 Jun 15:12 +0200
(name . Nyi Nyi Zaw)(address . nyinyizaw.nav@gmail.com)(address . 71695@debbugs.gnu.org)
87v821azpq.fsf@freakingpenguin.com
The fix looks good to me. I don't have commit access so you may want to
send it off to guix-patches so it's not lost.
(info "(guix) Submitting Patches")

If you can, please submit in plaintext. The formatting here looks odd. :)

--
Take it easy,
Richard Sent
Making my computer weirder one commit at a time.
?
Your comment

Commenting via the web interface is currently disabled.

To comment on this conversation send an email to 71695@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 71695
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch