From 2b5fa3f95aa696c952cc88b29fdc815deebc31c1 Mon Sep 17 00:00:00 2001 From: sev Date: Thu, 5 Aug 2021 14:57:26 -0500 Subject: [PATCH 1/1] apkv: fix list with special chars in pkg name --- bin/apkv | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/apkv b/bin/apkv index 7ae7051..d8035bd 100755 --- a/bin/apkv +++ b/bin/apkv @@ -103,7 +103,7 @@ if [ "$method" = list ]; then # replacing chars may result in variable collision—but # official apk repos do not have any package names that # would cause issues - eval "__$(echo $c | tr -s '.:-' _)=1" + eval "__$(echo $c | tr -s '.:+-' _ | tr -s '<=~>@' "\n" | head -1)=1" done done # check world against owned packages @@ -111,7 +111,7 @@ if [ "$method" = list ]; then orphans=$( for x in $(cat /etc/apk/world | grep -v '^\.'); do eval "[ \${__$( - echo $x | tr -s '.:-' _ | tr -s '<=~>@' "\n" | head -1 + echo $x | tr -s '.:+-' _ | tr -s '<=~>@' "\n" | head -1 )-0} -eq 0 ]" && echo $x done ) -- 2.47.0