Components/DreamInfoHandler.py, SystemPlugins/SoftwareManager: add possibility to...
[enigma2.git] / lib / python / Components / DreamInfoHandler.py
index dd140cbbab2c30d23ffc8d32fa9fb274039bd60d..8097365c5527608c160d6014ed63be4860815762 100755 (executable)
@@ -84,6 +84,8 @@ class InfoHandler(xml.sax.ContentHandler):
                                self.attributes["packagename"] = str(attrs["packagename"])
                        if attrs.has_key("packagetype"):
                                self.attributes["packagetype"] = str(attrs["packagetype"])
+                       if attrs.has_key("needsRestart"):
+                               self.attributes["needsRestart"] = str(attrs["needsRestart"])
                        if attrs.has_key("shortdescription"):
                                self.attributes["shortdescription"] = str(attrs["shortdescription"])
 
@@ -120,10 +122,12 @@ class InfoHandler(xml.sax.ContentHandler):
                        self.attributes["name"] = str(data)
                if self.elements[-1] == "packagename":
                        self.attributes["packagename"] = str(data)
+               if self.elements[-1] == "needsRestart":
+                       self.attributes["needsRestart"] = str(data)
                if self.elements[-1] == "shortdescription":
                        self.attributes["shortdescription"] = str(data)
                if self.elements[-1] == "description":
-                       self.data += data
+                       self.data += data.strip()
                        self.attributes["description"] = str(self.data)
                #print "characters", data
 
@@ -222,6 +226,8 @@ class DreamInfoHandler:
                for indexfile in os.listdir(self.directory[0]):
                        if indexfile.startswith("index-"):
                                if indexfile.endswith(".xml"):
+                                       if indexfile[-7:-6] == "_":
+                                               continue
                                        indexfileList.append(indexfile)
                if len(indexfileList):
                        for file in indexfileList:
@@ -395,7 +401,7 @@ class DreamInfoHandler:
                
        def installIPK(self, directory, name):
                if self.blocking:
-                       os.system("ipkg install " + directory + name)
+                       os.system("opkg install " + directory + name)
                        self.installNext()
                else:
                        self.ipkg = IpkgComponent()