summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarius Mauch <genone@gentoo.org>2008-03-15 22:43:25 +0000
committerMarius Mauch <genone@gentoo.org>2008-03-15 22:43:25 +0000
commit1d0652095f74e33078fa49d70ce1e24bfb3280ea (patch)
treec77e8657ad9c1cf10ce0729533a19de964d22320 /bin/pkgname
parentadd a placeholder for repository paths in 'filename' and 'directory' options ... (diff)
downloadportage-multirepo-1d0652095f74e33078fa49d70ce1e24bfb3280ea.tar.gz
portage-multirepo-1d0652095f74e33078fa49d70ce1e24bfb3280ea.tar.bz2
portage-multirepo-1d0652095f74e33078fa49d70ce1e24bfb3280ea.zip
avoid importing portage to improve performance
svn path=/main/trunk/; revision=9470
Diffstat (limited to 'bin/pkgname')
-rwxr-xr-xbin/pkgname6
1 files changed, 3 insertions, 3 deletions
diff --git a/bin/pkgname b/bin/pkgname
index 4c0dd6c9..1850d71a 100755
--- a/bin/pkgname
+++ b/bin/pkgname
@@ -5,13 +5,13 @@
import sys, os
try:
- import portage
+ from portage.versions import pkgsplit
except ImportError:
from os import path as osp
sys.path.insert(0, osp.join(osp.dirname(osp.dirname(osp.realpath(__file__))), "pym"))
- import portage
+ from portage.versions import pkgsplit
-a=portage.pkgsplit(sys.argv[1])
+a=pkgsplit(sys.argv[1])
if a:
print a[0],a[1],a[2][1:]
sys.exit(0)