Browse Source

self parameter missing in add_repo

bugfixes
harshadyeola 10 years ago
parent
commit
a8b88c42c1
  1. 11
      ee/core/apt_repo.py
  2. 16
      ee/core/aptget.py

11
ee/core/apt_repo.py

@ -48,11 +48,12 @@ class EERepo():
"--remove '{ppa_name}'" "--remove '{ppa_name}'"
.format(ppa_name=repo_url)) .format(ppa_name=repo_url))
def add_key(keyids, keyserver=None): def add_key(self, keyids, keyserver=None):
if keyserver is None: if keyserver is None:
EEShellExec.cmd_exec("gpg --keyserver {serv}" EEShellExec.cmd_exec(self, "gpg --keyserver {serv}"
.format(serv=(keyserver .format(serv=(keyserver or
or "hkp://keys.gnupg.net")) "hkp://keys.gnupg.net"))
+ " --recv-keys {key}".format(key=keyids)) + " --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 - ") + " | apt-key add - ")

16
ee/core/aptget.py

@ -50,15 +50,25 @@ class EEAptGet():
#apt_cache.close() #apt_cache.close()
return False return False
else: 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: try:
#apt_pkg.PkgSystemUnLock() #apt_pkg.PkgSystemUnLock()
result = apt_cache.commit() result = apt_cache.commit()
#apt_cache.close() #apt_cache.close()
return result return result
except SystemError as e: except SystemError as e:
Log.debug(self, 'SystemError: ' + str(e))
Log.error(self, 'SystemError: ' + str(e)) Log.error(self, 'SystemError: ' + str(e))
#apt_cache.close() #apt_cache.close()
except Exception as e:
Log.debug(self, str(e))
Log.error(self, str(e))
else: else:
#apt_cache.close() #apt_cache.close()
Log.error(self, 'Unknown package selected (' + Log.error(self, 'Unknown package selected (' +
@ -85,6 +95,7 @@ class EEAptGet():
return False return False
else: else:
try: try:
print(pkg.name)
pkg.mark_delete(purge) pkg.mark_delete(purge)
except SystemError as e: except SystemError as e:
Log.debug(self, 'SystemError: ' + str(e)) Log.debug(self, 'SystemError: ' + str(e))
@ -97,6 +108,9 @@ class EEAptGet():
except SystemError as e: except SystemError as e:
Log.debug(self, 'SystemError: ' + str(e)) Log.debug(self, 'SystemError: ' + str(e))
return False return False
except Exception as e:
Log.debug(self, str(e))
Log.error(self, str(e))
# apt_cache.close() # apt_cache.close()
else: else:
# apt_cache.close() # apt_cache.close()

Loading…
Cancel
Save