Respect category when running as cwd call without specified package.
authorscarabeus <scarabeus@gentoo.org>
Wed, 17 Nov 2010 02:25:46 +0000 (02:25 -0000)
committerscarabeus <scarabeus@gentoo.org>
Wed, 17 Nov 2010 02:25:46 +0000 (02:25 -0000)
svn path=/trunk/gentoolkit/; revision=853

pym/gentoolkit/eshowkw/__init__.py

index 72be2f170f31d1bb51c0b3d6aecb54e2b1e0c25a..cb957a34109d6a374d8f5959e95ba2289b67e8da 100644 (file)
@@ -112,13 +112,13 @@ def main(argv, indirect = False):
                map(lambda x: process_display(x, keywords, dbapi), package)
        else:
                currdir = os.getcwd()
-               package=os.path.basename(currdir)
                # check if there are actualy some ebuilds
                ebuilds = ['%s' % x for x in os.listdir(currdir)
                        if fnmatch.fnmatch(x, '*.ebuild')]
                if len(ebuilds) <= 0:
                        msg_err = 'No ebuilds at "%s"' % currdir
                        raise SystemExit(msg_err)
+               package= '%s/%s' % (os.path.basename(os.path.abspath('../')), os.path.basename(currdir))
                ourtree = os.path.abspath('../../')
                overlays = '%s %s' % (ports['PORTDIR_OVERLAY'], ourtree)
                mysettings = portc(env={'PORTDIR_OVERLAY': overlays})