diff --git a/backend/SystemUpdater/UpdateManager.py b/backend/SystemUpdater/UpdateManager.py index 39aa768..074fd28 100644 --- a/backend/SystemUpdater/UpdateManager.py +++ b/backend/SystemUpdater/UpdateManager.py @@ -57,7 +57,7 @@ class UpdateManager(): self.sqlite3_server = Sqlite3Server(self) #是否重启apt - self.set_restart_aptdeamon = False + self.init_config_aptdeamon = False #数据采集器 self.collector = UpdateMsgCollector(self) @@ -148,12 +148,9 @@ class UpdateManager(): #检查是否需要重新启动aptdeamon 目前需要重启的有限速功能 def check_restart_aptdeamon(self): - if self.set_restart_aptdeamon == True: - logging.warning("aptdeamon will be restart...") - self.set_restart_aptdeamon = False - self.dbusController.make_aptdeamon_restart() - #重启的话等待重启完成 - time.sleep(0.5) + if self.init_config_aptdeamon == True: + self.init_config_aptdeamon = False + self.dbusController.set_aptdeamon_environ("init","config") def run(self): """Start the daemon and listen for calls.""" diff --git a/backend/SystemUpdater/backend/__init__.py b/backend/SystemUpdater/backend/__init__.py index da05fa1..82a2d37 100644 --- a/backend/SystemUpdater/backend/__init__.py +++ b/backend/SystemUpdater/backend/__init__.py @@ -17,7 +17,7 @@ from SystemUpdater.Core.utils import ( from SystemUpdater.Core.DataAcquisition import get_east_8_time from apt import Cache import subprocess -from SystemUpdater.Core.UpdateList import LocalUpgradeDataList,UpdateList +from SystemUpdater.Core.UpdateList import LocalUpgradeDataList class NowUpgradePara: """ diff --git a/backend/data/Makefile b/backend/data/Makefile deleted file mode 100644 index 71a916c..0000000 --- a/backend/data/Makefile +++ /dev/null @@ -1,9 +0,0 @@ - -DOMAIN=kylin-system-updater -DESKTOP_IN_FILES := $(wildcard *.desktop.in) -DESKTOP_FILES := $(patsubst %.desktop.in,%.desktop,$(wildcard *.desktop.in)) - -all: $(DESKTOP_FILES) - -%.desktop: %.desktop.in ../po/$(DOMAIN).pot - intltool-merge -d ../po $< $@