Ejemplo n.º 1
0
def fetchlog(logtype):
	releasenotes = ""
	try:
# TODO: fix url for obh
		if getImageType() == 'release':
			sourceurl = 'http://www.vuplus-community.net/feeds/%s/%s/%s/%s-git.log' % (getImageDistro(), getImageType(), getImageVersion(), logtype)
		else:
			sourceurl = 'http://www.vuplus-community.net/feeds/%s/%s/%s/%s-git.log' % (getImageDistro(), getImageType(), getImageVersion(), logtype)
		print "[GitLog]",sourceurl
		sourcefile,headers = urllib.urlretrieve(sourceurl)
		fd = open(sourcefile, 'r')
		for line in fd.readlines():
			if getImageType() == 'release' and line.startswith('openvix: developer'):
				print '[GitLog] Skipping dev line'
				continue
			elif getImageType() == 'developer' and line.startswith('openvix: release'):
				print '[GitLog] Skipping release line'
				continue
			releasenotes += line
		fd.close()
		releasenotes = releasenotes.replace('\nopenvix: build',"\n\nopenvix: build")
		releasenotes = releasenotes.replace('\nopenvix: %s' % getImageType(),"\n\nopenvix: %s" % getImageType())
	except:
		releasenotes = '404 Not Found'
	return releasenotes
Ejemplo n.º 2
0
	def getlog(self):
		if config.usage.show_menupath.value == 'large':
			if not self.menu_path.endswith(self.screentitle):
				self.menu_path += self.screentitle
			title = self.menu_path
			self["menu_path_compressed"].setText("")
		elif config.usage.show_menupath.value == 'small':
			title = self.screentitle
			self["menu_path_compressed"].setText(self.menu_path + " >" if not self.menu_path.endswith(' / ') else self.menu_path[:-3] + " >" or "")
		else:
			title = self.screentitle
			self["menu_path_compressed"].setText("")
		self.setTitle(title)

		releasenotes = ""
		fd = open('/etc/' + self.logtype + '-git.log', 'r')
		for line in fd.readlines():
			if getImageType() == 'release' and line.startswith('openvix: developer'):
				continue
			elif getImageType() == 'developer' and line.startswith('openvix: release'):
				continue
			releasenotes += line
		fd.close()
		self["text"].setText(releasenotes)
		summarytext = releasenotes
		try:
			self['title_summary'].setText(summarytext[0] + ':')
			self['text_summary'].setText(summarytext[1])
		except:
			self['title_summary'].setText("")
			self['text_summary'].setText("")
Ejemplo n.º 3
0
 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': _('Feeds status:   Unkown')}
     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 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)
     elif 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)
Ejemplo n.º 4
0
	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)
Ejemplo n.º 5
0
	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)
Ejemplo n.º 6
0
    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()
Ejemplo n.º 7
0
def readGithubCommitLogs():
	global ImageVer
	global cachedProjects
	cachedProjects = {}
	blockstart = False
	gitstart = True
	url = projects[project][0]
	commitlog = ""
	try:
		try:
			from ssl import _create_unverified_context
			log = loads(urllib2.urlopen(url, timeout=5, context=_create_unverified_context()).read())
		except:
			log = loads(urllib2.urlopen(url, timeout=5).read())
		for c in log:
			if c['commit']['message'].startswith('openbh:') or (gitstart and not c['commit']['message'].startswith('openvix:') and getScreenTitle() in ("OE-A Core", "Enigma2", "ViX Core", "ViX Skins")):
				continue
			if c['commit']['message'].startswith('openvix:'):
				blockstart = False
				gitstart = False
				if getImageType() == 'release' and c['commit']['message'].startswith('openvix: developer'):
					print '[GitCommitLog] Skipping developer line'
					continue
				elif getImageType() == 'developer' and c['commit']['message'].startswith('openvix: release'):
					print '[GitCommitLog] Skipping release line'
					continue
				tmp = c['commit']['message'].split(' ')[2].split('.')
				if len(tmp) > 2:
					if getImageType() == 'release':
						releasever = tmp[2]
						releasever = "%03d" % int(releasever)
					else:
						releasever = '%s.%s' % (tmp[2], tmp[3])
						releasever = float(releasever)
				if releasever > ImageVer:
					blockstart = True
					continue
			elif blockstart and getScreenTitle() in ("OE-A Core", "Enigma2", "ViX Core", "ViX Skins"):
				blockstart = True
				continue

			creator = c['commit']['author']['name']
			title = c['commit']['message']
			date = datetime.strptime(c['commit']['committer']['date'], '%Y-%m-%dT%H:%M:%SZ').strftime('%x %X')
			commitlog += date + ' ' + creator + '\n' + title + 2 * '\n'
		commitlog = commitlog.encode('utf-8')
		cachedProjects[getScreenTitle()] = commitlog
	except urllib2.HTTPError, err:
		if err.code == 403:
			print '[GitCommitLog] It seems you have hit your API limit - please try again later.'
			commitlog += _("It seems you have hit your API limit - please try again later.")
		else:
			print '[GitCommitLog] The commit log cannot be retrieved at the moment - please try again later.\n%s' % err
			commitlog += _("The commit log cannot be retrieved at the moment - please try again later.")
Ejemplo n.º 8
0
	def doBackup4(self):
		print '[ImageManager] Stage4: Moving from work to backup folders'
		move('%s/rootfs.%s' % (self.WORKDIR, self.ROOTFSTYPE), '%s/%s' % (self.MAINDEST, self.rootFILE))
		if self.ROOTFSTYPE == 'tar.bz2' and path.exists('%s/vmlinux.tar.bz2' % self.WORKDIR):
			move('%s/vmlinux.tar.bz2' % self.WORKDIR, '%s/%s' % (self.MAINDEST, self.kernelFILE))
		else:
			move('%s/vmlinux.gz' % self.WORKDIR, '%s/%s' % (self.MAINDEST, self.kernelFILE))
		fileout = open(self.MAINDEST + '/imageversion', 'w')
		line = defaultprefix + '-' + getImageType() + '-backup-' + getImageVersion() + '.' + getImageBuild() + '-' + self.BackupDate
		fileout.write(line)
		fileout.close()
		if getBrandOEM() ==  'vuplus':
			if getMachineBuild() == 'vuzero':
				fileout = open(self.MAINDEST + '/force.update', 'w')
				line = "This file forces the update."
				fileout.write(line)
				fileout.close()
			else:
				fileout = open(self.MAINDEST + '/reboot.update', 'w')
				line = "This file forces a reboot after the update."
				fileout.write(line)
				fileout.close()
			imagecreated = True
		elif getBrandOEM() in ('xtrend', 'gigablue', 'odin', 'xp', 'ini'):
			if getBrandOEM() in ('xtrend', 'odin', 'ini'):
				fileout = open(self.MAINDEST + '/noforce', 'w')
				line = "rename this file to 'force' to force an update without confirmation"
				fileout.write(line)
				fileout.close()
			if path.exists('/usr/lib/enigma2/python/Plugins/SystemPlugins/ViX/burn.bat'):
				copy('/usr/lib/enigma2/python/Plugins/SystemPlugins/ViX/burn.bat', self.MAINDESTROOT + '/burn.bat')
		print '[ImageManager] Stage4: Removing Swap.'
		if path.exists(self.swapdevice + config.imagemanager.folderprefix.value + '-' + getImageType() + "-swapfile_backup"):
			system('swapoff ' + self.swapdevice + config.imagemanager.folderprefix.value + '-' + getImageType() + "-swapfile_backup")
			remove(self.swapdevice + config.imagemanager.folderprefix.value + '-' + getImageType() + "-swapfile_backup")
		if path.exists(self.WORKDIR):
			rmtree(self.WORKDIR)
		if path.exists(self.MAINDEST + '/' + self.rootFILE) and path.exists(self.MAINDEST + '/' + self.kernelFILE):
			for root, dirs, files in walk(self.MAINDEST):
				for momo in dirs:
					chmod(path.join(root, momo), 0644)
				for momo in files:
					chmod(path.join(root, momo), 0644)
			print '[ImageManager] Stage4: Image created in ' + self.MAINDESTROOT
			self.Stage4Complete()
		else:
			print "[ImageManager] Stage4: Image creation failed - e. g. wrong backup destination or no space left on backup device"
			self.BackupComplete()
Ejemplo n.º 9
0
    def getFeedSatus(self):
        status = '1'
        trafficLight = 'unknown'
        if about.getIfConfig('eth0').has_key('addr') or about.getIfConfig('eth1').has_key('addr') or about.getIfConfig('wlan0').has_key('addr') or about.getIfConfig('ra0').has_key('addr'):
            try:
                print '[OnlineVersionCheck] Checking feeds state'
                req = urllib2.Request('http://openvix.co.uk/TrafficLightState.php')
                d = urllib2.urlopen(req)
                trafficLight = d.read()
            except urllib2.HTTPError as err:
                print '[OnlineVersionCheck] ERROR:', err
                trafficLight = err.code
            except urllib2.URLError as err:
                print '[OnlineVersionCheck] ERROR:', err.reason[0]
                trafficLight = err.reason[0]
            except urllib2 as err:
                print '[OnlineVersionCheck] ERROR:', err
                trafficLight = err
            except:
                print '[OnlineVersionCheck] ERROR:', sys.exc_info()[0]
                trafficLight = -2

            if not self.IsInt(trafficLight) and getImageType() != 'release':
                trafficLight = 'unknown'
            elif trafficLight == 'stable':
                status = '0'
            config.softwareupdate.updateisunstable.setValue(status)
            print '[OnlineVersionCheck] PASSED:', trafficLight
            return trafficLight
        else:
            print '[OnlineVersionCheck] ERROR: -2'
            return -2
Ejemplo n.º 10
0
	def JobStart(self):
		config.softwareupdate.updatefound.setValue(False)
		if (getImageType() != 'release' and feedsstatuscheck.getFeedsBool() == 'unknown') or (getImageType() == 'release' and feedsstatuscheck.getFeedsBool() in ('stable', 'unstable')):
			print '[OnlineVersionCheck] Starting background check.'
			feedsstatuscheck.startCheck()
		else:
			print '[OnlineVersionCheck] No feeds found, skipping check.'
Ejemplo n.º 11
0
	def getlog(self):
		releasenotes = ""
		fd = open('/etc/' + self.logtype + '-git.log', 'r')
		for line in fd.readlines():
			if getImageType() == 'release' and line.startswith('openvix: developer'):
				continue
			elif getImageType() == 'developer' and line.startswith('openvix: release'):
				continue
			releasenotes += line
		fd.close()
		self["text"].setText(releasenotes)
		summarytext = releasenotes
		try:
			self['title_summary'].setText(summarytext[0] + ':')
			self['text_summary'].setText(summarytext[1])
		except:
			self['title_summary'].setText("")
			self['text_summary'].setText("")
Ejemplo n.º 12
0
	def populate(self):
		self["lab1"] = StaticText(_("Virtuosso Image Xtreme"))
		self["lab2"] = StaticText(_("By Team ViX"))
		model = None
		AboutText = ""
		self["lab3"] = StaticText(_("Support at") + " www.world-of-satellite.com")

		AboutText += _("Model:\t%s %s\n") % (getMachineBrand(), getMachineName())

		if path.exists('/proc/stb/info/chipset'):
			AboutText += _("Chipset:\tBCM%s\n") % about.getChipSetString()

		AboutText += _("CPU:\t%s\n") % about.getCPUString()
		AboutText += _("CPU speed:\t%s\n") % about.getCPUSpeedString()
		AboutText += _("Cores:\t%s\n") % about.getCpuCoresString()
		imageSubBuild = ""
		if getImageType() != 'release':
			imageSubBuild = ".%s" % getImageDevBuild()
		AboutText += _("Build:\t%s.%s%s (%s)\n") % (getImageVersion(), getImageBuild(), imageSubBuild, getImageType().title())
		AboutText += _("Skin name:\t%s\n") % config.skin.primary_skin.value[0:-9]

		string = getDriverDate()
		year = string[0:4]
		month = string[4:6]
		day = string[6:8]
		driversdate = '-'.join((year, month, day))
		AboutText += _("Drivers:\t%s\n") % driversdate
		AboutText += _("Kernel:\t%s\n") % about.getKernelVersionString()

		AboutText += _("GStreamer:\t%s\n") % about.getGStreamerVersionString().replace("GStreamer ","")
		AboutText += _("Python:\t%s\n") % about.getPythonVersionString()

		AboutText += _("Installed:\t%s\n") % about.getFlashDateString()
		AboutText += _("Last update:\t%s\n\n") % getEnigmaVersionString()

		fp_version = getFPVersion()
		if fp_version is None:
			fp_version = ""
		elif fp_version != 0:
			fp_version = _("Frontprocessor version: %d") % fp_version
			AboutText += fp_version + "\n"

		tempinfo = ""
		if path.exists('/proc/stb/sensors/temp0/value') and getBoxType() not in ('gbquad'):
			f = open('/proc/stb/sensors/temp0/value', 'r')
			tempinfo = f.read()
			f.close()
		elif path.exists('/proc/stb/fp/temp_sensor') and getBoxType() not in ('gbquad'):
			f = open('/proc/stb/fp/temp_sensor', 'r')
			tempinfo = f.read()
			f.close()
		if tempinfo and int(tempinfo.replace('\n', '')) > 0:
			mark = str('\xc2\xb0')
			AboutText += _("System temperature: %s%sC\n\n") % (tempinfo.replace('\n', ''), mark)

		self["AboutScrollLabel"] = ScrollLabel(AboutText)
Ejemplo n.º 13
0
	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()
Ejemplo n.º 14
0
	def JobStart(self):
		try:
			if not path.exists(self.BackupDirectory):
				mkdir(self.BackupDirectory, 0755)
			if path.exists(self.BackupDirectory + config.imagemanager.folderprefix.value + '-' + getImageType() + "-swapfile_backup"):
				system('swapoff ' + self.BackupDirectory + config.imagemanager.folderprefix.value + '-' + getImageType() + "-swapfile_backup")
				remove(self.BackupDirectory + config.imagemanager.folderprefix.value + '-' + getImageType() + "-swapfile_backup")
		except Exception, e:
			print str(e)
			print "Device: " + config.imagemanager.backuplocation.value + ", i don't seem to have write access to this device."
Ejemplo n.º 15
0
	def getStableUpdateAvailable(self):
		if config.softwareupdate.updatefound.value and config.softwareupdate.check.value:
			if getImageType() != 'release' or config.softwareupdate.updateisunstable.value == '0':
				print '[OnlineVersionCheck] New Release updates found'
				return True
			else:
				print '[OnlineVersionCheck] skipping as unstable is not wanted'
				return False
		else:
			return False
Ejemplo n.º 16
0
	def getUnstableUpdateAvailable(self):
		if config.softwareupdate.updatefound.value and config.softwareupdate.check.value:
			if getImageType() != 'release' or (config.softwareupdate.updateisunstable.value == '1' and config.softwareupdate.updatebeta.value):
				print '[OnlineVersionCheck] New Experimental updates found'
				return True
			else:
				print '[OnlineVersionCheck] skipping as beta is not wanted'
				return False
		else:
			return False
Ejemplo n.º 17
0
	def okbuttonClick(self):
		recordings = self.session.nav.getRecordings()
		next_rec_time = self.session.nav.RecordTimer.getNextRecordingTime()
		if recordings or (next_rec_time and next_rec_time > 0 and (next_rec_time - time()) < 360):
			if getImageType() == 'release':
				self.session.open(MessageBox, _("Recording(s) are in progress or coming up in few seconds!"), MessageBox.TYPE_INFO, timeout=5, enable_input=False)
			else:
				message = _("Recording(s) are in progress or coming up in few seconds!")
				ybox = self.session.openWithCallback(self.processok, MessageBox, message, MessageBox.TYPE_YESNO)
				ybox.setTitle(_("Are You Sure ?"))
		else:
			self.processok(True)
Ejemplo n.º 18
0
 def ipkgCallback(self, event, param):
     global error
     config.softwareupdate.updatefound.setValue(False)
     if event == IpkgComponent.EVENT_ERROR:
         error += 1
     elif event == IpkgComponent.EVENT_DONE:
         if self.updating:
             self.updating = False
             self.ipkg.startCmd(IpkgComponent.CMD_UPGRADE_LIST)
         elif self.ipkg.currentCommand == IpkgComponent.CMD_UPGRADE_LIST:
             self.total_packages = len(self.ipkg.getFetchedList())
             if self.total_packages and (getImageType() != 'release' or config.softwareupdate.updateisunstable.value == '1' and config.softwareupdate.updatebeta.value or config.softwareupdate.updateisunstable.value == '0'):
                 print '[OnlineVersionCheck] %s Updates available' % self.total_packages
                 config.softwareupdate.updatefound.setValue(True)
Ejemplo n.º 19
0
 def populate(self):
     EGAMIVersion = _('EGAMI %s') % about.getImageVersionString()
     self['lab1'] = Label(EGAMIVersion)
     model = None
     AboutText = ''
     AboutText += _('Model:\t%s %s\n') % (getMachineBrand(), getMachineName())
     if path.exists('/proc/stb/info/chipset'):
         AboutText += _('Chipset:\tBCM%s\n') % about.getChipSetString()
     AboutText += _('CPU:\t%s\n') % about.getCPUString()
     AboutText += _('CPU speed:\t%s\n') % about.getCPUSpeedString()
     AboutText += _('Cores:\t%s\n') % about.getCpuCoresString()
     AboutText += _('Version:\t%s') % EGAMIVersion + '\n'
     AboutText += _('Kernel:\t%s') % about.getKernelVersionString() + '\n'
     AboutText += _('Oe-Core:\tOe-Alliance 3.4') + '\n'
     AboutText += _('Moderator:\tRedouane') + '\n'
     AboutText += _('Image Type:\t%s\n') % getImageType().title()
     AboutText += _('Skin name:\t%s\n') % config.skin.primary_skin.value[0:-9]
     string = getDriverDate()
     year = string[0:4]
     month = string[4:6]
     day = string[6:8]
     driversdate = '-'.join((year, month, day))
     AboutText += _('Drivers:\t%s') % driversdate + '\n'
     fp_version = getFPVersion()
     if fp_version is None:
         fp_version = ''
     elif fp_version != 0:
         fp_version = _('Front panel:\t%s') % str(fp_version)
         AboutText += fp_version + '\n'
     AboutText += _('Python:\t%s\n') % about.getPythonVersionString()
     AboutText += _('GStreamer:\t%s') % about.getGStreamerVersionString().replace('GStreamer', '') + '\n\n'
     tempinfo = ''
     if path.exists('/proc/stb/sensors/temp0/value') and getBoxType() not in 'gbquad':
         f = open('/proc/stb/sensors/temp0/value', 'r')
         tempinfo = f.read()
         f.close()
     elif path.exists('/proc/stb/fp/temp_sensor') and getBoxType() not in 'gbquad':
         f = open('/proc/stb/fp/temp_sensor', 'r')
         tempinfo = f.read()
         f.close()
     if tempinfo and int(tempinfo.replace('\n', '')) > 0:
         mark = str('\xc2\xb0')
         AboutText += _('System temperature: %s') % tempinfo.replace('\n', '') + mark + 'C\n\n'
     AboutText += _('Installed:\t%s\n') % about.getFlashDateString()
     AboutText += _('Last update:\t%s') % getEnigmaVersionString() + '\n\n'
     AboutText += _('WWW:\t%s') % about.getImageUrlString()
     self['AboutScrollLabel'] = ScrollLabel(AboutText)
     return
Ejemplo n.º 20
0
	def getFeedSatus(self):
		status = '1'
		if getImageType() == 'developer':
			config.softwareupdate.updateisunstable.setValue(status)
			return 'stable'
		trafficLight = 'unknown'
		if about.getIfConfig('eth0').has_key('addr') or about.getIfConfig('eth1').has_key('addr') or about.getIfConfig('wlan0').has_key('addr') or about.getIfConfig('ra0').has_key('addr'):
			try:
				req = urllib2.Request('http://openvix.co.uk/TrafficLightState.php')
				d = urllib2.urlopen(req)
				trafficLight = d.read()
			except urllib2.HTTPError, err:
				print 'ERROR:',err
				trafficLight = err.code
			except urllib2.URLError, err:
				print 'ERROR:',err.reason[0]
				trafficLight = err.reason[0]
Ejemplo n.º 21
0
 def populate(self):
     EGAMIVersion = _("EGAMI %s") % about.getImageVersionString()
     self["lab1"] = Label(EGAMIVersion)
     model = None
     AboutText = ""
     AboutText += _("Model:\t%s %s\n") % (getMachineBrand(), getMachineName())
     if path.exists("/proc/stb/info/chipset"):
         AboutText += _("Chipset:\tBCM%s\n") % about.getChipSetString()
     AboutText += _("CPU:\t%s\n") % about.getCPUString()
     AboutText += _("CPU Speed:\t%s\n") % about.getCPUSpeedString()
     AboutText += _("Cores:\t%s\n") % about.getCpuCoresString()
     AboutText += _("Version:\t%s") % EGAMIVersion + "\n"
     AboutText += _("Kernel:\t%s") % about.getKernelVersionString() + "\n"
     AboutText += _("Oe-Core:\t%s") % about.getEnigmaVersionString() + "\n"
     AboutText += _("Image Type:\t%s\n") % getImageType().title()
     AboutText += _("Image Coder:\tSODO\n")
     string = getDriverDate()
     year = string[0:4]
     month = string[4:6]
     day = string[6:8]
     driversdate = "-".join((year, month, day))
     AboutText += _("Drivers:\t%s") % driversdate + "\n"
     fp_version = getFPVersion()
     if fp_version is None:
         fp_version = ""
     elif fp_version != 0:
         fp_version = _("Front panel:\t%s") % str(fp_version)
         AboutText += fp_version + "\n"
     AboutText += _("Python:\t%s\n") % about.getPythonVersionString()
     AboutText += _("GStreamer:\t%s") % about.getGStreamerVersionString().replace("GStreamer", "") + "\n\n"
     tempinfo = ""
     if path.exists("/proc/stb/sensors/temp0/value") and getBoxType() not in "gbquad":
         f = open("/proc/stb/sensors/temp0/value", "r")
         tempinfo = f.read()
         f.close()
     elif path.exists("/proc/stb/fp/temp_sensor") and getBoxType() not in "gbquad":
         f = open("/proc/stb/fp/temp_sensor", "r")
         tempinfo = f.read()
         f.close()
     if tempinfo and int(tempinfo.replace("\n", "")) > 0:
         mark = str("\xc2\xb0")
         AboutText += _("System temperature: %s") % tempinfo.replace("\n", "") + mark + "C\n\n"
     AboutText += _("Installed:\t%s\n") % about.getFlashDateString()
     AboutText += _("Last update:\t%s") % getEnigmaVersionString() + "\n\n"
     AboutText += _("WWW:\t%s") % about.getImageUrlString()
     self["AboutScrollLabel"] = ScrollLabel(AboutText)
Ejemplo n.º 22
0
 def ipkgCallback(self, event, param):
     config.softwareupdate.updatefound.setValue(False)
     if event == IpkgComponent.EVENT_ERROR:
         global error
         error += 1
     elif event == IpkgComponent.EVENT_DONE:
         if self.updating:
             self.updating = False
             self.ipkg.startCmd(IpkgComponent.CMD_UPGRADE_LIST)
         elif self.ipkg.currentCommand == IpkgComponent.CMD_UPGRADE_LIST:
             self.total_packages = len(self.ipkg.getFetchedList())
             if self.total_packages and (
                     getImageType() != 'release' or
                 (config.softwareupdate.updateisunstable.value == '1'
                  and config.softwareupdate.updatebeta.value) or
                     config.softwareupdate.updateisunstable.value == '0'):
                 print('[OnlineVersionCheck] %s Updates available' %
                       self.total_packages)
                 config.softwareupdate.updatefound.setValue(True)
     pass
Ejemplo n.º 23
0
	def getFeedStatus(self):
		status = '1'
		trafficLight = 'stable'
		if getImageType() != 'rubbish':
			status = '0'
			config.softwareupdate.updateisunstable.setValue(status)
			return 'stable'
		trafficLight = 'unknown'
		if about.getIfConfig('eth0').has_key('addr') or about.getIfConfig('eth1').has_key('addr') or about.getIfConfig('wlan0').has_key('addr') or about.getIfConfig('ra0').has_key('addr'):
			try:
				print '[OnlineVersionCheck] Checking feeds state'
				req = urllib2.Request('http://openvix.co.uk/TrafficLightState.php')
				d = urllib2.urlopen(req)
				trafficLight = d.read()
			except urllib2.HTTPError, err:
				print '[OnlineVersionCheck] ERROR:',err
				trafficLight = err.code
			except urllib2.URLError, err:
				print '[OnlineVersionCheck] ERROR:',err.reason[0]
				trafficLight = err.reason[0]
Ejemplo n.º 24
0
 def getFeedSatus(self):
     status = '1'
     if getImageType() != 'release':
         config.softwareupdate.updateisunstable.setValue(status)
         return 'stable'
     trafficLight = 'unknown'
     if about.getIfConfig('eth0').has_key('addr') or about.getIfConfig(
             'eth1').has_key('addr') or about.getIfConfig('wlan0').has_key(
                 'addr') or about.getIfConfig('ra0').has_key('addr'):
         try:
             req = urllib2.Request(
                 'http://openvix.co.uk/TrafficLightState.php')
             d = urllib2.urlopen(req)
             trafficLight = d.read()
         except urllib2.HTTPError, err:
             print 'ERROR:', err
             trafficLight = err.code
         except urllib2.URLError, err:
             print 'ERROR:', err.reason[0]
             trafficLight = err.reason[0]
Ejemplo n.º 25
0
	def getFeedStatus(self):
		status = '1'
		trafficLight = 'unknown'
		if self.adapterAvailable():
			if self.NetworkUp():
				if getImageType() == 'release': # we know the network is good now so only do this check on release images where the release domain applies
					try:
						print '[OnlineVersionCheck] Checking feeds state'
						req = urllib2.Request('http://openvix.co.uk/TrafficLightState.php')
						d = urllib2.urlopen(req)
						trafficLight = d.read()
					except urllib2.HTTPError, err:
						print '[OnlineVersionCheck] ERROR:',err
						trafficLight = err.code
					except urllib2.URLError, err:
						print '[OnlineVersionCheck] ERROR:',err.reason[0]
						trafficLight = err.reason[0]
					except urllib2, err:
						print '[OnlineVersionCheck] ERROR:',err
						trafficLight = err
					except:
Ejemplo n.º 26
0
	def getFeedStatus(self):
		status = '1'
		trafficLight = 'unknown'
		if self.adapterAvailable():
			if self.NetworkUp():
				if getImageType() == 'release': # we know the network is good now so only do this check on release images where the release domain applies
					try:
						print '[OnlineVersionCheck] Checking feeds state'
						req = urllib2.Request('http://openvix.co.uk/TrafficLightState.php')
						d = urllib2.urlopen(req)
						trafficLight = d.read()
					except urllib2.HTTPError, err:
						print '[OnlineVersionCheck] ERROR:',err
						trafficLight = err.code
					except urllib2.URLError, err:
						print '[OnlineVersionCheck] ERROR:',err.reason[0]
						trafficLight = err.reason[0]
					except urllib2, err:
						print '[OnlineVersionCheck] ERROR:',err
						trafficLight = err
					except:
Ejemplo n.º 27
0
	def getLatestImageTimestamp(self):
		currentTimeoutDefault = socket.getdefaulttimeout()
		socket.setdefaulttimeout(3)
		url = "http://altoconsejojedi.es" % (getImageVersion(), getImageType(), getBoxType())
		# print "[SoftwareUpdate] url buildtimestamp: ", url
		try:
			# TODO: Use Twisted's URL fetcher, urlopen is evil. And it can
			# run in parallel to the package update.
			from time import strftime
			from datetime import datetime
			try:
				latestImageTimestamp = datetime.fromtimestamp(int(urlopen(url, timeout=5).read())).strftime(_("%Y-%m-%d %H:%M"))
			except:
				# bypass the certificate check
				from ssl import _create_unverified_context
				latestImageTimestamp = datetime.fromtimestamp(int(urlopen(url, timeout=5, context=_create_unverified_context()).read())).strftime(_("%Y-%m-%d %H:%M"))
		except:
			latestImageTimestamp = ""
		print latestImageTimestamp
		print "[SoftwareUpdate] latestImageTimestamp:", latestImageTimestamp
		socket.setdefaulttimeout(currentTimeoutDefault)
		return latestImageTimestamp
Ejemplo n.º 28
0
	def __init__(self, session, updatebackup=False):
		Screen.__init__(self, session)
		self.Console = Console()
		self.BackupDevice = config.imagemanager.backuplocation.value
		print "[ImageManager] Device: " + self.BackupDevice
		self.BackupDirectory = config.imagemanager.backuplocation.value + 'imagebackups/'
		print "[ImageManager] Directory: " + self.BackupDirectory
		self.BackupDate = strftime('%Y%m%d_%H%M%S', localtime())
		self.WORKDIR = self.BackupDirectory + config.imagemanager.folderprefix.value + '-' + getImageType() + '-temp'
		self.TMPDIR = self.BackupDirectory + config.imagemanager.folderprefix.value + '-' + getImageType() + '-mount'
		backupType = "-"
		if updatebackup:
			backupType = "-SoftwareUpdate-"
		imageSubBuild = ""
		if getImageType() != 'release':
			imageSubBuild = ".%s" % getImageDevBuild()
		self.MAINDESTROOT = self.BackupDirectory + config.imagemanager.folderprefix.value + '-' + getImageType() + backupType + getImageVersion() + '.' + getImageBuild() + imageSubBuild + '-' + self.BackupDate
		self.kernelMTD = getMachineMtdKernel()
		self.kernelFILE = getMachineKernelFile()
		self.rootMTD = getMachineMtdRoot()
		self.rootFILE = getMachineRootFile()
		self.MAINDEST = self.MAINDESTROOT + '/' + getImageFolder() + '/'
		print '[ImageManager] MTD: Kernel:',self.kernelMTD
		print '[ImageManager] MTD: Root:',self.rootMTD
		print '[ImageManager] Type:',getImageFileSystem()
		if 'ubi' in getImageFileSystem():
			self.ROOTFSTYPE = 'ubifs'
		elif 'tar.bz2' in getImageFileSystem():
			self.ROOTFSTYPE = 'tar.bz2'
		else:
			self.ROOTFSTYPE= 'jffs2'
		self.swapdevice = ""
		self.RamChecked = False
		self.SwapCreated = False
		self.Stage1Completed = False
		self.Stage2Completed = False
		self.Stage3Completed = False
		self.Stage4Completed = False
		self.Stage5Completed = False
Ejemplo n.º 29
0
	def checkTraficLight(self):
		self.activityTimer.callback.remove(self.checkTraficLight)
		self.activityTimer.start(100, False)
		message = ""
		picon = None
		default = True
		url = "http://images.teamblue.tech/status/%s-%s/" % (getImageVersion(), getImageType())
		# print "[SoftwareUpdate] url status: ", url
		try:
			# TODO: Use Twisted's URL fetcher, urlopen is evil. And it can
			# run in parallel to the package update.
			try:
				status = urlopen(url, timeout=5).read().split('!', 1)
				print status
			except:
				# bypass the certificate check
				from ssl import _create_unverified_context
				status = urlopen(url, timeout=5, context=_create_unverified_context()).read().split('!', 1)
				print status
			# prefer getMachineBuild
			if getMachineBuild() in status[0].split(','):
				message = len(status) > 1 and status[1] or _("The current software might not be stable.\nFor more information see %s.") % ("http://images.teamblue.tech")
				picon = MessageBox.TYPE_ERROR
				default = False
			# only use getBoxType if no getMachineBuild
			elif getBoxType() in status[0].split(','):
				message = len(status) > 1 and status[1] or _("The current software might not be stable.\nFor more information see %s.") % ("http://images.teamblue.tech")
				picon = MessageBox.TYPE_ERROR
				default = False
		except:
			message = _("The status of the current software could not be checked because %s can not be reached.") % ("http://images.teamblue.tech")
			picon = MessageBox.TYPE_ERROR
			default = False
		if default:
			self.showDisclaimer()
		else:
			message += "\n" + _("Do you want to update your receiver?")
			self.session.openWithCallback(self.startActualUpdate, MessageBox, message, default = default, picon = picon)
Ejemplo n.º 30
0
    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=30,
                close_on_any_key=True)
            return
        else:
            if getImageType() != 'release' or (
                    config.softwareupdate.updateisunstable.value == '1'
                    and config.softwareupdate.updatebeta.value
            ) or config.softwareupdate.updateisunstable.value == '0':
                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
                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)
Ejemplo n.º 31
0
    def populate(self):
        self["lab1"] = StaticText(_("Open Black Hole"))
        self["lab2"] = StaticText(_("From the BH Team"))
        model = None
        AboutText = ""
        self["lab3"] = StaticText(
            _("Support at %s") % "www.vuplus-community.net")

        AboutText += _("Model:\t%s %s\n") % (getMachineBrand(),
                                             getMachineName())

        if about.getChipSetString() != _("unavailable"):
            if SystemInfo["HasHiSi"]:
                AboutText += _("Chipset:\tHiSilicon %s\n"
                               ) % about.getChipSetString().upper()
            elif about.getIsBroadcom():
                AboutText += _("Chipset:\tBroadcom %s\n"
                               ) % about.getChipSetString().upper()
            else:
                AboutText += _(
                    "Chipset:\t%s\n") % about.getChipSetString().upper()

        AboutText += _("CPU:\t%s %s %s\n") % (about.getCPUArch(),
                                              about.getCPUSpeedString(),
                                              about.getCpuCoresString())
        imageSubBuild = ""
        if getImageType() != 'release':
            imageSubBuild = ".%s" % getImageDevBuild()
        AboutText += _("Image:\t%s.%s%s (%s)\n") % (getImageVersion(
        ), getImageBuild(), imageSubBuild, getImageType().title())

        if SystemInfo["HasH9SD"]:
            if "rootfstype=ext4" in open(
                    '/sys/firmware/devicetree/base/chosen/bootargs',
                    'r').read():
                part = "        - SD card in use for Image root \n"
            else:
                part = "        - eMMC slot in use for Image root \n"
            AboutText += _("%s") % part

        if SystemInfo["canMultiBoot"]:
            slot = image = GetCurrentImage()
            part = "eMMC slot %s" % slot
            bootmode = ""
            if SystemInfo["canMode12"]:
                bootmode = "bootmode = %s" % GetCurrentImageMode()
            print "[About] HasHiSi = %s, slot = %s" % (SystemInfo["HasHiSi"],
                                                       slot)
            if SystemInfo["HasHiSi"] and "sda" in SystemInfo["canMultiBoot"][
                    slot]['root']:
                if slot > 4:
                    image -= 4
                else:
                    image -= 1
                part = "SDcard slot %s (%s) " % (
                    image, SystemInfo["canMultiBoot"][slot]['root'])
            AboutText += _("Image Slot:\t%s") % "STARTUP_" + str(
                slot) + "  " + part + " " + bootmode + "\n"

        skinWidth = getDesktop(0).size().width()
        skinHeight = getDesktop(0).size().height()

        string = getDriverDate()
        year = string[0:4]
        month = string[4:6]
        day = string[6:8]
        driversdate = '-'.join((year, month, day))
        AboutText += _("Drivers:\t%s\n") % driversdate
        AboutText += _("Kernel:\t%s\n") % about.getKernelVersionString()
        AboutText += _("GStreamer:\t%s\n") % about.getGStreamerVersionString(
        ).replace("GStreamer ", "")
        AboutText += _("FFmpeg:\t%s\n") % about.getFFmpegVersionString(
        ).replace("FFmpeg ", "")
        AboutText += _("Python:\t%s\n") % about.getPythonVersionString()
        AboutText += _("Installed:\t%s\n") % about.getFlashDateString()
        AboutText += _("Last update:\t%s\n") % getEnigmaVersionString()
        AboutText += _("E2 (re)starts:\t%s\n") % config.misc.startCounter.value
        AboutText += _("Skin:\t%s") % config.skin.primary_skin.value[0:-9] + _(
            "  (%s x %s)") % (skinWidth, skinHeight) + "\n"

        tempinfo = ""
        if path.exists('/proc/stb/sensors/temp0/value'):
            with open('/proc/stb/sensors/temp0/value', 'r') as f:
                tempinfo = f.read()
        elif path.exists('/proc/stb/fp/temp_sensor'):
            with open('/proc/stb/fp/temp_sensor', 'r') as f:
                tempinfo = f.read()
        elif path.exists('/proc/stb/sensors/temp/value'):
            with open('/proc/stb/sensors/temp/value', 'r') as f:
                tempinfo = f.read()
        if tempinfo and int(tempinfo.replace('\n', '')) > 0:
            mark = str('\xc2\xb0')
            AboutText += _("System temp:\t%s") % tempinfo.replace(
                '\n', '').replace(' ', '') + mark + "C\n"

        tempinfo = ""
        if path.exists('/proc/stb/fp/temp_sensor_avs'):
            with open('/proc/stb/fp/temp_sensor_avs', 'r') as f:
                tempinfo = f.read()
        elif path.exists('/sys/devices/virtual/thermal/thermal_zone0/temp'):
            try:
                with open('/sys/devices/virtual/thermal/thermal_zone0/temp',
                          'r') as f:
                    tempinfo = f.read()
                    tempinfo = tempinfo[:-4]
            except:
                tempinfo = ""
        elif path.exists('/proc/hisi/msp/pm_cpu'):
            try:
                tempinfo = search(
                    'temperature = (\d+) degree',
                    open("/proc/hisi/msp/pm_cpu").read()).group(1)
            except:
                tempinfo = ""
        if tempinfo and int(tempinfo) > 0:
            mark = str('\xc2\xb0')
            AboutText += _("Processor temp:\t%s") % tempinfo.replace(
                '\n', '').replace(' ', '') + mark + "C\n"
        AboutLcdText = AboutText.replace('\t', ' ')

        fp_version = getFPVersion()
        if fp_version is None:
            fp_version = ""
        elif fp_version != 0:
            fp_version = _("FP version:\t%s") % fp_version
            AboutText += fp_version + "\n"

        bootloader = ""
        if path.exists('/sys/firmware/devicetree/base/bolt/tag'):
            f = open('/sys/firmware/devicetree/base/bolt/tag', 'r')
            bootloader = f.readline().replace('\x00', '').replace('\n', '')
            f.close()
            AboutText += _("Bootloader:\t%s\n") % (bootloader)

        self["AboutScrollLabel"] = ScrollLabel(AboutText)
Ejemplo n.º 32
0
from Components.Sources.StaticText import StaticText
from Components.Button import Button
from Components.ScrollLabel import ScrollLabel
from Components.Label import Label
from Components.config import config
from Screens.Screen import Screen

from enigma import eTimer
from boxbranding import getImageVersion, getImageBuild, getImageDevBuild, getImageType
from sys import modules

from datetime import datetime
from json import loads
import urllib2

if getImageType() == 'release':
	ImageVer = "%03d" % int(getImageBuild())
else:
	ImageVer = "%s.%s" % (getImageBuild(),getImageDevBuild())
	ImageVer = float(ImageVer)

E2Branches = {
	'developer' : 'Dev',
	'release' : 'master'
	}

project = 0
projects = [
	("https://api.github.com/repos/oe-alliance/oe-alliance-core/commits?sha=4.1", "OE-A Core"),
	("https://api.github.com/repos/OpenViX/enigma2/commits?sha=%s" % E2Branches[getImageType()], "Enigma2"),
	("https://api.github.com/repos/OpenViX/vix-core/commits", "ViX Core"),
Ejemplo n.º 33
0
    def updateInfo(self):
        rc = system("df -h > /tmp/syinfo.tmp")
        text = _("STB \n") + _("Brand:") + "\tVuplus\n"
        f = open("/proc/stb/info/vumodel", 'r')
        text += _("Model:\t%s \n") % (getMachineName())
        f = open("/proc/stb/info/chipset", 'r')
        text += _("Chipset:\t%s \n") % about.getChipSetString().upper() + "\n"
        text += _("MEMORY\n")
        memTotal = memFree = swapTotal = swapFree = 0
        for line in open("/proc/meminfo", 'r'):
            parts = line.replace("k", "K").split(':')
            key = parts[0].strip()
            if key == "MemTotal":
                memTotal = parts[1].strip()
            elif key in ("MemFree", "Buffers", "Cached"):
                memFree += int(parts[1].strip().split(' ', 1)[0])
            elif key == "SwapTotal":
                swapTotal = parts[1].strip()
            elif key == "SwapFree":
                swapFree = parts[1].strip()
        text += _("Total memory:") + "\t%s\n" % memTotal
        text += _("Free memory:") + "\t%s KB\n" % memFree
        text += _("Swap total:") + "\t%s \n" % swapTotal
        text += _("Swap free:") + "\t%s \n" % swapFree
        text += "\n" + _("STORAGE") + "\n"
        f = open("/tmp/syinfo.tmp", 'r')
        line = f.readline()
        parts = line.split()
        text += _("Filesystem:") + "\t" + "{0:<16}".format(
            parts[1]) + "{0:<15}".format(parts[2]) + "{0:<14}".format(
                parts[3]) + "{0:<14}".format(parts[4]) + "\n"
        line = f.readline()
        parts = line.replace('M', 'MB').replace('G',
                                                'GB').replace('K',
                                                              'KB').split()
        text += _("Flash:") + "\t" + "{0:<14}".format(
            parts[1]) + "{0:<12}".format(parts[2]) + "{0:<14}".format(
                parts[3]) + "{0:<0}".format(parts[4]) + "\n"
        for line in f.readlines():
            if line.find('/media/') != -1:
                line = line.replace('/media/',
                                    '').replace('hdd',
                                                'Hdd:').replace('usb', 'Usb:')
                parts = line.split()
                if len(parts) == 6:
                    if line.find('Hdd:') != -1:
                        parts = line.replace('M',
                                             'MB').replace('G', 'GB').replace(
                                                 'K', 'KB').split()
                        text += _("Hdd:") + "\t" + "{0:<12}".format(
                            parts[1]) + "{0:<12}".format(
                                parts[2]) + "{0:<13}".format(
                                    parts[3]) + "{0:<14}".format(
                                        parts[4]) + "\n"
                if len(parts) == 6:
                    if line.find('Usb:') != -1:
                        parts = line.replace('M',
                                             'MB').replace('G', 'GB').replace(
                                                 'K', 'KB').split()
                        text += _("Usb:") + "\t" + "{0:<14}".format(
                            parts[1]) + "{0:<14}".format(
                                parts[2]) + "{0:<12}".format(
                                    parts[3]) + "{0:<14}".format(
                                        parts[4]) + "\n"
        f.close()
        os_remove("/tmp/syinfo.tmp")

        text += "\n" + _("SOFTWARE") + "\n"
        text += "Image:\t" + "Openbh %s.%s (%s)\n" % (
            getImageVersion(), getImageBuild(), getImageType().title())
        text += "Enigma2: \t" + about.getEnigmaVersionString() + "\n"
        text += "Kernel: \t" + about.getKernelVersionString() + "\n"
        self["lab1"].setText(text)
Ejemplo n.º 34
0
    numVideoDecoders = 0
    while fileExists("/dev/dvb/adapter0/video%d" % numVideoDecoders, "f"):
        numVideoDecoders += 1
    return numVideoDecoders


def countFrontpanelLEDs():
    numLeds = fileExists("/proc/stb/fp/led_set_pattern") and 1 or 0
    while fileExists("/proc/stb/fp/led%d_pattern" % numLeds):
        numLeds += 1
    return numLeds


SystemInfo["MachineBrand"] = getMachineBrand()
SystemInfo["MachineName"] = getMachineName()
SystemInfo["DeveloperImage"] = getImageType().lower() != "release"
SystemInfo["CommonInterface"] = eDVBCIInterfaces.getInstance().getNumOfSlots()
SystemInfo["CommonInterfaceCIDelay"] = fileCheck("/proc/stb/tsmux/rmx_delay")
for cislot in range(0, SystemInfo["CommonInterface"]):
    SystemInfo["CI%dSupportsHighBitrates" % cislot] = fileCheck(
        "/proc/stb/tsmux/ci%d_tsclk" % cislot)
    SystemInfo["CI%dRelevantPidsRoutingSupport" % cislot] = fileCheck(
        "/proc/stb/tsmux/ci%d_relevant_pids_routing" % cislot)
SystemInfo["NumVideoDecoders"] = getNumVideoDecoders()
SystemInfo["Udev"] = not fileExists("/dev/.devfsd")
SystemInfo["PIPAvailable"] = SystemInfo["NumVideoDecoders"] > 1
SystemInfo["CanMeasureFrontendInputPower"] = eDVBResourceManager.getInstance(
).canMeasureFrontendInputPower()
SystemInfo["12V_Output"] = Misc_Options.getInstance().detected_12V_output()
SystemInfo["ZapMode"] = fileCheck("/proc/stb/video/zapmode") or fileCheck(
    "/proc/stb/video/zapping_mode")
Ejemplo n.º 35
0
def readGithubCommitLogs():
    global ImageVer
    global cachedProjects
    cachedProjects = {}
    blockstart = False
    gitstart = True
    url = projects[project][0]
    commitlog = ""
    try:
        try:
            from ssl import _create_unverified_context
            log = loads(
                urllib2.urlopen(url,
                                timeout=5,
                                context=_create_unverified_context()).read())
        except:
            log = loads(urllib2.urlopen(url, timeout=5).read())
        for c in log:
            if c['commit']['message'].startswith('openbh:') or (
                    gitstart
                    and not c['commit']['message'].startswith('openvix:')
                    and getScreenTitle()
                    in ("Enigma2", "ViX Core", "ViX Skins", "OE-A Core")):
                continue
            if c['commit']['message'].startswith('openvix:'):
                blockstart = False
                gitstart = False
                if getImageType() == 'release' and c['commit'][
                        'message'].startswith('openvix: developer'):
                    print '[GitCommitLog] Skipping developer line'
                    continue
                elif getImageType() == 'developer' and c['commit'][
                        'message'].startswith('openvix: release'):
                    print '[GitCommitLog] Skipping release line'
                    continue
                tmp = c['commit']['message'].split(' ')[2].split('.')
                if len(tmp) > 2:
                    if getImageType() == 'release':
                        releasever = tmp[2]
                    else:
                        releasever = '%s.%s' % (tmp[2], tmp[3])
                releasever = float(releasever)
                if releasever > ImageVer:
                    blockstart = True
                    continue
            elif blockstart and getScreenTitle() in ("Enigma2", "ViX Core",
                                                     "ViX Skins", "OE-A Core"):
                blockstart = True
                continue

            creator = c['commit']['author']['name']
            title = c['commit']['message']
            date = datetime.strptime(c['commit']['committer']['date'],
                                     '%Y-%m-%dT%H:%M:%SZ').strftime('%x %X')
            commitlog += date + ' ' + creator + '\n' + title + 2 * '\n'
        commitlog = commitlog.encode('utf-8')
        cachedProjects[getScreenTitle()] = commitlog
    except urllib2.HTTPError, err:
        if err.code == 403:
            print '[GitCommitLog] It seems you have hit your API limit - please try again later.'
            commitlog += _(
                "It seems you have hit your API limit - please try again later."
            )
        else:
            print '[GitCommitLog] The commit log cannot be retrieved at the moment - please try again later.\n%s' % err
            commitlog += _(
                "The commit log cannot be retrieved at the moment - please try again later."
            )
Ejemplo n.º 36
0
	def getlog(self):
		global ocram
		try:
			sourcefile = 'http://www.openvix.co.uk/feeds/%s/%s/%s/%s-git.log' % (getImageDistro(), getImageType(), getImageVersion(), self.logtype)
			sourcefile,headers = urllib.urlretrieve(sourcefile)
			rename(sourcefile,'/tmp/' + self.logtype + '-git.log')
			fd = open('/tmp/' + self.logtype + '-git.log', 'r')
			releasenotes = fd.read()
			fd.close()
		except:
			releasenotes = '404 Not Found'
		if '404 Not Found' not in releasenotes:
			releasenotes = releasenotes.replace('openvix: build 165', 'openvix: build 000')
			releasenotes = releasenotes.replace('\nopenvix: build',"\n\nopenvix: build")
			releasenotes = releasenotes.split('\n\n')
			ver = -1
			releasever = ""
			viewrelease = ""
			while not releasever.isdigit():
				ver += 1
				releasever = releasenotes[int(ver)].split('\n')
				releasever = releasever[0].split(' ')
				if len(releasever) > 2:
					releasever = releasever[2].replace(':',"")
				else:
					releasever = releasever[0].replace(':',"")
			if self.logtype == 'oe':
				if int(getImageBuild()) == 1:
					imagever = int(getImageBuild())-1
				else:
					imagever = int(getImageBuild())
			else:
				imagever = int(getImageBuild())
			while int(releasever) > int(imagever):
				if ocram:
					viewrelease += releasenotes[int(ver)]+'\n'+ocram+'\n'
					ocram = ""
				else:
					viewrelease += releasenotes[int(ver)]+'\n\n'
				ver += 1
				releasever = releasenotes[int(ver)].split('\n')
				releasever = releasever[0].split(' ')
				releasever = releasever[2].replace(':',"")
			if not viewrelease and ocram:
				viewrelease = ocram
				ocram = ""
			self["text"].setText(viewrelease)
			summarytext = viewrelease.split(':\n')
			try:
				self['title_summary'].setText(summarytext[0]+':')
				self['text_summary'].setText(summarytext[1])
			except:
				self['title_summary'].setText("")
				self['text_summary'].setText(viewrelease)
		else:
			self['title_summary'].setText("")
			self['text_summary'].setText(_("Error downloading the change log."))
			self['text'].setText(_("Error downloading the change log."))
Ejemplo n.º 37
0
	def getlog(self):
		if config.usage.show_menupath.value == 'large':
			if not self.menu_path.endswith(self.screentitle):
				self.menu_path += self.screentitle
			title = self.menu_path
			self["menu_path_compressed"].setText("")
		elif config.usage.show_menupath.value == 'small':
			title = self.screentitle
			self["menu_path_compressed"].setText(self.menu_path + " >" if not self.menu_path.endswith(' / ') else self.menu_path[:-3] + " >" or "")
		else:
			title = self.screentitle
			self["menu_path_compressed"].setText("")
		self.setTitle(title)

		global ocram
		ocramprocessed = False
		releasenotes = gitlog.fetchlog(self.logtype)
		if '404 Not Found' not in releasenotes:
			if getImageType() == 'release':
				ImageVer = getImageBuild()
			else:
				ImageVer = "%s.%s" % (getImageBuild(),getImageDevBuild())
				ImageVer = float(ImageVer)

			releasenotes = releasenotes.split('\n\n')
			ver = -1
			releasever = ""
			viewrelease = ""
			while not releasever.replace('.','').isdigit():
				ver += 1
				releasever = releasenotes[int(ver)].split('\n')
				releasever = releasever[0].split('openbh: ')
				if len(releasever) > 1:
					releasever = releasever[1].split(' ')
					tmp = releasever[1].split('.')
					if len(tmp) > 2:
						if getImageType() == 'release':
							releasever = tmp[2]
						else:
							releasever = '%s.%s' % (tmp[2], tmp[3])
				else:
					releasever = releasever[0]

			while releasever > ImageVer:
				if ocram and not ocramprocessed and self.logtype == 'oe':
					viewrelease += releasenotes[int(ver)]+'\n'+ocram+'\n'
					ocramprocessed = True
				else:
					viewrelease += releasenotes[int(ver)]+'\n\n'
				ver += 1
				releasever = releasenotes[int(ver)].split('\n')
				releasever = releasever[0].split('openbh: ')
				if len(releasever) > 1:
					releasever = releasever[1].split(' ')
					tmp = releasever[1].split('.')
					if len(tmp) > 2:
						if getImageType() == 'release':
							releasever = tmp[2]
						else:
							releasever = '%s.%s' % (tmp[2], tmp[3])
							releasever = float(releasever)
				else:
					releasever = releasever[0]

			if not viewrelease and ocram and not ocramprocessed and self.logtype == 'oe':
				viewrelease = ocram
				ocramprocessed = True
			self["text"].setText(viewrelease)
			summarytext = viewrelease.split(':\n')
			try:
				self['title_summary'].setText(summarytext[0]+':')
				self['text_summary'].setText(summarytext[1])
			except:
				self['title_summary'].setText("")
				self['text_summary'].setText(viewrelease)
		else:
			self['title_summary'].setText("")
			self['text_summary'].setText(_("Error downloading the change log."))
			self['text'].setText(_("Error downloading the change log."))
Ejemplo n.º 38
0
    def populate(self):
        self["lab1"] = StaticText(_("Virtuosso Image Xtreme"))
        self["lab2"] = StaticText(_("By Team ViX"))
        model = None
        AboutText = ""
        self["lab3"] = StaticText(
            _("Support at") + " www.world-of-satellite.com")

        AboutText += _("Model:\t%s %s\n") % (getMachineBrand(),
                                             getMachineName())

        if path.exists('/proc/stb/info/chipset'):
            AboutText += _("Chipset:\tBCM%s\n") % about.getChipSetString()

        AboutText += _("CPU:\t%s\n") % about.getCPUString()
        AboutText += _("CPU speed:\t%s\n") % about.getCPUSpeedString()
        AboutText += _("Cores:\t%s\n") % about.getCpuCoresString()

        AboutText += _("Version:\t%s\n") % getImageVersion()
        AboutText += _("Build:\t%s\n") % getImageBuild()
        AboutText += _("Image type:\t%s\n") % getImageType().title()
        AboutText += _(
            "Skin name:\t%s\n") % config.skin.primary_skin.value[0:-9]

        string = getDriverDate()
        year = string[0:4]
        month = string[4:6]
        day = string[6:8]
        driversdate = '-'.join((year, month, day))
        AboutText += _("Drivers:\t%s\n") % driversdate
        AboutText += _("Kernel:\t%s\n") % about.getKernelVersionString()

        AboutText += _("GStreamer:\t%s\n") % about.getGStreamerVersionString(
        ).replace("GStreamer ", "")
        AboutText += _("Python:\t%s\n") % about.getPythonVersionString()

        AboutText += _("Installed:\t%s\n") % about.getFlashDateString()
        AboutText += _("Last update:\t%s\n\n") % getEnigmaVersionString()

        fp_version = getFPVersion()
        if fp_version is None:
            fp_version = ""
        elif fp_version != 0:
            fp_version = _("Frontprocessor version: %d") % fp_version
            AboutText += fp_version + "\n"

        tempinfo = ""
        if path.exists('/proc/stb/sensors/temp0/value') and getBoxType(
        ) not in ('gbquad'):
            f = open('/proc/stb/sensors/temp0/value', 'r')
            tempinfo = f.read()
            f.close()
        elif path.exists('/proc/stb/fp/temp_sensor') and getBoxType() not in (
                'gbquad'):
            f = open('/proc/stb/fp/temp_sensor', 'r')
            tempinfo = f.read()
            f.close()
        if tempinfo and int(tempinfo.replace('\n', '')) > 0:
            mark = str('\xc2\xb0')
            AboutText += _("System temperature: %s%sC\n\n") % (
                tempinfo.replace('\n', ''), mark)

        self["AboutScrollLabel"] = ScrollLabel(AboutText)
Ejemplo n.º 39
0
    def populate(self):
        self["lab1"] = StaticText(_("Virtuosso Image Xtreme"))
        self["lab2"] = StaticText(_("By Team ViX"))
        model = None
        AboutText = ""
        self["lab3"] = StaticText(
            _("Support at") + " www.world-of-satellite.com")

        AboutText += _("Model:\t%s %s\n") % (getMachineBrand(),
                                             getMachineName())

        if about.getChipSetString() != _("unavailable"):
            if SystemInfo["HasHiSi"]:
                AboutText += _("Chipset:\tHiSilicon %s\n"
                               ) % about.getChipSetString().upper()
            elif about.getIsBroadcom():
                AboutText += _("Chipset:\tBroadcom %s\n"
                               ) % about.getChipSetString().upper()
            else:
                AboutText += _(
                    "Chipset:\t%s\n") % about.getChipSetString().upper()

        AboutText += _("CPU:\t%s %s %s\n") % (about.getCPUArch(),
                                              about.getCPUSpeedString(),
                                              about.getCpuCoresString())
        imageSubBuild = ""
        if getImageType() != 'release':
            imageSubBuild = ".%s" % getImageDevBuild()
        AboutText += _("Image:\t%s.%s%s (%s)\n") % (getImageVersion(
        ), getImageBuild(), imageSubBuild, getImageType().title())

        if SystemInfo["canMultiBoot"]:
            image = GetCurrentImage()
            bootmode = ""
            part = ""
            if SystemInfo["canMode12"]:
                bootmode = "bootmode = %s" % GetCurrentImageMode()
            if SystemInfo["HasHiSi"]:
                if image != 0:
                    part = "%s%s" % (SystemInfo["canMultiBoot"][2], image * 2)
                    image += 1
                else:
                    part = "MMC"
                    image += 1
            AboutText += _("Image Slot:\t%s") % "STARTUP_" + str(
                image) + " " + part + " " + bootmode + "\n"

        if getMachineName() in ('ET8500') and path.exists('/proc/mtd'):
            self.dualboot = self.dualBoot()
            if self.dualboot:
                AboutText += _("ET8500 Multiboot: Installed\n")

        skinWidth = getDesktop(0).size().width()
        skinHeight = getDesktop(0).size().height()

        string = getDriverDate()
        year = string[0:4]
        month = string[4:6]
        day = string[6:8]
        driversdate = '-'.join((year, month, day))
        AboutText += _("Drivers:\t%s\n") % driversdate
        AboutText += _("Kernel:\t%s\n") % about.getKernelVersionString()
        AboutText += _("GStreamer:\t%s\n") % about.getGStreamerVersionString(
        ).replace("GStreamer ", "")
        AboutText += _("Python:\t%s\n") % about.getPythonVersionString()
        AboutText += _("Installed:\t%s\n") % about.getFlashDateString()
        AboutText += _("Last update:\t%s\n") % getEnigmaVersionString()
        AboutText += _("E2 (re)starts:\t%s\n") % config.misc.startCounter.value
        AboutText += _("Skin:\t%s") % config.skin.primary_skin.value[0:-9] + _(
            "  (%s x %s)") % (skinWidth, skinHeight) + "\n"

        tempinfo = ""
        if path.exists('/proc/stb/sensors/temp0/value'):
            f = open('/proc/stb/sensors/temp0/value', 'r')
            tempinfo = f.read()
            f.close()
        elif path.exists('/proc/stb/fp/temp_sensor'):
            f = open('/proc/stb/fp/temp_sensor', 'r')
            tempinfo = f.read()
            f.close()
        elif path.exists('/proc/stb/sensors/temp/value'):
            f = open('/proc/stb/sensors/temp/value', 'r')
            tempinfo = f.read()
            f.close()
        if tempinfo and int(tempinfo.replace('\n', '')) > 0:
            mark = str('\xc2\xb0')
            AboutText += _("System temp:\t%s") % tempinfo.replace(
                '\n', '').replace(' ', '') + mark + "C\n"

        tempinfo = ""
        if path.exists('/proc/stb/fp/temp_sensor_avs'):
            f = open('/proc/stb/fp/temp_sensor_avs', 'r')
            tempinfo = f.read()
            f.close()
        elif path.exists('/sys/devices/virtual/thermal/thermal_zone0/temp'):
            try:
                f = open('/sys/devices/virtual/thermal/thermal_zone0/temp',
                         'r')
                tempinfo = f.read()
                tempinfo = tempinfo[:-4]
                f.close()
            except:
                tempinfo = ""
        elif path.exists('/proc/hisi/msp/pm_cpu'):
            try:
                for line in open('/proc/hisi/msp/pm_cpu').readlines():
                    line = [x.strip() for x in line.strip().split(":")]
                    if line[0] in ("Tsensor"):
                        temp = line[1].split("=")
                        temp = line[1].split(" ")
                        tempinfo = temp[2]
            except:
                tempinfo = ""
        if tempinfo and int(tempinfo.replace('\n', '')) > 0:
            mark = str('\xc2\xb0')
            AboutText += _("Processor temp:\t%s") % tempinfo.replace(
                '\n', '').replace(' ', '') + mark + "C\n"
        AboutLcdText = AboutText.replace('\t', ' ')

        fp_version = getFPVersion()
        if fp_version is None:
            fp_version = ""
        elif fp_version != 0:
            fp_version = _("FP version:\t%s") % fp_version
            AboutText += fp_version + "\n"

        bootloader = ""
        if path.exists('/sys/firmware/devicetree/base/bolt/tag'):
            f = open('/sys/firmware/devicetree/base/bolt/tag', 'r')
            bootloader = f.readline().replace('\x00', '').replace('\n', '')
            f.close()
            AboutText += _("Bootloader:\t%s\n") % (bootloader)

        self["AboutScrollLabel"] = ScrollLabel(AboutText)
Ejemplo n.º 40
0
from Components.Sources.StaticText import StaticText
from Components.Button import Button
from Components.ScrollLabel import ScrollLabel
from Components.Label import Label
from Components.config import config
from Screens.Screen import Screen

from enigma import eTimer
from boxbranding import getImageVersion, getImageBuild, getImageDevBuild, getImageType
from sys import modules

from datetime import datetime
from json import loads
import urllib2

if getImageType() == 'release':
    ImageVer = "%03d" % int(getImageBuild())
else:
    ImageVer = "%s.%s" % (getImageBuild(), getImageDevBuild())
    ImageVer = float(ImageVer)

E2Branches = {'developer': 'Dev', 'release': 'master'}

project = 0
projects = [
    ("https://api.github.com/repos/oe-alliance/oe-alliance-core/commits?sha=4.4",
     "OE-A Core"),
    ("https://api.github.com/repos/OpenViX/enigma2/commits?sha=%s" %
     getattr(E2Branches, getImageType(), "Dev"), "Enigma2"),
    ("https://api.github.com/repos/OpenViX/vix-core/commits", "ViX Core"),
    ("https://api.github.com/repos/OpenViX/skins/commits", "ViX Skins"),
Ejemplo n.º 41
0
print("getMachineKernelFile=%s<" %boxbranding.getMachineKernelFile())
print("getMachineMtdRoot=%s<" %boxbranding.getMachineMtdRoot())
print("getMachineRootFile=%s<" %boxbranding.getMachineRootFile())
print("getMachineMKUBIFS=%s<" %boxbranding.getMachineMKUBIFS())
print("getMachineUBINIZE=%s<" %boxbranding.getMachineUBINIZE())
print("getBoxType=%s<" %boxbranding.getBoxType())
print("getBrandOEM=%s<" %boxbranding.getBrandOEM())
print("getOEVersion=%s<" %boxbranding.getOEVersion())
print("getDriverDate=%s<" %boxbranding.getDriverDate())
print("getImageVersion=%s<" %boxbranding.getImageVersion())
print("getImageBuild=%s<" %boxbranding.getImageBuild())
print("getImageDistro=%s<" %boxbranding.getImageDistro())
print("getImageFolder=%s<" %boxbranding.getImageFolder())
print("getImageFileSystem=%s<" %boxbranding.getImageFileSystem())
print("getImageDevBuild=%s<" %boxbranding.getImageDevBuild())
print("getImageType=%s<" %boxbranding.getImageType())
print("getMachineMake=%s<" %boxbranding.getMachineMake())
print("getImageArch=%s<" %boxbranding.getImageArch())
print("getFeedsUrl=%s<" %boxbranding.getFeedsUrl())
print("getDisplayType=%s<" %boxbranding.getDisplayType())
print("getHaveHDMI%s<" %boxbranding.getHaveHDMI())
print("getHaveYUV%s<" %boxbranding.getHaveYUV())
print("getHaveRCA%s<" %boxbranding.getHaveRCA())
print("getHaveAVJACK%s<" %boxbranding.getHaveAVJACK())
print("getHaveSCART%s<" %boxbranding.getHaveSCART())
print("getHaveSCARTYUV%s<" %boxbranding.getHaveSCARTYUV())
print("getHaveDVI%s<" %boxbranding.getHaveDVI())
print("getHaveMiniTV%s<" %boxbranding.getHaveMiniTV())
print("getHaveHDMIinHD%s<" %boxbranding.getHaveHDMIinHD())
print("getHaveHDMIinFHD%s<" %boxbranding.getHaveHDMIinFHD())
print("getHaveWOL%s<" %boxbranding.getHaveWOL())
Ejemplo n.º 42
0
	def getlog(self):
		if config.usage.show_menupath.value == 'large':
			if not self.menu_path.endswith(self.screentitle):
				self.menu_path += self.screentitle
			title = self.menu_path
			self["menu_path_compressed"].setText("")
		elif config.usage.show_menupath.value == 'small':
			title = self.screentitle
			self["menu_path_compressed"].setText(self.menu_path + " >" if not self.menu_path.endswith(' / ') else self.menu_path[:-3] + " >" or "")
		else:
			title = self.screentitle
			self["menu_path_compressed"].setText("")
		self.setTitle(title)

		global ocram
		ocramprocessed = False
		releasenotes = gitlog.fetchlog(self.logtype)
		if '404 Not Found' not in releasenotes:
			if getImageType() == 'release':
				ImageVer = getImageBuild()
			else:
				ImageVer = "%s.%s" % (getImageBuild(),getImageDevBuild())
				ImageVer = float(ImageVer)

			releasenotes = releasenotes.split('\n\n')
			ver = -1
			releasever = ""
			viewrelease = ""
			while not releasever.replace('.','').isdigit():
				ver += 1
				releasever = releasenotes[int(ver)].split('\n')
				releasever = releasever[0].split('openvix: ')
				if len(releasever) > 1:
					releasever = releasever[1].split(' ')
					tmp = releasever[1].split('.')
					if len(tmp) > 2:
						if getImageType() == 'release':
							releasever = tmp[2]
						else:
							releasever = '%s.%s' % (tmp[2], tmp[3])
				else:
					releasever = releasever[0]

			while releasever > ImageVer:
				if ocram and not ocramprocessed and self.logtype == 'oe':
					viewrelease += releasenotes[int(ver)]+'\n'+ocram+'\n'
					ocramprocessed = True
				else:
					viewrelease += releasenotes[int(ver)]+'\n\n'
				ver += 1
				releasever = releasenotes[int(ver)].split('\n')
				releasever = releasever[0].split('openvix: ')
				if len(releasever) > 1:
					releasever = releasever[1].split(' ')
					tmp = releasever[1].split('.')
					if len(tmp) > 2:
						if getImageType() == 'release':
							releasever = tmp[2]
						else:
							releasever = '%s.%s' % (tmp[2], tmp[3])
							releasever = float(releasever)
				else:
					releasever = releasever[0]

			if not viewrelease and ocram and not ocramprocessed and self.logtype == 'oe':
				viewrelease = ocram
				ocramprocessed = True
			self["text"].setText(viewrelease)
			summarytext = viewrelease.split(':\n')
			try:
				self['title_summary'].setText(summarytext[0]+':')
				self['text_summary'].setText(summarytext[1])
			except:
				self['title_summary'].setText("")
				self['text_summary'].setText(viewrelease)
		else:
			self['title_summary'].setText("")
			self['text_summary'].setText(_("Error downloading the change log."))
			self['text'].setText(_("Error downloading the change log."))
Ejemplo n.º 43
0
    def populate(self):
        self["lab1"] = StaticText(_("Open Black Hole Image"))
        self["lab2"] = StaticText(_("By Bh Team"))
        model = None
        AboutText = ""
        self["lab3"] = StaticText(
            _("Support at") + " www.vuplus-community.net")

        AboutText += _("Model:\t%s %s\n") % (getMachineBrand(),
                                             getMachineName())

        if path.exists('/proc/stb/info/chipset'):
            AboutText += _("Chipset:\tBCM%s\n") % about.getChipSetString()

        AboutText += _("CPU:\t%s\n") % about.getCPUString().replace(
            'bcm', 'BCM')
        AboutText += _("CPU speed:\t%s\n") % about.getCPUSpeedString()
        AboutText += _("Cores:\t%s\n") % about.getCpuCoresString()
        imageSubBuild = ""
        if getImageType() != 'release':
            imageSubBuild = ".%s" % getImageDevBuild()
        AboutText += _("Build:\t%s.%s%s (%s)\n") % (getImageVersion(
        ), getImageBuild(), imageSubBuild, getImageType().title())
        AboutText += _(
            "Skin name:\t%s\n") % config.skin.primary_skin.value[0:-9]

        string = getDriverDate()
        year = string[0:4]
        month = string[4:6]
        day = string[6:8]
        driversdate = '-'.join((year, month, day))
        AboutText += _("Drivers:\t%s\n") % driversdate
        AboutText += _("Kernel:\t%s\n") % about.getKernelVersionString()

        AboutText += _("GStreamer:\t%s\n") % about.getGStreamerVersionString(
        ).replace("GStreamer ", "")
        AboutText += _("Python:\t%s\n") % about.getPythonVersionString()

        AboutText += _("Installed:\t%s\n") % about.getFlashDateString()
        AboutText += _("Last update:\t%s\n\n") % getEnigmaVersionString()

        tempinfo = ""
        if path.exists('/proc/stb/sensors/temp0/value'):
            f = open('/proc/stb/sensors/temp0/value', 'r')
            tempinfo = f.read()
            f.close()
        elif path.exists('/proc/stb/fp/temp_sensor'):
            f = open('/proc/stb/fp/temp_sensor', 'r')
            tempinfo = f.read()
            f.close()
        elif path.exists('/proc/stb/sensors/temp/value'):
            f = open('/proc/stb/sensors/temp/value', 'r')
            tempinfo = f.read()
            f.close()
        if tempinfo and int(tempinfo.replace('\n', '')) > 0:
            mark = str('\xc2\xb0')
            AboutText += _("System temperature:\t%s") % tempinfo.replace(
                '\n', '').replace(' ', '') + mark + "C\n"

        tempinfo = ""
        if path.exists('/proc/stb/fp/temp_sensor_avs'):
            f = open('/proc/stb/fp/temp_sensor_avs', 'r')
            tempinfo = f.read()
            f.close()
        if tempinfo and int(tempinfo.replace('\n', '')) > 0:
            mark = str('\xc2\xb0')
            AboutText += _("Processor temperature:\t%s") % tempinfo.replace(
                '\n', '').replace(' ', '') + mark + "C\n"
        AboutLcdText = AboutText.replace('\t', ' ')

        fp_version = getFPVersion()
        if fp_version is None:
            fp_version = ""
        elif fp_version != 0:
            fp_version = _("Frontprocessor version: %d") % fp_version
            AboutText += fp_version + "\n"

        bootloader = ""
        if path.exists('/sys/firmware/devicetree/base/bolt/tag'):
            f = open('/sys/firmware/devicetree/base/bolt/tag', 'r')
            bootloader = f.readline().replace('\x00', '').replace('\n', '')
            f.close()
            AboutText += _("Bootloader:\t\t%s\n") % (bootloader)

        self["AboutScrollLabel"] = ScrollLabel(AboutText)
Ejemplo n.º 44
0
 def ipkgCallback(self, event, param):
     if event == IpkgComponent.EVENT_DOWNLOAD:
         self.status.setText(_("Downloading"))
     elif event == IpkgComponent.EVENT_UPGRADE:
         if param in self.sliderPackages:
             self.slider.setValue(self.sliderPackages[param])
         self.package.setText(param)
         self.status.setText(
             _("Upgrading") + ": %s/%s" %
             (self.packages, self.total_packages))
         if not param in self.processed_packages:
             self.processed_packages.append(param)
             self.packages += 1
     elif event == IpkgComponent.EVENT_INSTALL:
         self.package.setText(param)
         self.status.setText(_("Installing"))
         if not param in self.processed_packages:
             self.processed_packages.append(param)
             self.packages += 1
     elif event == IpkgComponent.EVENT_REMOVE:
         self.package.setText(param)
         self.status.setText(_("Removing"))
         if not param in self.processed_packages:
             self.processed_packages.append(param)
             self.packages += 1
     elif event == IpkgComponent.EVENT_CONFIGURING:
         self.package.setText(param)
         self.status.setText(_("Configuring"))
     elif event == IpkgComponent.EVENT_MODIFIED:
         if config.plugins.softwaremanager.overwriteConfigFiles.value in (
                 "N", "Y"):
             self.ipkg.write(
                 True and
                 config.plugins.softwaremanager.overwriteConfigFiles.value)
         else:
             self["actions"].setEnabled(True)
             self.session.openWithCallback(
                 self.modificationCallback, MessageBox,
                 _("A configuration file (%s) has been modified since it was installed.\nDo you want to keep your modifications?"
                   ) % param)
     elif event == IpkgComponent.EVENT_ERROR:
         self.error += 1
         self.updating = False
     elif event == IpkgComponent.EVENT_DONE:
         if self.updating:
             self.updating = False
             self.ipkg.startCmd(IpkgComponent.CMD_UPGRADE_LIST)
         elif self.ipkg.currentCommand == IpkgComponent.CMD_UPGRADE_LIST:
             self.total_packages = None
             if getImageType() != 'release' or (
                     config.softwareupdate.updateisunstable.value == '1'
                     and config.softwareupdate.updatebeta.value):
                 self.total_packages = len(self.ipkg.getFetchedList())
                 message = _(
                     "The current update may be unstable") + "\n" + _(
                         "Are you sure you want to update your %s %s ?"
                     ) % (getMachineBrand(), getMachineName()) + "\n(" + (
                         ngettext("%s updated package available",
                                  "%s updated packages available",
                                  self.total_packages) %
                         self.total_packages) + ")"
             elif config.softwareupdate.updateisunstable.value == '0':
                 self.total_packages = len(self.ipkg.getFetchedList())
                 message = _("Do you want to update your %s %s ?") % (
                     getMachineBrand(), getMachineName()) + "\n(" + (
                         ngettext("%s updated package available",
                                  "%s updated packages available",
                                  self.total_packages) %
                         self.total_packages) + ")"
             if self.total_packages > 150:
                 message += " " + _("Reflash recommended!")
             if self.total_packages:
                 global ocram
                 ocram = ''
                 for package_tmp in self.ipkg.getFetchedList():
                     if package_tmp[0].startswith(
                             'enigma2-plugin-picons-snp'):
                         ocram = ocram + '[ocram-picons] ' + package_tmp[
                             0].split(
                                 'enigma2-plugin-picons-snp-')[1].replace(
                                     '.', ' '
                                 ) + ' updated ' + package_tmp[2].replace(
                                     '--', ' ') + '\n'
                     elif package_tmp[0].startswith(
                             'enigma2-plugin-picons-srp'):
                         ocram = ocram + '[ocram-picons] ' + package_tmp[
                             0].split(
                                 'enigma2-plugin-picons-srp-')[1].replace(
                                     '.', ' '
                                 ) + ' updated ' + package_tmp[2].replace(
                                     '--', ' ') + '\n'
                 config.softwareupdate.updatefound.setValue(True)
                 choices = [(_("View the changes"), "changes"),
                            (_("Upgrade and reboot system"), "cold")]
                 if path.exists(
                         "/usr/lib/enigma2/python/Plugins/SystemPlugins/OBH/BackupManager.pyo"
                 ):
                     if not config.softwareupdate.autosettingsbackup.value and config.backupmanager.backuplocation.value:
                         choices.append(
                             (_("Perform a settings backup,") + '\n\t' +
                              _("making a backup before updating") +
                              '\n\t' + _("is strongly advised."), "backup"))
                     if not config.softwareupdate.autoimagebackup.value and config.imagemanager.backuplocation.value:
                         choices.append((_("Perform a full image backup"),
                                         "imagebackup"))
                 choices.append((_("Update channel list only"), "channels"))
                 choices.append((_("Cancel"), ""))
                 self["actions"].setEnabled(True)
                 upgrademessage = self.session.openWithCallback(
                     self.startActualUpgrade,
                     ChoiceBox,
                     title=message,
                     list=choices,
                     skin_name="SoftwareUpdateChoices",
                     var=self.trafficLight,
                     menu_path=self.menu_path_compressed)
                 upgrademessage.setTitle(self.title)
             else:
                 self["actions"].setEnabled(True)
                 upgrademessage = self.session.openWithCallback(
                     self.close,
                     MessageBox,
                     _("Nothing to upgrade"),
                     type=MessageBox.TYPE_INFO,
                     timeout=10,
                     close_on_any_key=True)
                 upgrademessage.setTitle(_('Software update'))
         elif self.channellist_only > 0:
             if self.channellist_only == 1:
                 self.setEndMessage(
                     _("Could not find installed channel list."))
             elif self.channellist_only == 2:
                 self.slider.setValue(2)
                 self.ipkg.startCmd(IpkgComponent.CMD_REMOVE,
                                    {'package': self.channellist_name})
                 self.channellist_only += 1
             elif self.channellist_only == 3:
                 self.slider.setValue(3)
                 self.ipkg.startCmd(IpkgComponent.CMD_INSTALL,
                                    {'package': self.channellist_name})
                 self.channellist_only += 1
             elif self.channellist_only == 4:
                 self.showUpdateCompletedMessage()
                 eDVBDB.getInstance().reloadBouquets()
                 eDVBDB.getInstance().reloadServicelist()
         elif self.error == 0:
             self.showUpdateCompletedMessage()
         else:
             self.activityTimer.stop()
             self.activityslider.setValue(0)
             error = _(
                 "Your %s %s might be unusable now. Please consult the manual for further assistance before rebooting your %s %s."
             ) % (getMachineBrand(), getMachineName(), getMachineBrand(),
                  getMachineName())
             if self.packages == 0:
                 if self.error != 0:
                     error = _(
                         "Problem retrieving update list.\nIf this issue persists please check/report on forum"
                     )
                 else:
                     error = _(
                         "A background update check is in progress,\nplease wait a few minutes and try again."
                     )
             if self.updating:
                 error = _(
                     "Update failed. Your %s %s does not have a working internet connection."
                 ) % (getMachineBrand(), getMachineName())
             self.status.setText(_("Error") + " - " + error)
             self["actions"].setEnabled(True)
     elif event == IpkgComponent.EVENT_LISTITEM:
         if 'enigma2-plugin-settings-' in param[
                 0] and self.channellist_only > 0:
             self.channellist_name = param[0]
             self.channellist_only = 2
     #print event, "-", param
     pass
Ejemplo n.º 45
0
    def populate(self):
        self["lab1"] = StaticText(_("Virtuosso Image Xtreme"))
        self["lab2"] = StaticText(_("By Team ViX"))
        model = None
        AboutText = ""
        self["lab3"] = StaticText(
            _("Support at") + " www.world-of-satellite.com")

        AboutText += _("Model:\t%s %s\n") % (getMachineBrand(),
                                             getMachineName())

        if about.getChipSetString() != _("unavailable"):
            if SystemInfo["HasHiSi"]:
                AboutText += _("Chipset:\tHiSilicon %s\n"
                               ) % about.getChipSetString().upper()
            elif about.getIsBroadcom():
                AboutText += _("Chipset:\tBroadcom %s\n"
                               ) % about.getChipSetString().upper()
            else:
                AboutText += _(
                    "Chipset:\t%s\n") % about.getChipSetString().upper()

        AboutText += _("CPU:\t%s %s %s\n") % (about.getCPUArch(),
                                              about.getCPUSpeedString(),
                                              about.getCpuCoresString())

        if SystemInfo["BoxInfo"]:
            BoxInfo = SystemInfo["BoxInfo"]
            AboutText += _("SoC:\t%s\n") % BoxInfo.getItem("socfamily").upper()

        tempinfo = ""
        if path.exists("/proc/stb/sensors/temp0/value"):
            with open("/proc/stb/sensors/temp0/value", "r") as f:
                tempinfo = f.read()
        elif path.exists("/proc/stb/fp/temp_sensor"):
            with open("/proc/stb/fp/temp_sensor", "r") as f:
                tempinfo = f.read()
        elif path.exists("/proc/stb/sensors/temp/value"):
            with open("/proc/stb/sensors/temp/value", "r") as f:
                tempinfo = f.read()
        if tempinfo and int(tempinfo.replace("\n", "")) > 0:
            AboutText += _("System temp:\t%s") % tempinfo.replace(
                "\n", "").replace(" ", "") + "\xb0" + "C\n"

        tempinfo = ""
        if path.exists("/proc/stb/fp/temp_sensor_avs"):
            with open("/proc/stb/fp/temp_sensor_avs", "r") as f:
                tempinfo = f.read()
        elif path.exists("/sys/devices/virtual/thermal/thermal_zone0/temp"):
            try:
                with open("/sys/devices/virtual/thermal/thermal_zone0/temp",
                          "r") as f:
                    tempinfo = f.read()
                    tempinfo = tempinfo[:-4]
            except:
                tempinfo = ""
        elif path.exists("/proc/hisi/msp/pm_cpu"):
            try:
                tempinfo = search(
                    "temperature = (\d+) degree",
                    open("/proc/hisi/msp/pm_cpu").read()).group(1)
            except:
                tempinfo = ""
        if tempinfo and int(tempinfo) > 0:
            AboutText += _("Processor temp:\t%s") % tempinfo.replace(
                "\n", "").replace(" ", "") + "\xb0" + "C\n"

        imageSubBuild = ""
        if getImageType() != "release":
            imageSubBuild = ".%s" % getImageDevBuild()
        AboutText += _("Image:\t%s.%s%s (%s)\n") % (getImageVersion(
        ), getImageBuild(), imageSubBuild, getImageType().title())

        if SystemInfo["BoxInfo"]:
            BoxInfo = SystemInfo["BoxInfo"]
            if BoxInfo.getItem(
                    "mtdbootfs") != "" and " " not in BoxInfo.getItem(
                        "mtdbootfs"):
                AboutText += _("Boot Device:\t%s\n") % BoxInfo.getItem(
                    "mtdbootfs")
        if SystemInfo["HasH9SD"]:
            if "rootfstype=ext4" in open(
                    "/sys/firmware/devicetree/base/chosen/bootargs",
                    "r").read():
                part = "        - SD card in use for Image root \n"
            else:
                part = "        - eMMC slot in use for Image root \n"
            AboutText += _("%s") % part

        if SystemInfo["canMultiBoot"]:
            slot = image = SystemInfo["MultiBootSlot"]
            part = "eMMC slot %s" % slot
            bootmode = ""
            if SystemInfo["canMode12"]:
                bootmode = "bootmode = %s" % GetCurrentImageMode()
            print("[About] HasHiSi = %s, slot = %s" %
                  (SystemInfo["HasHiSi"], slot))
            if SystemInfo["HasHiSi"] and "sda" in SystemInfo["canMultiBoot"][
                    slot]["root"]:
                if slot > 4:
                    image -= 4
                else:
                    image -= 1
                part = "SDcard slot %s (%s) " % (
                    image, SystemInfo["canMultiBoot"][slot]["root"])
            AboutText += _("Image Slot:\t%s") % "Startup " + str(
                slot) + " - " + part + " " + bootmode + "\n"

        if getMachineName() in ("ET8500") and path.exists("/proc/mtd"):
            self.dualboot = self.dualBoot()
            if self.dualboot:
                AboutText += _("ET8500 Multiboot: Installed\n")

        skinWidth = getDesktop(0).size().width()
        skinHeight = getDesktop(0).size().height()

        string = getDriverDate()
        year = string[0:4]
        month = string[4:6]
        day = string[6:8]
        driversdate = "-".join((day, month, year))

        AboutText += _("Drivers:\t%s\n") % driversdate
        AboutText += _("Kernel:\t%s\n") % about.getKernelVersionString()
        AboutText += _("GStreamer:\t%s\n") % about.getGStreamerVersionString(
        ).replace("GStreamer ", "")
        if isPluginInstalled(
                "ServiceApp"
        ) and config.plugins.serviceapp.servicemp3.replace.value == True:
            AboutText += _(
                "4097 iptv player:\t%s\n"
            ) % config.plugins.serviceapp.servicemp3.player.value
        else:
            AboutText += _("4097 iptv player:\tDefault player\n")
        AboutText += _("Python:\t%s\n") % about.getPythonVersionString()
        flashDate = about.getFlashDateString()[8:] + about.getFlashDateString(
        )[4:8] + about.getFlashDateString()[0:4]
        AboutText += _("Installed:\t%s\n") % flashDate
        lastUpdate = getEnigmaVersionString()[8:] + getEnigmaVersionString(
        )[4:8] + getEnigmaVersionString()[0:4]
        AboutText += _("Last update:\t%s\n") % lastUpdate
        AboutText += _("E2 (re)starts:\t%s\n") % config.misc.startCounter.value
        uptime = about.getBoxUptime()
        if uptime:
            AboutText += _("Uptime:\t%s\n") % uptime
        e2uptime = about.getEnigmaUptime()
        if e2uptime:
            AboutText += _("Enigma2 uptime:\t%s\n") % e2uptime
        AboutText += _("Skin:\t%s") % config.skin.primary_skin.value[0:-9] + _(
            "  (%s x %s)") % (skinWidth, skinHeight) + "\n"

        fp_version = getFPVersion()
        if fp_version is None:
            fp_version = ""
        elif fp_version != 0:
            fp_version = _("FP version:\t%s") % fp_version
            AboutText += fp_version + "\n"

        bootloader = ""
        if path.exists('/sys/firmware/devicetree/base/bolt/tag'):
            f = open('/sys/firmware/devicetree/base/bolt/tag', 'r')
            bootloader = f.readline().replace('\x00', '').replace('\n', '')
            f.close()
            AboutText += _("Bootloader:\t%s\n") % (bootloader)

        self["AboutScrollLabel"] = ScrollLabel(AboutText)
Ejemplo n.º 46
0
from Components.Sources.StaticText import StaticText
from Components.Button import Button
from Components.ScrollLabel import ScrollLabel
from Components.Label import Label
from Components.config import config
from Screens.Screen import Screen

from enigma import eTimer
from boxbranding import getImageVersion, getImageBuild, getImageDevBuild, getImageType
from sys import modules

from datetime import datetime
from json import loads
import urllib2

if getImageType() == 'release':
    ImageVer = getImageBuild()
else:
    ImageVer = "%s.%s" % (getImageBuild(), getImageDevBuild())
    ImageVer = float(ImageVer)

E2Branches = {'developer': 'Dev', 'release': 'master'}

project = 0
projects = [
    ("https://api.github.com/repos/OpenViX/enigma2/commits?sha=%s" %
     E2Branches[getImageType()], "Enigma2"),
    ("https://api.github.com/repos/OpenViX/vix-core/commits", "ViX Core"),
    ("https://api.github.com/repos/OpenViX/skins/commits", "ViX Skins"),
    ("https://api.github.com/repos/oe-alliance/oe-alliance-core/commits?sha=4.0",
     "OE-A Core"),
Ejemplo n.º 47
0
 def getlog(self):
     global ocram
     try:
         sourcefile = 'http://www.openvix.co.uk/feeds/%s/%s/%s/%s-git.log' % (
             getImageDistro(), getImageType(), getImageVersion(),
             self.logtype)
         sourcefile, headers = urllib.urlretrieve(sourcefile)
         rename(sourcefile, '/tmp/' + self.logtype + '-git.log')
         fd = open('/tmp/' + self.logtype + '-git.log', 'r')
         releasenotes = fd.read()
         fd.close()
     except:
         releasenotes = '404 Not Found'
     if '404 Not Found' not in releasenotes:
         releasenotes = releasenotes.replace('openvix: build 165',
                                             'openvix: build 000')
         releasenotes = releasenotes.replace('\nopenvix: build',
                                             "\n\nopenvix: build")
         releasenotes = releasenotes.split('\n\n')
         ver = -1
         releasever = ""
         viewrelease = ""
         while not releasever.isdigit():
             ver += 1
             releasever = releasenotes[int(ver)].split('\n')
             releasever = releasever[0].split(' ')
             if len(releasever) > 2:
                 releasever = releasever[2].replace(':', "")
             else:
                 releasever = releasever[0].replace(':', "")
         if self.logtype == 'oe':
             if int(getImageBuild()) == 1:
                 imagever = int(getImageBuild()) - 1
             else:
                 imagever = int(getImageBuild())
         else:
             imagever = int(getImageBuild())
         while int(releasever) > int(imagever):
             if ocram:
                 viewrelease += releasenotes[int(ver)] + '\n' + ocram + '\n'
                 ocram = ""
             else:
                 viewrelease += releasenotes[int(ver)] + '\n\n'
             ver += 1
             releasever = releasenotes[int(ver)].split('\n')
             releasever = releasever[0].split(' ')
             releasever = releasever[2].replace(':', "")
         if not viewrelease and ocram:
             viewrelease = ocram
             ocram = ""
         self["text"].setText(viewrelease)
         summarytext = viewrelease.split(':\n')
         try:
             self['title_summary'].setText(summarytext[0] + ':')
             self['text_summary'].setText(summarytext[1])
         except:
             self['title_summary'].setText("")
             self['text_summary'].setText(viewrelease)
     else:
         self['title_summary'].setText("")
         self['text_summary'].setText(
             _("Error downloading the change log."))
         self['text'].setText(_("Error downloading the change log."))
Ejemplo n.º 48
0
from Components.Sources.StaticText import StaticText
from Components.Button import Button
from Components.ScrollLabel import ScrollLabel
from Components.Label import Label
from Components.config import config
from Screens.Screen import Screen

from enigma import eTimer
from boxbranding import getImageVersion, getImageBuild, getImageDevBuild, getImageType
from sys import modules

from datetime import datetime
from json import loads
import urllib2

if getImageType() == 'release':
	ImageVer = "%03d" % int(getImageBuild())
else:
	ImageVer = "%s.%s" % (getImageBuild(),getImageDevBuild())
	ImageVer = float(ImageVer)

E2Branches = {
	'developer' : 'Dev',
	'release' : 'master'
	}

project = 0
projects = [
	("https://api.github.com/repos/oe-alliance/oe-alliance-core/commits?sha=4.0", "OE-A Core"),
<<<<<<< HEAD
	("https://api.github.com/repos/BlackHole/enigma2-obh10/commits?sha=%s" % E2Branches[getImageType()], "Enigma2"),
Ejemplo n.º 49
0
import sys
import os
from time import time

if os.path.isfile("/usr/lib/enigma2/python/enigma.zip"):
    sys.path.append("/usr/lib/enigma2/python/enigma.zip")

from Tools.Profile import profile, profile_final
profile("PYTHON_START")

# Don't remove this line. It may seem to do nothing, but if removed,
# it will break output redirection for crash logs.
import Tools.RedirectOutput
from boxbranding import getImageVersion, getImageBuild, getImageDevBuild, getImageType, getImageArch
print "[Image Type] %s" % getImageType()
print "[Image Version] %s" % getImageVersion()
print "[Image Build] %s" % getImageBuild()
if getImageType() != 'release':
    print "[Image DevBuild] %s" % getImageDevBuild()

import enigma
import eConsoleImpl
import eBaseImpl
enigma.eTimer = eBaseImpl.eTimer
enigma.eSocketNotifier = eBaseImpl.eSocketNotifier
enigma.eConsoleAppContainer = eConsoleImpl.eConsoleAppContainer

if getImageArch() in ("aarch64"):
    import usb.core
    import usb.backend.libusb1
    usb.backend.libusb1.get_backend(
Ejemplo n.º 50
0
	def ipkgCallback(self, event, param):
		if event == IpkgComponent.EVENT_DOWNLOAD:
			self.status.setText(_("Downloading"))
		elif event == IpkgComponent.EVENT_UPGRADE:
			if self.sliderPackages.has_key(param):
				self.slider.setValue(self.sliderPackages[param])
			self.package.setText(param)
			self.status.setText(_("Upgrading") + ": %s/%s" % (self.packages, self.total_packages))
			if not param in self.processed_packages:
				self.processed_packages.append(param)
				self.packages += 1
		elif event == IpkgComponent.EVENT_INSTALL:
			self.package.setText(param)
			self.status.setText(_("Installing"))
			if not param in self.processed_packages:
				self.processed_packages.append(param)
				self.packages += 1
		elif event == IpkgComponent.EVENT_REMOVE:
			self.package.setText(param)
			self.status.setText(_("Removing"))
			if not param in self.processed_packages:
				self.processed_packages.append(param)
				self.packages += 1
		elif event == IpkgComponent.EVENT_CONFIGURING:
			self.package.setText(param)
			self.status.setText(_("Configuring"))
		elif event == IpkgComponent.EVENT_MODIFIED:
			if config.plugins.softwaremanager.overwriteConfigFiles.value in ("N", "Y"):
				self.ipkg.write(True and config.plugins.softwaremanager.overwriteConfigFiles.value)
			else:
				self["actions"].setEnabled(True)
				self.session.openWithCallback(
					self.modificationCallback,
					MessageBox,
					_("A configuration file (%s) has been modified since it was installed.\nDo you want to keep your modifications?") % param
				)
		elif event == IpkgComponent.EVENT_ERROR:
			self.error += 1
			self.updating = False
		elif event == IpkgComponent.EVENT_DONE:
			if self.updating:
				self.updating = False
				self.ipkg.startCmd(IpkgComponent.CMD_UPGRADE_LIST)
			elif self.ipkg.currentCommand == IpkgComponent.CMD_UPGRADE_LIST:
				self.total_packages = None
				if getImageType() != 'release' or (config.softwareupdate.updateisunstable.value == '1' and config.softwareupdate.updatebeta.value):
					self.total_packages = len(self.ipkg.getFetchedList())
					message = _("The current update may be unstable") + "\n" + _("Are you sure you want to update your %s %s ?") % (getMachineBrand(), getMachineName()) + "\n(" + (ngettext("%s updated package available", "%s updated packages available", self.total_packages) % self.total_packages) + ")"
				elif config.softwareupdate.updateisunstable.value == '0':
					self.total_packages = len(self.ipkg.getFetchedList())
					message = _("Do you want to update your %s %s ?") % (getMachineBrand(), getMachineName()) + "\n(" + (ngettext("%s updated package available", "%s updated packages available", self.total_packages) % self.total_packages) + ")"
				if self.total_packages > 150:
					message += " " + _("Reflash recommended!")
				if self.total_packages:
					global ocram
					ocram = ''
					for package_tmp in self.ipkg.getFetchedList():
						if package_tmp[0].startswith('enigma2-plugin-picons-snp'):
							ocram = ocram + '[ocram-picons] ' + package_tmp[0].split('enigma2-plugin-picons-snp-')[1].replace('.',' ') + ' updated ' + package_tmp[2].replace('--',' ') + '\n'
						elif package_tmp[0].startswith('enigma2-plugin-picons-srp'):
							ocram = ocram + '[ocram-picons] ' + package_tmp[0].split('enigma2-plugin-picons-srp-')[1].replace('.',' ') + ' updated ' + package_tmp[2].replace('--',' ') + '\n'
					config.softwareupdate.updatefound.setValue(True)
					choices = [(_("View the changes"), "changes"),
						(_("Upgrade and reboot system"), "cold")]
					if path.exists("/usr/lib/enigma2/python/Plugins/SystemPlugins/ViX/BackupManager.pyo"):
						if not config.softwareupdate.autosettingsbackup.value and config.backupmanager.backuplocation.value:
							choices.append((_("Perform a settings backup,") + '\n\t' + _("making a backup before updating") + '\n\t' +_("is strongly advised."), "backup"))
						if not config.softwareupdate.autoimagebackup.value and config.imagemanager.backuplocation.value:
							choices.append((_("Perform a full image backup"), "imagebackup"))
					choices.append((_("Update channel list only"), "channels"))
					choices.append((_("Cancel"), ""))
					self["actions"].setEnabled(True)
					upgrademessage = self.session.openWithCallback(self.startActualUpgrade, ChoiceBox, title=message, list=choices, skin_name = "SoftwareUpdateChoices", var=self.trafficLight, menu_path=self.menu_path_compressed)
					upgrademessage.setTitle(self.title)
				else:
					self["actions"].setEnabled(True)
					upgrademessage = self.session.openWithCallback(self.close, MessageBox, _("Nothing to upgrade"), type=MessageBox.TYPE_INFO, timeout=10, close_on_any_key=True)
					upgrademessage.setTitle(_('Software update'))
			elif self.channellist_only > 0:
				if self.channellist_only == 1:
					self.setEndMessage(_("Could not find installed channel list."))
				elif self.channellist_only == 2:
					self.slider.setValue(2)
					self.ipkg.startCmd(IpkgComponent.CMD_REMOVE, {'package': self.channellist_name})
					self.channellist_only += 1
				elif self.channellist_only == 3:
					self.slider.setValue(3)
					self.ipkg.startCmd(IpkgComponent.CMD_INSTALL, {'package': self.channellist_name})
					self.channellist_only += 1
				elif self.channellist_only == 4:
					self.showUpdateCompletedMessage()
					eDVBDB.getInstance().reloadBouquets()
					eDVBDB.getInstance().reloadServicelist()
			elif self.error == 0:
				self.showUpdateCompletedMessage()
			else:
				self.activityTimer.stop()
				self.activityslider.setValue(0)
				error = _("Your %s %s might be unusable now. Please consult the manual for further assistance before rebooting your %s %s.") % (getMachineBrand(), getMachineName(), getMachineBrand(), getMachineName())
				if self.packages == 0:
					error = _("A background update check is in progress,\nplease wait a few minutes and try again.")
				if self.updating:
					error = _("Update failed. Your %s %s does not have a working internet connection.") % (getMachineBrand(), getMachineName())
				self.status.setText(_("Error") +  " - " + error)
				self["actions"].setEnabled(True)
		elif event == IpkgComponent.EVENT_LISTITEM:
			if 'enigma2-plugin-settings-' in param[0] and self.channellist_only > 0:
				self.channellist_name = param[0]
				self.channellist_only = 2
		#print event, "-", param
		pass
Ejemplo n.º 51
0
    def populate(self):
        self["lab1"] = StaticText(_("Virtuosso Image Xtreme"))
        self["lab2"] = StaticText(_("By Team ViX"))
        model = None
        AboutText = ""
        self["lab3"] = StaticText(
            _("Support at") + " www.world-of-satellite.com")

        AboutText += _("Model:\t%s %s\n") % (getMachineBrand(),
                                             getMachineName())

        if about.getChipSetString() != _("unavailable"):
            if about.getIsBroadcom():
                AboutText += _(
                    "Chipset:\tBCM%s\n") % about.getChipSetString().upper()
            else:
                AboutText += _(
                    "Chipset:\t%s\n") % about.getChipSetString().upper()

        AboutText += _("CPU:\t%s %s %s\n") % (about.getCPUArch(),
                                              about.getCPUSpeedString(),
                                              about.getCpuCoresString())
        imageSubBuild = ""
        if getImageType() != 'release':
            imageSubBuild = ".%s" % getImageDevBuild()
        AboutText += _("Image:\t%s.%s%s (%s)\n") % (getImageVersion(
        ), getImageBuild(), imageSubBuild, getImageType().title())
        skinWidth = getDesktop(0).size().width()
        skinHeight = getDesktop(0).size().height()

        string = getDriverDate()
        year = string[0:4]
        month = string[4:6]
        day = string[6:8]
        driversdate = '-'.join((year, month, day))
        AboutText += _("Drivers:\t%s\n") % driversdate
        AboutText += _("Kernel:\t%s\n") % about.getKernelVersionString()
        AboutText += _("GStreamer:\t%s\n") % about.getGStreamerVersionString(
        ).replace("GStreamer ", "")
        AboutText += _("Python:\t%s\n") % about.getPythonVersionString()
        AboutText += _("Installed:\t%s\n") % about.getFlashDateString()
        AboutText += _("Last update:\t%s\n") % getEnigmaVersionString()
        AboutText += _("E2 (re)starts:\t%s\n") % config.misc.startCounter.value
        AboutText += _("Skin:\t%s") % config.skin.primary_skin.value[0:-9] + _(
            "  (%s x %s)") % (skinWidth, skinHeight) + "\n"

        tempinfo = ""
        if path.exists('/proc/stb/sensors/temp0/value'):
            f = open('/proc/stb/sensors/temp0/value', 'r')
            tempinfo = f.read()
            f.close()
        elif path.exists('/proc/stb/fp/temp_sensor'):
            f = open('/proc/stb/fp/temp_sensor', 'r')
            tempinfo = f.read()
            f.close()
        elif path.exists('/proc/stb/sensors/temp/value'):
            f = open('/proc/stb/sensors/temp/value', 'r')
            tempinfo = f.read()
            f.close()
        if tempinfo and int(tempinfo.replace('\n', '')) > 0:
            mark = str('\xc2\xb0')
            AboutText += _("System temp:\t%s") % tempinfo.replace(
                '\n', '').replace(' ', '') + mark + "C\n"

        tempinfo = ""
        if path.exists('/proc/stb/fp/temp_sensor_avs'):
            f = open('/proc/stb/fp/temp_sensor_avs', 'r')
            tempinfo = f.read()
            f.close()
        elif path.exists('/sys/devices/virtual/thermal/thermal_zone0/temp'):
            try:
                f = open('/sys/devices/virtual/thermal/thermal_zone0/temp',
                         'r')
                tempinfo = f.read()
                tempinfo = tempinfo[:-4]
                f.close()
            except:
                tempinfo = ""
        if tempinfo and int(tempinfo.replace('\n', '')) > 0:
            mark = str('\xc2\xb0')
            AboutText += _("Processor temp:\t%s") % tempinfo.replace(
                '\n', '').replace(' ', '') + mark + "C\n"
        AboutLcdText = AboutText.replace('\t', ' ')

        fp_version = getFPVersion()
        if fp_version is None:
            fp_version = ""
        elif fp_version != 0:
            fp_version = _("FP version:\t%s") % fp_version
            AboutText += fp_version + "\n"

        bootloader = ""
        if path.exists('/sys/firmware/devicetree/base/bolt/tag'):
            f = open('/sys/firmware/devicetree/base/bolt/tag', 'r')
            bootloader = f.readline().replace('\x00', '').replace('\n', '')
            f.close()
            AboutText += _("Bootloader:\t%s\n") % (bootloader)

        self["AboutScrollLabel"] = ScrollLabel(AboutText)
Ejemplo n.º 52
0
import sys
import os
from time import time

if os.path.isfile("/usr/lib/enigma2/python/enigma.zip"):
	sys.path.append("/usr/lib/enigma2/python/enigma.zip")

from Tools.Profile import profile, profile_final
profile("PYTHON_START")

import Tools.RedirectOutput
from boxbranding import getBrandOEM, getImageVersion, getImageBuild, getImageDevBuild, getImageType
print "[Image Type] %s" % getImageType()
print "[Image Version] %s" % getImageVersion()
print "[Image Build] %s" % getImageBuild()
if getImageType() != 'release':
	print "[Image DevBuild] %s" % getImageDevBuild()

import enigma
import eConsoleImpl
import eBaseImpl
enigma.eTimer = eBaseImpl.eTimer
enigma.eSocketNotifier = eBaseImpl.eSocketNotifier
enigma.eConsoleAppContainer = eConsoleImpl.eConsoleAppContainer

from traceback import print_exc
profile("SimpleSummary")
from Screens import InfoBar
from Screens.SimpleSummary import SimpleSummary

from sys import stdout, exc_info
Ejemplo n.º 53
0
				req = urllib2.Request('http://openvix.co.uk/TrafficLightState.php')
				d = urllib2.urlopen(req)
				trafficLight = d.read()
			except urllib2.HTTPError, err:
				print '[OnlineVersionCheck] ERROR:',err
				trafficLight = err.code
			except urllib2.URLError, err:
				print '[OnlineVersionCheck] ERROR:',err.reason[0]
				trafficLight = err.reason[0]
			except urllib2, err:
				print '[OnlineVersionCheck] ERROR:',err
				trafficLight = err
			except:
				print '[OnlineVersionCheck] ERROR:', sys.exc_info()[0]
				trafficLight = -2
			if not self.IsInt(trafficLight) and getImageType() != 'release':
				trafficLight = 'unknown'
			elif trafficLight == 'stable':
				status = '0'
			config.softwareupdate.updateisunstable.setValue(status)
			print '[OnlineVersionCheck] PASSED:',trafficLight
			return trafficLight
		else:
			print '[OnlineVersionCheck] ERROR: -2'
			return -2

	# We need a textual mapping for all possible return states for use by
	# SoftwareUpdate::checkNetworkState() and ChoiceBox::onshow()
	# Declared here for consistency and co-location with choices.

	feed_status_msgs = {
Ejemplo n.º 54
0
from Components.Input import Input
from Screens.Console import Console
from Screens.About import *
from Plugins.Plugin import PluginDescriptor
from RecordTimer import *
from time import *
from Tools import Directories, Notifications
import NavigationInstance
from downloader import Hdf_Downloader
from boxbranding import getBoxType, getMachineBrand, getMachineName, getDriverDate, getImageVersion, getImageBuild, getBrandOEM, getImageType, getImageDistro, getOEVersion

toolboxversion = "Toolbox Version - 12.06.2019"

try:
    os.system("echo box_type=" + getBoxType() + " > /etc/image-version")
    os.system("echo build_type=" + getImageType() + " >> /etc/image-version")
    os.system("echo machine_brand=" + getMachineBrand() +
              " >> /etc/image-version")
    os.system("echo machine_name=" + getMachineName() +
              " >> /etc/image-version")
    os.system("echo version=" + getImageVersion() + " >> /etc/image-version")
    os.system("echo build=" + getImageBuild() + " >> /etc/image-version")
    os.system("echo imageversion=" + getImageVersion() + "-" +
              getImageBuild() + " >> /etc/image-version")
    os.system("echo date=`cat /etc/version`" + " >> /etc/image-version")
    os.system("echo comment=openHDF" " >> /etc/image-version")
    os.system("echo target=9" " >> /etc/image-version")
    os.system("echo creator=OpenHDF" " >> /etc/image-version")
    os.system("echo url=http://www.hdfreaks.cc" " >> /etc/image-version")
    os.system("echo catalog=http://www.hdfreaks.cc" " >> /etc/image-version")
    os.system("echo distro=" + getImageDistro() + " >> /etc/image-version")
Ejemplo n.º 55
0
print 'getMachineBrand=%s<' % boxbranding.getMachineBrand()
print 'getMachineName=%s<' % boxbranding.getMachineName()
print 'getMachineMtdKernel=%s<' % boxbranding.getMachineMtdKernel()
print 'getMachineKernelFile=%s<' % boxbranding.getMachineKernelFile()
print 'getMachineMtdRoot=%s<' % boxbranding.getMachineMtdRoot()
print 'getMachineRootFile=%s<' % boxbranding.getMachineRootFile()
print 'getMachineMKUBIFS=%s<' % boxbranding.getMachineMKUBIFS()
print 'getMachineUBINIZE=%s<' % boxbranding.getMachineUBINIZE()
print 'getBoxType=%s<' % boxbranding.getBoxType()
print 'getBrandOEM=%s<' % boxbranding.getBrandOEM()
print 'getOEVersion=%s<' % boxbranding.getOEVersion()
print 'getDriverDate=%s<' % boxbranding.getDriverDate()
print 'getImageVersion=%s<' % boxbranding.getImageVersion()
print 'getImageBuild=%s<' % boxbranding.getImageBuild()
print 'getImageDevBuild=%s<' % boxbranding.getImageDevBuild()
print 'getImageType=%s<' % boxbranding.getImageType()
print 'getImageDistro=%s<' % boxbranding.getImageDistro()
print 'getImageFolder=%s<' % boxbranding.getImageFolder()
print 'getImageFileSystem=%s<' % boxbranding.getImageFileSystem()
print 'getImageDevBuild=%s<' % boxbranding.getImageDevBuild()
print 'getImageType=%s<' % boxbranding.getImageType()
print 'getMachineMake=%s<' % boxbranding.getMachineMake()
print 'getImageArch=%s<' % boxbranding.getImageArch()
print 'getFeedsUrl=%s<' % boxbranding.getFeedsUrl()
print 'getDisplayType=%s<' % boxbranding.getDisplayType()
print 'getHaveHDMI=%s<' % boxbranding.getHaveHDMI()
print 'getHaveYUV=%s<' % boxbranding.getHaveYUV()
print 'getHaveRCA=%s<' % boxbranding.getHaveRCA()
print 'getHaveAVJACK=%s<' % boxbranding.getHaveAVJACK()
print 'getHaveSCART=%s<' % boxbranding.getHaveSCART()
print 'getHaveSCARTYUV=%s<' % boxbranding.getHaveSCARTYUV()
Ejemplo n.º 56
0
	def populate(self):
		self["lab1"] = StaticText(_("Virtuosso Image Xtreme"))
		self["lab2"] = StaticText(_("By Team ViX"))
		model = None
		AboutText = ""
		self["lab3"] = StaticText(_("Support at") + " www.world-of-satellite.com")

		AboutText += _("Model:\t%s %s\n") % (getMachineBrand(), getMachineName())

		if path.exists('/proc/stb/info/chipset'):
			AboutText += _("Chipset:\tBCM%s\n") % about.getChipSetString()

		AboutText += _("CPU:\t%s\n") % about.getCPUString().replace('bcm', 'BCM')
		AboutText += _("CPU speed:\t%s\n") % about.getCPUSpeedString()
		AboutText += _("Cores:\t%s\n") % about.getCpuCoresString()
		imageSubBuild = ""
		if getImageType() != 'release':
			imageSubBuild = ".%s" % getImageDevBuild()
		AboutText += _("Image:\t%s.%s%s (%s)\n") % (getImageVersion(), getImageBuild(), imageSubBuild, getImageType().title())
		skinWidth = getDesktop(0).size().width()
		skinHeight = getDesktop(0).size().height()

		string = getDriverDate()
		year = string[0:4]
		month = string[4:6]
		day = string[6:8]
		driversdate = '-'.join((year, month, day))
		AboutText += _("Drivers:\t%s\n") % driversdate
		AboutText += _("Kernel:\t%s\n") % about.getKernelVersionString()
		AboutText += _("GStreamer:\t%s\n") % about.getGStreamerVersionString().replace("GStreamer ","")
		AboutText += _("Python:\t%s\n") % about.getPythonVersionString()
		AboutText += _("Installed:\t%s\n") % about.getFlashDateString()
		AboutText += _("Last update:\t%s\n") % getEnigmaVersionString()
		AboutText += _("E2 (re)starts:\t%s\n") % config.misc.startCounter.value
		AboutText += _("Skin:\t%s") % config.skin.primary_skin.value[0:-9] + _("  (%s x %s)") % (skinWidth, skinHeight) + "\n"

		tempinfo = ""
		if path.exists('/proc/stb/sensors/temp0/value'):
			f = open('/proc/stb/sensors/temp0/value', 'r')
			tempinfo = f.read()
			f.close()
		elif path.exists('/proc/stb/fp/temp_sensor'):
			f = open('/proc/stb/fp/temp_sensor', 'r')
			tempinfo = f.read()
			f.close()
		elif path.exists('/proc/stb/sensors/temp/value'):
			f = open('/proc/stb/sensors/temp/value', 'r')
			tempinfo = f.read()
			f.close()
		if tempinfo and int(tempinfo.replace('\n', '')) > 0:
			mark = str('\xc2\xb0')
			AboutText += _("System temp:\t%s") % tempinfo.replace('\n', '').replace(' ','') + mark + "C\n"

		tempinfo = ""
		if path.exists('/proc/stb/fp/temp_sensor_avs'):
			f = open('/proc/stb/fp/temp_sensor_avs', 'r')
			tempinfo = f.read()
			f.close()
		if tempinfo and int(tempinfo.replace('\n', '')) > 0:
			mark = str('\xc2\xb0')
			AboutText += _("Processor temp:\t%s") % tempinfo.replace('\n', '').replace(' ','') + mark + "C\n"
		AboutLcdText = AboutText.replace('\t', ' ')

		fp_version = getFPVersion()
		if fp_version is None:
			fp_version = ""
		elif fp_version != 0:
			fp_version = _("FP version:\t%s") % fp_version
			AboutText += fp_version + "\n"

		bootloader = ""
		if path.exists('/sys/firmware/devicetree/base/bolt/tag'):
				f = open('/sys/firmware/devicetree/base/bolt/tag', 'r')
				bootloader = f.readline().replace('\x00', '').replace('\n', '')
				f.close()
				AboutText += _("Bootloader:\t\t%s\n") % (bootloader)

		self["AboutScrollLabel"] = ScrollLabel(AboutText)
Ejemplo n.º 57
0
	def getLatestImageTimestamp(self):
		url = "http://images.teamblue.tech/status/%s-%s/buildtimestamp-%s" % (getImageVersion(), getImageType(), getBoxType())
		# print "[SoftwareUpdate] url buildtimestamp: ", url
		try:
			# TODO: Use Twisted's URL fetcher, urlopen is evil. And it can
			# run in parallel to the package update.
			from time import strftime
			from datetime import datetime
			try:
				latestImageTimestamp = datetime.fromtimestamp(int(urlopen(url, timeout=5).read())).strftime(_("%Y-%m-%d %H:%M"))
			except:
				# bypass the certificate check
				from ssl import _create_unverified_context
				latestImageTimestamp = datetime.fromtimestamp(int(urlopen(url, timeout=5, context=_create_unverified_context()).read())).strftime(_("%Y-%m-%d %H:%M"))
		except:
			latestImageTimestamp = ""
		print "[SoftwareUpdate] latestImageTimestamp:", latestImageTimestamp
		return latestImageTimestamp
Ejemplo n.º 58
0
try:
    reload(sys)
    sys.setdefaultencoding('utf-8')
except:
    pass

if os.path.isfile("/usr/lib/enigma2/python/enigma.zip"):
    sys.path.append("/usr/lib/enigma2/python/enigma.zip")

from Tools.Profile import profile, profile_final
profile("PYTHON_START")

import Tools.RedirectOutput
from boxbranding import getBoxType, getBrandOEM, getImageCodeName, getImageType, getImageVersion, getImageBuild, getMachineBuild, getImageArch
print "----------------------------"
print "[Image Type] %s" % getImageType()
print "[Image Version] %s" % getImageVersion()
print "[Image Build] %s" % getImageBuild()
print "[Image CodeName] %s" % getImageCodeName()
print "[Image Arch] %s" % getImageArch()
print "----------------------------"

import enigma
import eConsoleImpl
import eBaseImpl
enigma.eTimer = eBaseImpl.eTimer
enigma.eSocketNotifier = eBaseImpl.eSocketNotifier
enigma.eConsoleAppContainer = eConsoleImpl.eConsoleAppContainer

print "Init Import modules for test"
from enigma import eTimer
Ejemplo n.º 59
0
from Components.Sources.StaticText import StaticText
from Components.Button import Button
from Components.ScrollLabel import ScrollLabel
from Components.Label import Label
from Components.config import config
from Screens.Screen import Screen

from enigma import eTimer
from boxbranding import getImageVersion, getImageBuild, getImageDevBuild, getImageType
from sys import modules

from datetime import datetime
from json import loads
import urllib2

if getImageType() == 'release':
	ImageVer = "%03d" % int(getImageBuild())
else:
	ImageVer = "%s.%s" % (getImageBuild(),getImageDevBuild())
	ImageVer = float(ImageVer)

E2Branches = {
	'developer' : 'Dev',
	'release' : 'master'
	}

project = 0
projects = [
	("https://api.github.com/repos/BlackHole/enigma2-obh10/commits?sha=%s" % E2Branches[getImageType()], "Enigma2"),
	("https://api.github.com/repos/BlackHole/obh-core/commits", "OBH Core"),
#	("https://api.github.com/repos/BlackHole/skins/commits", "OBH Skins"),