diff options
| author | Stefan Pluecken <stefan.pluecken@multimedia-labs.de> | 2006-12-19 07:19:55 +0000 |
|---|---|---|
| committer | Stefan Pluecken <stefan.pluecken@multimedia-labs.de> | 2006-12-19 07:19:55 +0000 |
| commit | eaa8bc374ff5eca1bb3caf9517dc6772cae34dd6 (patch) | |
| tree | 5268b8c6a858b4343dce4131261bd2bc5cdcb286 /lib/python/Components/Ipkg.py | |
| parent | 0ccffb6b503d7a285f3d5f7d7e44999d6eb60784 (diff) | |
| download | enigma2-eaa8bc374ff5eca1bb3caf9517dc6772cae34dd6.tar.gz enigma2-eaa8bc374ff5eca1bb3caf9517dc6772cae34dd6.zip | |
add IpkgInstaller Media Scanner plugin
Diffstat (limited to 'lib/python/Components/Ipkg.py')
| -rw-r--r-- | lib/python/Components/Ipkg.py | 39 |
1 files changed, 19 insertions, 20 deletions
diff --git a/lib/python/Components/Ipkg.py b/lib/python/Components/Ipkg.py index df700d6b..dbc99653 100644 --- a/lib/python/Components/Ipkg.py +++ b/lib/python/Components/Ipkg.py @@ -1,6 +1,6 @@ from enigma import eConsoleAppContainer -class Ipkg: +class IpkgComponent: EVENT_INSTALL = 0 EVENT_DOWNLOAD = 1 EVENT_INFLATING = 2 @@ -35,25 +35,24 @@ class Ipkg: print "executing", self.ipkg, cmd self.cmd.execute(self.ipkg + " " + cmd) - def cmdFetchList(self, installed_only = False): - self.fetchedList = [] - if installed_only: - self.runCmd("list_installed") - else: - self.runCmd("list") - self.setCurrentCommand(self.CMD_LIST) - - def cmdUpgrade(self, test_only = False): - append = "" - if test_only: - append = " -test" - self.runCmd("upgrade" + append) - self.setCurrentCommand(self.CMD_UPGRADE) - - def cmdUpdate(self): - self.runCmd("update") - self.setCurrentCommand(self.CMD_UPDATE) - + def startCmd(self, cmd, args = None): + if cmd == self.CMD_UPDATE: + self.runCmd("update") + elif cmd == self.CMD_UPGRADE: + append = "" + if args["test_only"]: + append = " -test" + self.runCmd("upgrade" + append) + elif cmd == self.CMD_LIST: + self.fetchedList = [] + if args['installed_only']: + self.runCmd("list_installed") + else: + self.runCmd("list") + elif cmd == self.CMD_INSTALL: + self.runCmd("install " + args['package']) + self.setCurrentCommand(cmd) + def cmdFinished(self, retval): self.callCallbacks(self.EVENT_DONE) |
