Allow ignoring some apps for updates

This commit is contained in:
AaronDewes 2022-02-23 15:01:17 +00:00
parent 5e63400bb3
commit 37c7800083
2 changed files with 9 additions and 1 deletions

View File

@ -47,6 +47,7 @@ nodeRoot = os.path.join(scriptDir, "..", "..")
appsDir = os.path.join(nodeRoot, "apps")
appSystemDir = os.path.join(nodeRoot, "app-system")
sourcesList = os.path.join(appSystemDir, "sources.list")
updateIgnore = os.path.join(appSystemDir, ".updateignore")
appDataDir = os.path.join(nodeRoot, "app-data")
userFile = os.path.join(nodeRoot, "db", "user.json")
legacyScript = os.path.join(nodeRoot, "scripts", "app")
@ -304,11 +305,16 @@ def getAppHiddenServices(app: str):
def updateRepos():
# Get the list of repos
repos = []
ignoreApps = []
with open(sourcesList) as f:
repos = f.readlines()
with open(updateIgnore) as f:
ignoreApps = f.readlines()
# For each repo, clone the repo to a temporary dir, checkout the branch,
# and overwrite the current app dir with the contents of the temporary dir/apps/app
alreadyInstalled = []
# Set this to ignoreApps. Normally, it keeps track of apps already installed from repos higher in the list,
# but apps specified in updateignore have the highest priority
alreadyInstalled = ignoreApps
# A map of apps to their source repo
sourceMap = {}
for repo in repos:

View File

@ -12,3 +12,5 @@ apps/networking.json
use-core-upstream
nginx/*
services/installed.json
apps/sourceMap.json
apps/.updateignore