Browse Source

made pkgman cleanly remove packages before updating them

master
Izaya 3 years ago
parent
commit
89ab49faf6
  1. 1
      lib/pkgman.lua

1
lib/pkgman.lua

@ -128,6 +128,7 @@ function pkg.upgrade(force) -- boolean -- boolean -- Upgrades all packages on th
for repo,info in pairs(getSources()) do
for pkgname,pkg in pairs(getRepoMeta(repo)) do
if pkg.version ~= installed[pkgname].version or force then
pkg.remove(pkgname)
dl(info.path.."/"..pkg.filename,"/boot/pkg/"..pkg.filename)
installed[pkgname] = pkg
pcall(activatePackage,"/boot/pkg/"..pkg.filename,pkg.compressed)

Loading…
Cancel
Save