summaryrefslogtreecommitdiffstats
path: root/bin/ebuild
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2008-06-19 03:42:54 +0000
committerZac Medico <zmedico@gentoo.org>2008-06-19 03:42:54 +0000
commite01bc5f622ceab48ac8ff04d81fb7ec837dc2110 (patch)
treecc0c1a95a18a6eacc6ca911b523f513a0d327feb /bin/ebuild
parent251567a34c7511f681821e23a9a6e38526101986 (diff)
downloadportage-e01bc5f622ceab48ac8ff04d81fb7ec837dc2110.tar.gz
portage-e01bc5f622ceab48ac8ff04d81fb7ec837dc2110.tar.bz2
portage-e01bc5f622ceab48ac8ff04d81fb7ec837dc2110.zip
Bug #225285 - Add support for persistent options stored in the EBUILD_DEFAULT_OPTS
environment variable (similar to {EMERGE,QUICKPKG}_DEFAULT_OPTS). (trunk r10713) svn path=/main/branches/2.1.2/; revision=10720
Diffstat (limited to 'bin/ebuild')
-rwxr-xr-xbin/ebuild13
1 files changed, 10 insertions, 3 deletions
diff --git a/bin/ebuild b/bin/ebuild
index 8ea9f017d..0254ebc9e 100755
--- a/bin/ebuild
+++ b/bin/ebuild
@@ -19,6 +19,9 @@ force_help = "When used together with the digest or manifest " + \
parser.add_option("--force", help=force_help, action="store_true", dest="force")
parser.add_option("--debug", help="show debug output",
action="store_true", dest="debug")
+parser.add_option("--ignore-default-opts",
+ action="store_true",
+ help="do not use the EBUILD_DEFAULT_OPTS environment variable")
parser.add_option("--skip-manifest", help="skip all manifest checks",
action="store_true", dest="skip_manifest")
@@ -27,9 +30,6 @@ opts, pargs = parser.parse_args(args=sys.argv[1:])
if len(pargs) < 2:
parser.error("missing required args")
-debug = opts.debug
-force = opts.force
-
if "merge" in pargs:
print "Disabling noauto in features... merge disables it. (qmerge doesn't)"
os.environ["FEATURES"] = os.environ.get("FEATURES", "") + " -noauto"
@@ -42,6 +42,13 @@ except ImportError:
sys.path.insert(0, osp.join(osp.dirname(osp.dirname(osp.realpath(__file__))), "pym"))
import portage
+if not opts.ignore_default_opts:
+ default_opts = portage.settings.get("EBUILD_DEFAULT_OPTS", "").split()
+ opts, pargs = parser.parse_args(default_opts + sys.argv[1:])
+
+debug = opts.debug
+force = opts.force
+
import portage_util, portage_const
import portage_dep
portage_dep._dep_check_strict = True