X-Git-Url: https://git.cweiske.de/enigma2.git/blobdiff_plain/eaa8bc374ff5eca1bb3caf9517dc6772cae34dd6..60c6b67a63dbda5dbe36b1bf8bc0f45a7692d91b:/lib/python/Plugins/SystemPlugins/SoftwareUpdate/plugin.py diff --git a/lib/python/Plugins/SystemPlugins/SoftwareUpdate/plugin.py b/lib/python/Plugins/SystemPlugins/SoftwareUpdate/plugin.py index 2a7bf655..c283dd04 100644 --- a/lib/python/Plugins/SystemPlugins/SoftwareUpdate/plugin.py +++ b/lib/python/Plugins/SystemPlugins/SoftwareUpdate/plugin.py @@ -4,7 +4,6 @@ from Components.Input import Input from Components.Ipkg import IpkgComponent from Components.Label import Label from Components.MenuList import MenuList -from Components.ScrollLabel import ScrollLabel from Components.Slider import Slider from Plugins.Plugin import PluginDescriptor from Screens.Console import Console @@ -229,8 +228,8 @@ class UpdatePlugin(Screen): - - + + """ def __init__(self, session, args = None): @@ -291,12 +290,18 @@ class UpdatePlugin(Screen): elif event == IpkgComponent.EVENT_CONFIGURING: self.package.setText(param) self.status.setText(_("Configuring")) + elif event == IpkgComponent.EVENT_MODIFIED: + self.session.openWithCallback( + self.modificationCallback, + MessageBox, + _("A configuration file (%s) was modified since Installation.\nDo you want to keep your version?") % (param) + ) elif event == IpkgComponent.EVENT_ERROR: self.error += 1 elif event == IpkgComponent.EVENT_DONE: if self.updating: self.updating = False - self.ipkg.startCmd(Ipkg.CMD_UPGRADE, args = {'test_only': False}) + self.ipkg.startCmd(IpkgComponent.CMD_UPGRADE, args = {'test_only': False}) elif self.error == 0: self.slider.setValue(4) @@ -316,7 +321,10 @@ class UpdatePlugin(Screen): self.status.setText(_("Error") + " - " + error) #print event, "-", param pass - + + def modificationCallback(self, res): + self.ipkg.write(res and "N" or "Y") + def exit(self): if not self.ipkg.isRunning(): if self.packages != 0 and self.error == 0: