diff options
| author | ghost <andreas.monzner@multimedia-labs.de> | 2010-02-23 22:57:29 +0100 |
|---|---|---|
| committer | ghost <andreas.monzner@multimedia-labs.de> | 2010-02-23 22:59:29 +0100 |
| commit | bdea0dd8ac75294737564b1c2a4178a32ba3d284 (patch) | |
| tree | f81f7689dc8ea42b04cda56b4dd727d4bf305495 /lib/python/Components | |
| parent | 4aec730b6eb5eaac23a7eab69678ce13bd45a0a3 (diff) | |
| download | enigma2-bdea0dd8ac75294737564b1c2a4178a32ba3d284.tar.gz enigma2-bdea0dd8ac75294737564b1c2a4178a32ba3d284.zip | |
lib/python/Components/Ipkg.py: small fix for opkg
Diffstat (limited to 'lib/python/Components')
| -rwxr-xr-x | lib/python/Components/Ipkg.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/python/Components/Ipkg.py b/lib/python/Components/Ipkg.py index 0ba1165c..71447775 100755 --- a/lib/python/Components/Ipkg.py +++ b/lib/python/Components/Ipkg.py @@ -1,4 +1,5 @@ from enigma import eConsoleAppContainer +from Tools.Directories import fileExists class IpkgComponent: EVENT_INSTALL = 0 @@ -20,7 +21,7 @@ class IpkgComponent: def __init__(self, ipkg = '/usr/bin/ipkg'): self.ipkg = ipkg - + self.opkgAvail = fileExists('/usr/bin/opkg') self.cmd = eConsoleAppContainer() self.cache = None self.callbackList = [] @@ -89,7 +90,10 @@ class IpkgComponent: if data.find('Downloading') == 0: self.callCallbacks(self.EVENT_DOWNLOAD, data.split(' ', 5)[1].strip()) elif data.find('Upgrading') == 0: - self.callCallbacks(self.EVENT_UPGRADE, data.split(' ', 1)[1].split(' ')[0]) + if self.opkgAvail: + self.callCallbacks(self.EVENT_UPGRADE, data.split(' ', 1)[1].split(' ')[0]) + else: + 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: |
