diff mbox series

[bug#42816,1/2] guix-install.sh: Increase compatibility

Message ID DM5PR1001MB2105731ADDB371A895D7FCDDC5420@DM5PR1001MB2105.namprd10.prod.outlook.com
State Accepted
Headers show
Series [bug#42816,1/2] guix-install.sh: Increase compatibility | expand

Checks

Context Check Description
cbaines/comparison success View comparision
cbaines/git branch success View Git branch
cbaines/applying patch success View Laminar job
cbaines/comparison success View comparision
cbaines/git branch success View Git branch
cbaines/applying patch success View Laminar job

Commit Message

Morgan Smith Aug. 12, 2020, 3:38 a.m. UTC
From: Morgan Smith <Morgan.J.Smith@outlook.com>

These fixes allow the script to be run using the binaries found on Alpine
Linux 3.12.0-x86_64.

* etc/guix-install.sh (guix_get_bin_list): Change grep to use extended regex
instead of perl regex. Grep using extended regex is POSIX while grep using
perl regex is not.

* etc/guix-install.sh (sys_create_store): Remove --warning flag as it is
unavailable on Alpine Linux
---

So for this change I had to learn perl regex. Then, once I understood
exactly what it did I recreated it from scratch not realizing that it
was almost the same as what was there before. I'm pretty sure there
are no differences between [[:digit:]] and [0-9], I just tend to use
[[:digit:]] because it's flashy

 etc/guix-install.sh | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

Comments

Ludovic Courtès Sept. 4, 2020, 8:57 a.m. UTC | #1
Hi!

Morgan.J.Smith@outlook.com skribis:

> From: Morgan Smith <Morgan.J.Smith@outlook.com>
>
> These fixes allow the script to be run using the binaries found on Alpine
> Linux 3.12.0-x86_64.
>
> * etc/guix-install.sh (guix_get_bin_list): Change grep to use extended regex
> instead of perl regex. Grep using extended regex is POSIX while grep using
> perl regex is not.
>
> * etc/guix-install.sh (sys_create_store): Remove --warning flag as it is
> unavailable on Alpine Linux

[...]

> From: Morgan Smith <Morgan.J.Smith@outlook.com>
>
> ---
> Oops, please merge this patch with the last one. My bad
>
>  etc/openrc/guix-daemon.in | 28 ++++++++++++++++++++++++++++

Tobias, I think these patches fell through the cracks.  Could you apply
them if everything looks good to you?  :-)

Thanks,
Ludo’.
diff mbox series

Patch

diff --git a/etc/guix-install.sh b/etc/guix-install.sh
index 72dc3839e8..06edbaaffd 100755
--- a/etc/guix-install.sh
+++ b/etc/guix-install.sh
@@ -212,7 +212,7 @@  guix_get_bin_list()
         | sort -Vu)")
 
     latest_ver="$(echo "$bin_ver_ls" \
-                       | grep -oP "([0-9]{1,2}\.){2}[0-9]{1,2}" \
+                       | grep -oE "([0-9]{1,2}\.){2}[0-9]{1,2}" \
                        | tail -n1)"
 
     default_ver="guix-binary-${latest_ver}.${ARCH_OS}"
@@ -268,8 +268,7 @@  sys_create_store()
     _debug "--- [ $FUNCNAME ] ---"
 
     cd "$tmp_path"
-    tar --warning=no-timestamp \
-        --extract \
+    tar --extract \
         --file "$pkg" &&
     _msg "${PAS}unpacked archive"