1
1
mirror of https://git.shadowkat.net/izaya/OC-PsychOS2.git synced 2024-11-22 03:54:20 -05:00

made pkgman cleanly remove packages before updating them

This commit is contained in:
XeonSquared 2020-06-06 19:48:21 +10:00
parent f86f7d54ad
commit 89ab49faf6

View File

@ -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)