diff options
| author | acid-burn <acid-burn@opendreambox.org> | 2010-04-05 21:24:13 +0200 |
|---|---|---|
| committer | acid-burn <acid-burn@opendreambox.org> | 2010-04-05 21:24:13 +0200 |
| commit | ade31606f868b60e12458d3fc0d68a69094656e1 (patch) | |
| tree | d5a58b5c4fe4d423918ae015776f3cf01f7a953a /lib/python/Plugins/SystemPlugins/SoftwareManager/SoftwareTools.py | |
| parent | 5807686a79350632f38e4161c942ae59cf2f63ce (diff) | |
| download | enigma2-ade31606f868b60e12458d3fc0d68a69094656e1.tar.gz enigma2-ade31606f868b60e12458d3fc0d68a69094656e1.zip | |
Softwaremanager: * notify if updatefeed is not available and also verify HardwarePrerequisites.
Fixes #503
Diffstat (limited to 'lib/python/Plugins/SystemPlugins/SoftwareManager/SoftwareTools.py')
| -rwxr-xr-x | lib/python/Plugins/SystemPlugins/SoftwareManager/SoftwareTools.py | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/lib/python/Plugins/SystemPlugins/SoftwareManager/SoftwareTools.py b/lib/python/Plugins/SystemPlugins/SoftwareManager/SoftwareTools.py index e8cf6dc2..a7c88c95 100755 --- a/lib/python/Plugins/SystemPlugins/SoftwareManager/SoftwareTools.py +++ b/lib/python/Plugins/SystemPlugins/SoftwareManager/SoftwareTools.py @@ -7,6 +7,7 @@ from Components.Sources.List import List from Components.Ipkg import IpkgComponent from Components.Network import iNetwork from Tools.Directories import pathExists, fileExists, resolveFilename, SCOPE_METADIR +from Tools.HardwareInfo import HardwareInfo from time import time @@ -78,9 +79,12 @@ class SoftwareTools(DreamInfoHandler): def ipkgCallback(self, event, param): if event == IpkgComponent.EVENT_ERROR: SoftwareTools.list_updating = False + if self.NotifierCallback is not None: + self.NotifierCallback(False) elif event == IpkgComponent.EVENT_DONE: if SoftwareTools.list_updating: self.startIpkgListAvailable() + #print event, "-", param pass def startIpkgListAvailable(self, callback = None): @@ -164,6 +168,14 @@ class SoftwareTools(DreamInfoHandler): l = len(tokens) version = l > 1 and tokens[1].strip() or "" SoftwareTools.installed_packetlist[name] = version + for package in self.packagesIndexlist[:]: + if not self.verifyPrerequisites(package[0]["prerequisites"]): + self.packagesIndexlist.remove(package) + for package in self.packagesIndexlist[:]: + attributes = package[0]["attributes"] + if attributes.has_key("packagetype"): + if attributes["packagetype"] == "internal": + self.packagesIndexlist.remove(package) if callback is None: self.countUpdates() else: @@ -228,4 +240,14 @@ class SoftwareTools(DreamInfoHandler): for name in self.UpdateConsole.appContainers.keys(): self.UpdateConsole.kill(name) + def verifyPrerequisites(self, prerequisites): + if prerequisites.has_key("hardware"): + hardware_found = False + for hardware in prerequisites["hardware"]: + if hardware == self.hardware_info.device_name: + hardware_found = True + if not hardware_found: + return False + return True + iSoftwareTools = SoftwareTools()
\ No newline at end of file |
