made pkgman cleanly remove packages before updating them
This commit is contained in:
parent
f86f7d54ad
commit
89ab49faf6
@ -128,6 +128,7 @@ function pkg.upgrade(force) -- boolean -- boolean -- Upgrades all packages on th
|
|||||||
for repo,info in pairs(getSources()) do
|
for repo,info in pairs(getSources()) do
|
||||||
for pkgname,pkg in pairs(getRepoMeta(repo)) do
|
for pkgname,pkg in pairs(getRepoMeta(repo)) do
|
||||||
if pkg.version ~= installed[pkgname].version or force then
|
if pkg.version ~= installed[pkgname].version or force then
|
||||||
|
pkg.remove(pkgname)
|
||||||
dl(info.path.."/"..pkg.filename,"/boot/pkg/"..pkg.filename)
|
dl(info.path.."/"..pkg.filename,"/boot/pkg/"..pkg.filename)
|
||||||
installed[pkgname] = pkg
|
installed[pkgname] = pkg
|
||||||
pcall(activatePackage,"/boot/pkg/"..pkg.filename,pkg.compressed)
|
pcall(activatePackage,"/boot/pkg/"..pkg.filename,pkg.compressed)
|
||||||
|
Loading…
Reference in New Issue
Block a user