summaryrefslogtreecommitdiff
path: root/trunk/src/genpkgindex
diff options
context:
space:
mode:
authorantarus <antarus@gentoo.org>2007-04-01 05:13:21 +0000
committerantarus <antarus@gentoo.org>2007-04-01 05:13:21 +0000
commit9a327677f6984ca6e2ec73846e10549fd81595e2 (patch)
treec6209b99a2e616cc9091185ab99df1cf5701b035 /trunk/src/genpkgindex
parented8b48359ddb4b2723433cb732b59811bd921cc0 (diff)
downloadgentoolkit-9a327677f6984ca6e2ec73846e10549fd81595e2.tar.gz
Add support for new-style imports while keeping support for old imports as a fallback
svn path=/; revision=382
Diffstat (limited to 'trunk/src/genpkgindex')
-rw-r--r--trunk/src/genpkgindex/genpkgindex18
1 files changed, 13 insertions, 5 deletions
diff --git a/trunk/src/genpkgindex/genpkgindex b/trunk/src/genpkgindex/genpkgindex
index ffbc6c2..2259fb9 100644
--- a/trunk/src/genpkgindex/genpkgindex
+++ b/trunk/src/genpkgindex/genpkgindex
@@ -12,12 +12,20 @@ if getattr(__builtins__, "set", None) is None:
for x in ['CFLAGS','CXXFLAGS', 'LDFLAGS','USE']:
os.environ[x]=''
-import xpak
import portage
-import portage_checksum
-import portage_dep
-import portage_util
-import portage_const
+
+try:
+ import portage.xpak as xpak
+ import portage.checksum as portage_checksum
+ import portage.dep as portage_dep
+ import portage.util as portage_util
+ import portage.const as portage_const
+except ImportError:
+ import xpak
+ import portage_checksum
+ import portage_dep
+ import portage_util
+ import portage_const
argc=len(sys.argv)