Browse Source

apt-get unable to fork bug solved

bugfixes
harshadyeola 10 years ago
parent
commit
0fe8026bad
  1. 12
      ee/core/aptget.py

12
ee/core/aptget.py

@ -34,15 +34,17 @@ class EEAptGet():
def install(self, packages):
"""Installation of packages"""
def install_package(self, package_name):
apt_pkg.init()
# #apt_pkg.PkgSystemLock()
apt_cache = apt.cache.Cache()
def install_package(self, package_name):
global apt_cache
pkg = apt_cache[package_name.strip()]
if package_name.strip() in apt_cache:
if pkg.is_installed:
#apt_pkg.PkgSystemUnLock()
Log.info(self, 'Trying to install a package that '
Log.debug(self, 'Trying to install a package that '
'is already installed (' +
package_name.strip() + ')')
#apt_cache.close()
@ -67,15 +69,17 @@ class EEAptGet():
continue
def remove(self, packages, auto=False, purge=False):
def remove_package(self, package_name, purge=False):
apt_pkg.init()
# apt_pkg.PkgSystemLock()
apt_cache = apt.cache.Cache()
def remove_package(self, package_name, purge=False):
global apt_cache
pkg = apt_cache[package_name.strip()]
if package_name.strip() in apt_cache:
if not pkg.is_installed:
# apt_pkg.PkgSystemUnLock()
Log.info(self, 'Trying to uninstall a package '
Log.debug(self, 'Trying to uninstall a package '
'that is not installed (' +
package_name.strip() + ')')
return False

Loading…
Cancel
Save