Compare commits
No commits in common. "023095a01aa21a64b1b515d457a9282b8e69ead3" and "5ac76ae983a413ca3559190a1f283aefdefcc57a" have entirely different histories.
023095a01a
...
5ac76ae983
2 changed files with 5 additions and 11 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -2,4 +2,3 @@ root/
|
||||||
v00001/
|
v00001/
|
||||||
boot/
|
boot/
|
||||||
image.squashfs
|
image.squashfs
|
||||||
cache/
|
|
||||||
|
|
15
alpine.lua
15
alpine.lua
|
@ -94,21 +94,16 @@ end
|
||||||
|
|
||||||
-- Returns nil when no failure, otherwise string error or apk's status code
|
-- Returns nil when no failure, otherwise string error or apk's status code
|
||||||
function alpine.make_world(rootfs_path, packages)
|
function alpine.make_world(rootfs_path, packages)
|
||||||
local err = alpine.symlink(rootfs_path, "/etc/apk/cache", "../../../cache")
|
local world = alpine.write_file(rootfs_path,
|
||||||
if err then return err end
|
|
||||||
local err = alpine.mkdir(rootfs_path, "../cache")
|
|
||||||
if err then return err end
|
|
||||||
|
|
||||||
local err = alpine.write_file(rootfs_path,
|
|
||||||
"/etc/apk/world",
|
"/etc/apk/world",
|
||||||
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 upgrade --clean-protected --root "..rootfs_path)
|
local status = os.execute("sudo apk update --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 upgrade --clean-protected --no-cache --root "..rootfs_path)
|
||||||
local status = os.execute(t("rm {{rootfs_path}}/etc/apk/cache",
|
if not (status == 0) then return status end
|
||||||
{ rootfs_path = rootfs_path }))
|
local status = os.execute("sudo apk add --clean-protected --no-cache --root "..rootfs_path)
|
||||||
if not (status == 0) then return status end
|
if not (status == 0) then return status end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue