-from Tools.Directories import crawlDirectory, resolveFilename, SCOPE_CONFIG, SCOPE_SKIN
+from Tools.Directories import crawlDirectory, resolveFilename, SCOPE_CONFIG, SCOPE_SKIN, copyfile, copytree
from Components.NimManager import nimmanager
from Components.Ipkg import IpkgComponent
from Components.config import config, configfile
from Components.NimManager import nimmanager
from Components.Ipkg import IpkgComponent
from Components.config import config, configfile
self.elements = []
self.validFileTypes = ["skin", "config", "services", "favourites", "package"]
self.prerequisitesMet = prerequisiteMet
self.elements = []
self.validFileTypes = ["skin", "config", "services", "favourites", "package"]
self.prerequisitesMet = prerequisiteMet
def printError(self, error):
print "Error in defaults xml files:", error
raise InfoHandlerParseError, error
def printError(self, error):
print "Error in defaults xml files:", error
raise InfoHandlerParseError, error
def startElement(self, name, attrs):
#print name, ":", attrs.items()
self.elements.append(name)
def startElement(self, name, attrs):
#print name, ":", attrs.items()
self.elements.append(name)
- if name in ["hardware", "bcastsystem", "satellite", "tag"]:
+ if name in ("hardware", "bcastsystem", "satellite", "tag"):
if not attrs.has_key("type"):
self.printError(str(name) + " tag with no type attribute")
if self.elements[-3] == "default":
if not attrs.has_key("type"):
self.printError(str(name) + " tag with no type attribute")
if self.elements[-3] == "default":
STATUS_INIT = 4
def __init__(self, statusCallback, blocking = False, neededTag = None):
STATUS_INIT = 4
def __init__(self, statusCallback, blocking = False, neededTag = None):
self.installPackage(self.installIndexes[self.currentlyInstallingMetaIndex])
def installPackage(self, index):
self.installPackage(self.installIndexes[self.currentlyInstallingMetaIndex])
def installPackage(self, index):
+ print "self.packageslist:", self.packageslist
+ if len(self.packageslist) <= index:
+ print "no package with index", index, "found... installing nothing"
+ return
print "installing package with index", index, "and name", self.packageslist[index][0]["attributes"]["name"]
attributes = self.packageslist[index][0]["attributes"]
print "installing package with index", index, "and name", self.packageslist[index][0]["attributes"]["name"]
attributes = self.packageslist[index][0]["attributes"]
self.statusCallback(self.status, None)
def installNext(self, *args, **kwargs):
self.statusCallback(self.status, None)
def installNext(self, *args, **kwargs):
self.currentIndex += 1
attributes = self.installingAttributes
#print "attributes:", attributes
self.currentIndex += 1
attributes = self.installingAttributes
#print "attributes:", attributes
currentAttribute = self.attributeNames[self.currentAttributeIndex]
print "installing", currentAttribute, "with index", self.currentIndex
currentAttribute = self.attributeNames[self.currentAttributeIndex]
print "installing", currentAttribute, "with index", self.currentIndex
print "installing skin:", directory, " - ", name
print "cp -a %s %s" % (directory, resolveFilename(SCOPE_SKIN))
if self.blocking:
print "installing skin:", directory, " - ", name
print "cp -a %s %s" % (directory, resolveFilename(SCOPE_SKIN))
if self.blocking:
def installFavourites(self, directory, name):
print "installing favourites:", directory, " - ", name
def installFavourites(self, directory, name):
print "installing favourites:", directory, " - ", name