def checkNetworkState(self, str, retval, extra_args): if 'Collected errors' in str: self.session.openWithCallback( self.close, MessageBox, _("A background update check is in progress, please wait a few minutes and try again." ), type=MessageBox.TYPE_INFO, timeout=10, close_on_any_key=True) elif not str: if (getImageType() != 'release' and feedsstatuscheck.getFeedsBool() != 'unknown') or ( getImageType() == 'release' and feedsstatuscheck.getFeedsBool() not in ('stable', 'unstable')): self.session.openWithCallback( self.InstallPackageFailed, MessageBox, feedsstatuscheck.getFeedsErrorMessage(), type=MessageBox.TYPE_INFO, timeout=10, close_on_any_key=True) else: self.session.openWithCallback( self.InstallPackage, MessageBox, _('Ready to install "%s" ?') % self.service_name, MessageBox.TYPE_YESNO) else: self.updateList()
def startRun(self): listsize = self["list"].instance.size() self["list"].instance.hide() self.listWidth = listsize.width() self.listHeight = listsize.height() if self.type == self.DOWNLOAD: self.type = self.UPDATE if (getImageType() != 'release' and feedsstatuscheck.getFeedsBool() != 'unknown') or ( getImageType() == 'release' and feedsstatuscheck.getFeedsBool() not in ('stable', 'unstable')): self["text"].setText(feedsstatuscheck.getFeedsErrorMessage()) elif getImageType() != 'release' or ( config.softwareupdate.updateisunstable.value == '1' and config.softwareupdate.updatebeta.value): self["text"].setText( _("WARNING: feeds may be unstable.") + '\n' + _("Downloading plugin information. Please wait...")) self.container.execute(self.ipkg + " update") elif config.softwareupdate.updateisunstable.value == '1' and not config.softwareupdate.updatebeta.value: self["text"].setText( _("Sorry feeds seem be in an unstable state, if you wish to use them please enable 'Allow unstable (experimental) updates' in \"Software update settings\"." )) else: self.container.execute(self.ipkg + " update") elif self.type == self.REMOVE: self.run = 1 self.startIpkgListInstalled()
def startRun(self): listsize = self["list"].instance.size() self["list"].instance.hide() self.listWidth = listsize.width() self.listHeight = listsize.height() if self.type == self.DOWNLOAD: if (getImageType() != "release" and feedsstatuscheck.getFeedsBool() != "unknown") or ( getImageType() == "release" and feedsstatuscheck.getFeedsBool() not in ("stable", "unstable") ): self["text"].setText(feedsstatuscheck.getFeedsErrorMessage()) elif getImageType() != "release" or ( config.softwareupdate.updateisunstable.value == "1" and config.softwareupdate.updatebeta.value ): self["text"].setText( _("WARNING: feeds may be unstable.") + "\n" + _("Downloading plugin information. Please wait...") ) self.container.execute(self.ipkg + " update") elif config.softwareupdate.updateisunstable.value == "1" and not config.softwareupdate.updatebeta.value: self["text"].setText( _( "Sorry feeds seem be in an unstable state, if you wish to use them please enable 'Allow unstable (experimental) updates' in \"Software update settings\"." ) ) else: self.container.execute(self.ipkg + " update") elif self.type == self.REMOVE: self.run = 1 self.startIpkgListInstalled()
def checkNetworkState(self): self['tl_red'].hide() self['tl_yellow'].hide() self['tl_green'].hide() self['tl_off'].hide() self.trafficLight = feedsstatuscheck.getFeedsBool() if self.trafficLight in feedsstatuscheck.feed_status_msgs: status_text = feedsstatuscheck.feed_status_msgs[self.trafficLight] else: status_text = _('Feeds status: Unexpected') if self.trafficLight: self['feedStatusMSG'].setText(status_text) if self.trafficLight == 'stable': self['tl_green'].show() elif self.trafficLight == 'unstable': self['tl_red'].show() elif self.trafficLight == 'updating': self['tl_yellow'].show() else: self['tl_off'].show() if (getImageType() != 'release' and self.trafficLight != 'unknown') or (getImageType() == 'release' and self.trafficLight not in ('stable', 'unstable')): self.session.openWithCallback(self.close, MessageBox, feedsstatuscheck.getFeedsErrorMessage(), type=MessageBox.TYPE_INFO, timeout=10, close_on_any_key=True) else: if getImageType() != 'release' or (config.softwareupdate.updateisunstable.value == '1' and config.softwareupdate.updatebeta.value) or config.softwareupdate.updateisunstable.value == '0': self.startCheck() else: self.session.openWithCallback(self.close, MessageBox, _("Sorry the feeds seem to be in an unstable state, if you wish to use them please enable 'Allow unstable (experimental) updates' in \"Software update settings\"."), type=MessageBox.TYPE_INFO, timeout=10, close_on_any_key=True)
def checkNetworkState(self): self.trafficLight = feedsstatuscheck.getFeedsBool() status_msgs = {'stable': _('Feeds status: Stable'), 'unstable': _('Feeds status: Unstable'), 'updating': _('Feeds status: Updating'), '-2': _('ERROR: No network found'), '404': _('ERROR: No internet found'), 'inprogress': _('ERROR: Check is already running in background'), 'unknown': _('No connection')} self['tl_red'].hide() self['tl_yellow'].hide() self['tl_green'].hide() self['tl_off'].hide() if self.trafficLight: self['feedStatusMSG'].setText(status_msgs[str(self.trafficLight)]) if self.trafficLight == 'stable': self['tl_green'].show() elif self.trafficLight == 'unstable': self['tl_red'].show() elif self.trafficLight == 'updating': self['tl_yellow'].show() else: self['tl_off'].show() if self.trafficLight not in ('stable', 'unstable'): self.session.openWithCallback(self.close, MessageBox, feedsstatuscheck.getFeedsErrorMessage(), type=MessageBox.TYPE_INFO, timeout=10, close_on_any_key=True) elif config.softwareupdate.updateisunstable.value == '1' and config.softwareupdate.updatebeta.value or config.softwareupdate.updateisunstable.value == '0': self.startCheck() else: self.session.openWithCallback(self.close, MessageBox, _('Sorry feeds seem to be in an unstable state, if you wish to use them please enable \'Allow unstable (experimental) updates\' in "Software update settings".'), type=MessageBox.TYPE_INFO, timeout=10, close_on_any_key=True)
def checkNetworkState(self): self['tl_red'].hide() self['tl_yellow'].hide() self['tl_green'].hide() self['tl_off'].hide() self.trafficLight = feedsstatuscheck.getFeedsBool() if self.trafficLight in feedsstatuscheck.feed_status_msgs: status_text = feedsstatuscheck.feed_status_msgs[self.trafficLight] else: status_text = _('Feeds status: Unexpected') if self.trafficLight: self['feedStatusMSG'].setText(status_text) if self.trafficLight == 'stable': self['tl_green'].show() elif self.trafficLight == 'unstable': self['tl_red'].show() elif self.trafficLight == 'updating': self['tl_yellow'].show() else: self['tl_off'].show() if kernelMismatch(): self.session.openWithCallback(self.close, MessageBox, _("The Linux kernel has changed, an update is not permitted. \nInstall latest image using USB stick or Image Manager."), type=MessageBox.TYPE_INFO, timeout=30, close_on_any_key=True) return if (getImageType() != 'release' and self.trafficLight != 'unknown') or (getImageType() == 'release' and self.trafficLight not in ('stable', 'unstable')): self.session.openWithCallback(self.close, MessageBox, feedsstatuscheck.getFeedsErrorMessage(), type=MessageBox.TYPE_INFO, timeout=10, close_on_any_key=True) else: if getImageType() != 'release' or (config.softwareupdate.updateisunstable.value == '1' and config.softwareupdate.updatebeta.value) or config.softwareupdate.updateisunstable.value == '0': message = statusMessage() if message: message += "\nDo you want to continue?" self.session.openWithCallback(self.statusMessageCallback, MessageBox, message, type=MessageBox.TYPE_YESNO, default=False) else: self.startCheck() else: self.session.openWithCallback(self.close, MessageBox, _("Sorry the feeds seem to be in an unstable state, if you wish to use them please enable 'Allow unstable (experimental) updates' in \"Software update settings\"."), type=MessageBox.TYPE_INFO, timeout=10, close_on_any_key=True)
def checkNetworkState(self, str, retval, extra_args): if 'Collected errors' in str: self.session.openWithCallback(self.close, MessageBox, _("A background update check is in progress, please wait a few minutes and try again."), type=MessageBox.TYPE_INFO, timeout=10, close_on_any_key=True) elif not str: if feedsstatuscheck.getFeedsBool() not in ('stable', 'unstable'): self.session.openWithCallback(self.InstallPackageFailed, MessageBox, feedsstatuscheck.getFeedsErrorMessage(), type=MessageBox.TYPE_INFO, timeout=10, close_on_any_key=True) else: self.session.openWithCallback(self.InstallPackage, MessageBox, _('Ready to install "%s" ?') % self.service_name, MessageBox.TYPE_YESNO) else: self.updateList()
def checkNetworkState(self): self.trafficLight = feedsstatuscheck.getFeedsBool() status_msgs = { 'stable': _('Feeds status: Stable'), 'unstable': _('Feeds status: Unstable'), 'updating': _('Feeds status: Updating'), '-2': _('ERROR: No network found'), '404': _('ERROR: No internet found'), 'inprogress': _('ERROR: Check is already running in background'), 'unknown': _('No connection') } self['tl_red'].hide() self['tl_yellow'].hide() self['tl_green'].hide() self['tl_off'].hide() if self.trafficLight: self['feedStatusMSG'].setText(status_msgs[str(self.trafficLight)]) if self.trafficLight == 'stable': self['tl_green'].show() elif self.trafficLight == 'unstable': self['tl_red'].show() elif self.trafficLight == 'updating': self['tl_yellow'].show() else: self['tl_off'].show() if self.trafficLight not in ('stable', 'unstable'): self.session.openWithCallback( self.close, MessageBox, feedsstatuscheck.getFeedsErrorMessage(), type=MessageBox.TYPE_INFO, timeout=10, close_on_any_key=True) else: if (config.softwareupdate.updateisunstable.value == '1' and config.softwareupdate.updatebeta.value ) or config.softwareupdate.updateisunstable.value == '0': self.startCheck() else: self.session.openWithCallback( self.close, MessageBox, _("Sorry the feeds seem to be in an unstable state, if you wish to use them please enable 'Allow unstable (experimental) updates' in \"Software update settings\"." ), type=MessageBox.TYPE_INFO, timeout=10, close_on_any_key=True)