override pkg after applying

This commit is contained in:
SrGooglo 2024-04-03 01:38:45 +02:00
parent 98d4676d8e
commit 26753e6471
2 changed files with 4 additions and 2 deletions

View File

@ -59,6 +59,8 @@ export default async function apply(pkg_id, changes = {}) {
await patches.remove(findPatch(manifest.patches, pkg.applied_patches, changes, false)) await patches.remove(findPatch(manifest.patches, pkg.applied_patches, changes, false))
await patches.patch(findPatch(manifest.patches, pkg.applied_patches, changes, true)) await patches.patch(findPatch(manifest.patches, pkg.applied_patches, changes, true))
pkg = await DB.getPackages(pkg_id)
} }
if (changes.config) { if (changes.config) {

View File

@ -42,7 +42,7 @@ export default async function install(manifest) {
Log.info(`Appending to db...`) Log.info(`Appending to db...`)
const pkg = DB.defaultPackageState({ let pkg = DB.defaultPackageState({
...manifest.constructor, ...manifest.constructor,
id: id, id: id,
name: manifest.constructor.pkg_name, name: manifest.constructor.pkg_name,
@ -140,7 +140,7 @@ export default async function install(manifest) {
status_text: `Applying default patches...`, status_text: `Applying default patches...`,
}) })
await Apply(id, { pkg = await Apply(id, {
patches: Object.fromEntries(defaultPatches.map((patch) => [patch.id, true])), patches: Object.fromEntries(defaultPatches.map((patch) => [patch.id, true])),
}) })
} }