alpine: No llamar a apk innecesariamente

This commit is contained in:
Cat /dev/Nulo 2022-06-17 22:28:42 -03:00
parent 5ac76ae983
commit 82d7066d0f

View file

@ -99,12 +99,8 @@ function alpine.make_world(rootfs_path, packages)
utils.join_table(packages, "\n")) utils.join_table(packages, "\n"))
if err then return err end if err then return err end
local status = os.execute("sudo apk update --no-cache --root "..rootfs_path)
if not (status == 0) then return status end
local status = os.execute("sudo apk upgrade --clean-protected --no-cache --root "..rootfs_path) local status = os.execute("sudo apk upgrade --clean-protected --no-cache --root "..rootfs_path)
if not (status == 0) then return status end if not (status == 0) then return status end
local status = os.execute("sudo apk add --clean-protected --no-cache --root "..rootfs_path)
if not (status == 0) then return status end
end end
-- Returns nil when no failure, otherwise status code -- Returns nil when no failure, otherwise status code