Merge from genscripts r445: brian.dolbec
authorfuzzyray <fuzzyray@gentoo.org>
Wed, 22 Sep 2010 21:26:01 +0000 (21:26 -0000)
committerfuzzyray <fuzzyray@gentoo.org>
Wed, 22 Sep 2010 21:26:01 +0000 (21:26 -0000)
fix Bug 327741. put in the full command path including the EPREFIX if defined.

svn path=/trunk/gentoolkit/; revision=808

pym/gentoolkit/eclean/pkgindex.py

index a09ab55bb6b2f9b88a46bfc9d4c85577521997a6..108e1efa516886f707886bfe95b2aac60a8fbb81 100644 (file)
@@ -11,6 +11,7 @@ import os
 import sys
 
 import gentoolkit.pprinter as pp
+from gentoolkit.eprefix import EPREFIX
 
 import portage
 
@@ -25,6 +26,8 @@ class PkgIndex(object):
 
        def __init__(self, controller=None):
                self.controller = controller
+               # backup command line call
+               self.emaint_cmd = "%s/usr/sbin/emaint --fix binhost" % EPREFIX
 
 
        def _get_emaint_binhost(self):
@@ -75,9 +78,8 @@ class PkgIndex(object):
                file_ = os.path.join(portage.settings['PKGDIR'], 'Packages')
                statinfo = os.stat(file_)
                size1 = statinfo.st_size
-               command = "emaint --fix binhost"
                try:
-                       retcode = subprocess.call(command, shell=True)
+                       retcode = subprocess.call(self.emaint_cmd, shell=True)
                        if retcode < 0:
                                print( pp.error("Child was terminated by signal" + str(-retcode)), file=sys.stderr)
                except OSError as e: