Lines 5252-5259
Link Here
|
5252 |
if removal_action and self.myopts.get("--with-bdeps", "y") == "n": |
5252 |
if removal_action and self.myopts.get("--with-bdeps", "y") == "n": |
5253 |
edepend["DEPEND"] = "" |
5253 |
edepend["DEPEND"] = "" |
5254 |
|
5254 |
|
|
|
5255 |
bdeps_root = "/" |
5256 |
if self.target_root != "/": |
5257 |
root_deps = self.myopts.get("--root-deps") |
5258 |
if root_deps is not None: |
5259 |
if root_deps is True: |
5260 |
bdeps_root = myroot |
5261 |
elif root_deps == "rdeps": |
5262 |
bdeps_root = "/" |
5263 |
edepend["DEPEND"] = "" |
5264 |
|
5255 |
deps = ( |
5265 |
deps = ( |
5256 |
("/", edepend["DEPEND"], |
5266 |
(bdeps_root, edepend["DEPEND"], |
5257 |
self._priority(buildtime=(not bdeps_optional), |
5267 |
self._priority(buildtime=(not bdeps_optional), |
5258 |
optional=bdeps_optional)), |
5268 |
optional=bdeps_optional)), |
5259 |
(myroot, edepend["RDEPEND"], self._priority(runtime=True)), |
5269 |
(myroot, edepend["RDEPEND"], self._priority(runtime=True)), |
Lines 14333-14343
Link Here
|
14333 |
|
14343 |
|
14334 |
new_args = [] |
14344 |
new_args = [] |
14335 |
jobs_opts = ("-j", "--jobs") |
14345 |
jobs_opts = ("-j", "--jobs") |
|
|
14346 |
root_deps_opt = '--root-deps' |
14347 |
root_deps_choices = ('True', 'rdeps') |
14336 |
arg_stack = args[:] |
14348 |
arg_stack = args[:] |
14337 |
arg_stack.reverse() |
14349 |
arg_stack.reverse() |
14338 |
while arg_stack: |
14350 |
while arg_stack: |
14339 |
arg = arg_stack.pop() |
14351 |
arg = arg_stack.pop() |
14340 |
|
14352 |
|
|
|
14353 |
if arg == root_deps_opt: |
14354 |
new_args.append(arg) |
14355 |
if arg_stack and arg_stack[-1] in root_deps_choices: |
14356 |
new_args.append(arg_stack.pop()) |
14357 |
else: |
14358 |
# insert default argument |
14359 |
new_args.append('True') |
14360 |
continue |
14361 |
|
14341 |
short_job_opt = bool("j" in arg and arg[:1] == "-" and arg[:2] != "--") |
14362 |
short_job_opt = bool("j" in arg and arg[:1] == "-" and arg[:2] != "--") |
14342 |
if not (short_job_opt or arg in jobs_opts): |
14363 |
if not (short_job_opt or arg in jobs_opts): |
14343 |
new_args.append(arg) |
14364 |
new_args.append(arg) |
Lines 14425-14431
Link Here
|
14425 |
"help":"specify conditions to trigger package reinstallation", |
14446 |
"help":"specify conditions to trigger package reinstallation", |
14426 |
"type":"choice", |
14447 |
"type":"choice", |
14427 |
"choices":["changed-use"] |
14448 |
"choices":["changed-use"] |
14428 |
} |
14449 |
}, |
|
|
14450 |
"--root": { |
14451 |
"help" : "specify the target root filesystem for merging packages", |
14452 |
"action" : "store" |
14453 |
}, |
14454 |
|
14455 |
"--root-deps": { |
14456 |
"help" : "modify interpretation of depedencies", |
14457 |
"type" : "choice", |
14458 |
"choices" :("True", "rdeps") |
14459 |
}, |
14429 |
} |
14460 |
} |
14430 |
|
14461 |
|
14431 |
from optparse import OptionParser |
14462 |
from optparse import OptionParser |
Lines 14454-14459
Link Here
|
14454 |
|
14485 |
|
14455 |
myoptions, myargs = parser.parse_args(args=tmpcmdline) |
14486 |
myoptions, myargs = parser.parse_args(args=tmpcmdline) |
14456 |
|
14487 |
|
|
|
14488 |
if myoptions.root_deps == "True": |
14489 |
myoptions.root_deps = True |
14490 |
|
14457 |
if myoptions.jobs: |
14491 |
if myoptions.jobs: |
14458 |
jobs = None |
14492 |
jobs = None |
14459 |
if myoptions.jobs == "True": |
14493 |
if myoptions.jobs == "True": |
Lines 14818-14823
Link Here
|
14818 |
os.environ["PORTAGE_DEBUG"] = "1" |
14852 |
os.environ["PORTAGE_DEBUG"] = "1" |
14819 |
if "--config-root" in myopts: |
14853 |
if "--config-root" in myopts: |
14820 |
os.environ["PORTAGE_CONFIGROOT"] = myopts["--config-root"] |
14854 |
os.environ["PORTAGE_CONFIGROOT"] = myopts["--config-root"] |
|
|
14855 |
if "--root" in myopts: |
14856 |
os.environ["ROOT"] = myopts["--root"] |
14821 |
|
14857 |
|
14822 |
# Portage needs to ensure a sane umask for the files it creates. |
14858 |
# Portage needs to ensure a sane umask for the files it creates. |
14823 |
os.umask(022) |
14859 |
os.umask(022) |