aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Bersenev <bay@hackerdom.ru>2014-02-17 17:57:05 +0600
committerAlexander Bersenev <bay@hackerdom.ru>2014-02-17 17:57:05 +0600
commit6563293d18daed502ccdb663f3c72b4bae5fe23a (patch)
treed0a7d53a7c137feb4073c963408829f88ea75c92 /portage_with_autodep/bin/xpak-helper.py
parentupdated portage to 2.2.8-r1 (diff)
downloadautodep-master.tar.gz
autodep-master.tar.bz2
autodep-master.zip
updated portage to 2.2.8-r1HEADmaster
Diffstat (limited to 'portage_with_autodep/bin/xpak-helper.py')
-rwxr-xr-xportage_with_autodep/bin/xpak-helper.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/portage_with_autodep/bin/xpak-helper.py b/portage_with_autodep/bin/xpak-helper.py
index ef74920..d9d325d 100755
--- a/portage_with_autodep/bin/xpak-helper.py
+++ b/portage_with_autodep/bin/xpak-helper.py
@@ -1,11 +1,12 @@
#!/usr/bin/python
-# Copyright 2009-2011 Gentoo Foundation
+# Copyright 2009-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-import optparse
import sys
import portage
+portage._internal_caller = True
from portage import os
+from portage.util._argparse import ArgumentParser
def command_recompose(args):
@@ -45,8 +46,8 @@ def main(argv):
usage = "usage: %s COMMAND [args]" % \
os.path.basename(argv[0])
- parser = optparse.OptionParser(description=description, usage=usage)
- options, args = parser.parse_args(argv[1:])
+ parser = ArgumentParser(description=description, usage=usage)
+ options, args = parser.parse_known_args(argv[1:])
if not args:
parser.error("missing command argument")