diff --git a/ee/core/apt_repo.py b/ee/core/apt_repo.py index 4a71a6fb..a2d6f312 100644 --- a/ee/core/apt_repo.py +++ b/ee/core/apt_repo.py @@ -48,11 +48,12 @@ class EERepo(): "--remove '{ppa_name}'" .format(ppa_name=repo_url)) - def add_key(keyids, keyserver=None): + def add_key(self, keyids, keyserver=None): if keyserver is None: - EEShellExec.cmd_exec("gpg --keyserver {serv}" - .format(serv=(keyserver - or "hkp://keys.gnupg.net")) + EEShellExec.cmd_exec(self, "gpg --keyserver {serv}" + .format(serv=(keyserver or + "hkp://keys.gnupg.net")) + " --recv-keys {key}".format(key=keyids)) - EEShellExec.cmd_exec("gpg -a --export --armor {0}".format(keyids) + EEShellExec.cmd_exec(self, "gpg -a --export --armor {0}" + .format(keyids) + " | apt-key add - ") diff --git a/ee/core/aptget.py b/ee/core/aptget.py index 2e533e19..72b4c4cb 100644 --- a/ee/core/aptget.py +++ b/ee/core/aptget.py @@ -50,15 +50,25 @@ class EEAptGet(): #apt_cache.close() return False else: - pkg.mark_install() + try: + print(pkg.name) + pkg.mark_install() + 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 (' + @@ -85,6 +95,7 @@ class EEAptGet(): return False else: try: + print(pkg.name) pkg.mark_delete(purge) except SystemError as e: Log.debug(self, 'SystemError: ' + str(e)) @@ -97,6 +108,9 @@ class EEAptGet(): except SystemError as e: Log.debug(self, 'SystemError: ' + str(e)) return False + except Exception as e: + Log.debug(self, str(e)) + Log.error(self, str(e)) # apt_cache.close() else: # apt_cache.close()