|
|
@ -64,19 +64,6 @@ class EEAptGet(): |
|
|
|
except Exception as e: |
|
|
|
Log.debug(self, str(e)) |
|
|
|
Log.error(self, str(e)) |
|
|
|
|
|
|
|
try: |
|
|
|
#apt_pkg.PkgSystemUnLock() |
|
|
|
result = apt_cache.commit() |
|
|
|
#apt_cache.close() |
|
|
|
return result |
|
|
|
except SystemError as e: |
|
|
|
Log.debug(self, 'SystemError: ' + str(e)) |
|
|
|
Log.error(self, 'SystemError: ' + str(e)) |
|
|
|
#apt_cache.close() |
|
|
|
except Exception as e: |
|
|
|
Log.debug(self, str(e)) |
|
|
|
Log.error(self, str(e)) |
|
|
|
else: |
|
|
|
#apt_cache.close() |
|
|
|
Log.error(self, 'Unknown package selected (' + |
|
|
@ -86,6 +73,20 @@ class EEAptGet(): |
|
|
|
if not install_package(self, package): |
|
|
|
continue |
|
|
|
|
|
|
|
if apt_cache.install_count > 0: |
|
|
|
try: |
|
|
|
#apt_pkg.PkgSystemUnLock() |
|
|
|
result = apt_cache.commit() |
|
|
|
#apt_cache.close() |
|
|
|
return result |
|
|
|
except SystemError as e: |
|
|
|
Log.debug(self, 'SystemError: ' + str(e)) |
|
|
|
Log.error(self, 'SystemError: ' + str(e)) |
|
|
|
#apt_cache.close() |
|
|
|
except Exception as e: |
|
|
|
Log.debug(self, str(e)) |
|
|
|
Log.error(self, str(e)) |
|
|
|
|
|
|
|
def remove(self, packages, auto=False, purge=False): |
|
|
|
""" |
|
|
|
Similar to `apt-get remove/purge` |
|
|
|