update language cache
[enigma2.git] / lib / python / Components / Ipkg.py
old mode 100644 (file)
new mode 100755 (executable)
index 79389b4..0ba1165
@@ -31,8 +31,8 @@ class IpkgComponent:
                
        def runCmd(self, cmd):
                print "executing", self.ipkg, cmd
-               self.cmd.appClosed.get().append(self.cmdFinished)
-               self.cmd.dataAvail.get().append(self.cmdData)
+               self.cmd.appClosed.append(self.cmdFinished)
+               self.cmd.dataAvail.append(self.cmdData)
                if self.cmd.execute(self.ipkg + " " + cmd):
                        self.cmdFinished(-1)
 
@@ -52,12 +52,14 @@ class IpkgComponent:
                                self.runCmd("list")
                elif cmd == self.CMD_INSTALL:
                        self.runCmd("install " + args['package'])
+               elif cmd == self.CMD_REMOVE:
+                       self.runCmd("remove " + args['package'])
                self.setCurrentCommand(cmd)
        
        def cmdFinished(self, retval):
                self.callCallbacks(self.EVENT_DONE)
-               self.cmd.appClosed.get().remove(self.cmdFinished)
-               self.cmd.dataAvail.get().remove(self.cmdData)
+               self.cmd.appClosed.remove(self.cmdFinished)
+               self.cmd.dataAvail.remove(self.cmdData)
 
        def cmdData(self, data):
                print "data:", data
@@ -90,6 +92,8 @@ class IpkgComponent:
                                self.callCallbacks(self.EVENT_UPGRADE, data.split('    ', 1)[1].split(' ')[0])
                        elif data.find('Installing') == 0:
                                self.callCallbacks(self.EVENT_INSTALL, data.split(' ', 1)[1].split(' ')[0])
+                       elif data.find('Removing') == 0:
+                               self.callCallbacks(self.EVENT_REMOVE, data.split(' ', 1)[1].split(' ')[1])
                        elif data.find('Configuring') == 0:
                                self.callCallbacks(self.EVENT_CONFIGURING, data.split(' ', 1)[1].split(' ')[0])
                        elif data.find('An error occurred') == 0: