Comment out pkgmgr bits to get app at least partially working

This commit is contained in:
Disassembler 2020-03-12 23:51:43 +01:00
parent 23716ddfb6
commit 40f2991d60
No known key found for this signature in database
GPG Key ID: 524BD33A0EE29499
2 changed files with 8 additions and 8 deletions

View File

@ -3,12 +3,12 @@
import os import os
import subprocess import subprocess
from .pkgmgr import Pkg, PkgMgr #from .pkgmgr import Pkg, PkgMgr
class AppMgr: class AppMgr:
def __init__(self, conf): def __init__(self, conf):
self.conf = conf self.conf = conf
self.pkgmgr = PkgMgr(conf) self.pkgmgr = None #PkgMgr(conf)
def start_app(self, item): def start_app(self, item):
# Start the actual app service # Start the actual app service
@ -54,7 +54,7 @@ class AppMgr:
def install_app(self, item): def install_app(self, item):
# Main installation function. Wrapper for download, registration and install script # Main installation function. Wrapper for download, registration and install script
item.data = Pkg() item.data = None #Pkg()
self.pkgmgr.install_app(item.key, item.data) self.pkgmgr.install_app(item.key, item.data)
def uninstall_app(self, item): def uninstall_app(self, item):
@ -68,7 +68,7 @@ class AppMgr:
def update_app(self, item): def update_app(self, item):
# Main update function. Wrapper for download and update script # Main update function. Wrapper for download and update script
self.stop_app(item) self.stop_app(item)
item.data = Pkg() item.data = None #Pkg()
self.pkgmgr.update_app(item.key, item.data) self.pkgmgr.update_app(item.key, item.data)
def get_services_deps(self): def get_services_deps(self):

View File

@ -18,7 +18,7 @@ from . import validator
from .actionqueue import ActionQueue from .actionqueue import ActionQueue
from .appmgr import AppMgr from .appmgr import AppMgr
from .config import Config from .config import Config
from .pkgmgr import Stage #from .pkgmgr import Stage
from .vmmgr import VMMgr from .vmmgr import VMMgr
from .wsgilang import WSGILang from .wsgilang import WSGILang
from .wsgisession import WSGISession from .wsgisession import WSGISession
@ -228,11 +228,11 @@ class WSGIApp:
status = '<span class="error">{}</span> <a href="#" class="app-clear-status">OK</a>'.format(lang.package_manager_error()) status = '<span class="error">{}</span> <a href="#" class="app-clear-status">OK</a>'.format(lang.package_manager_error())
actions = None actions = None
else: else:
if item.data.stage == Stage.DOWNLOAD: if item.data.stage == 0: #Stage.DOWNLOAD:
status = '{} ({} %)'.format(lang.status_downloading(), item.data.percent_processed) status = '{} ({} %)'.format(lang.status_downloading(), item.data.percent_processed)
elif item.data.stage == Stage.UNPACK: elif item.data.stage == 1: #Stage.UNPACK:
status = lang.status_unpacking() status = lang.status_unpacking()
elif item.data.stage == Stage.INSTALL_DEPS: elif item.data.stage == 2: #Stage.INSTALL_DEPS:
status = lang.status_installing_deps() status = lang.status_installing_deps()
else: else:
status = lang.status_installing() status = lang.status_installing()