From 47d8a5bb29208af1c364c95777b7539d434a8d2a Mon Sep 17 00:00:00 2001 From: Tim Wilkinson Date: Tue, 27 Dec 2022 08:46:47 -0800 Subject: [PATCH] New opkg reports missing dependencies differently (#597) --- files/www/cgi-bin/admin | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/files/www/cgi-bin/admin b/files/www/cgi-bin/admin index ea644e58..a6e04448 100755 --- a/files/www/cgi-bin/admin +++ b/files/www/cgi-bin/admin @@ -579,7 +579,7 @@ if parms.button_ul_pkg and nixio.fs.stat("/tmp/web/upload/file") then os.execute("mv -f /tmp/web/upload/file /tmp/web/upload/newpkg.ipk") os.execute("/usr/local/bin/uploadctlservices opkginstall > /dev/null 2>&1") local result = capture("opkg -force-overwrite install /tmp/web/upload/newpkg.ipk 2>&1") - if result:match("satisfy_dependencies_for:") then + if result:match("satisfy_dependencies_for:") or result:match("cannot find dependency") then -- dependency failure - silently update dependencies and try again os.execute("opkg update > /dev/null 2>&1") os.execute("opkg list | grep -v '^ ' | cut -f1,3 -d' ' | gzip -c > /etc/opkg.list.gz") @@ -600,7 +600,7 @@ if parms.button_dl_pkg and parms.dl_pkg ~= "default" then if get_default_gw() ~= "none" or meshpkgs ~= "" then os.execute("/usr/local/bin/uploadctlservices opkginstall > /dev/null 2>&1") local result = capture("opkg -force-overwrite install " .. parms.dl_pkg .. " 2>&1") - if result:match("satisfy_dependencies_for:") then + if result:match("satisfy_dependencies_for:") or result:match("cannot find dependency") then -- dependency failure - silently update dependencies and try again os.execute("opkg update > /dev/null 2>&1") os.execute("opkg list | grep -v '^ ' | cut -f1,3 -d' ' | gzip -c > /etc/opkg.list.gz")