1 |
commit: 716f69482ffabf1a8e0e3496942a00ee5cdfa229 |
2 |
Author: James Le Cuirot <chewi <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue Apr 3 20:31:38 2018 +0000 |
4 |
Commit: Zac Medico <zmedico <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue May 1 16:25:07 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=716f6948 |
7 |
|
8 |
emerge: Add --sysroot option to set SYSROOT environment variable |
9 |
|
10 |
Closes: https://github.com/gentoo/portage/pull/276 |
11 |
|
12 |
pym/_emerge/main.py | 7 +++++++ |
13 |
1 file changed, 7 insertions(+) |
14 |
|
15 |
diff --git a/pym/_emerge/main.py b/pym/_emerge/main.py |
16 |
index e1b949b92..e8b2c2e13 100644 |
17 |
--- a/pym/_emerge/main.py |
18 |
+++ b/pym/_emerge/main.py |
19 |
@@ -732,6 +732,11 @@ def parse_opts(tmpcmdline, silent=False): |
20 |
"action" : "append", |
21 |
}, |
22 |
|
23 |
+ "--sysroot": { |
24 |
+ "help":"specify the location for build dependencies specified in DEPEND", |
25 |
+ "action":"store" |
26 |
+ }, |
27 |
+ |
28 |
"--use-ebuild-visibility": { |
29 |
"help" : "use unbuilt ebuild metadata for visibility checks on built packages", |
30 |
"choices" : true_y_or_n |
31 |
@@ -1201,6 +1206,8 @@ def emerge_main(args=None): |
32 |
os.environ["PORTAGE_DEBUG"] = "1" |
33 |
if "--config-root" in myopts: |
34 |
os.environ["PORTAGE_CONFIGROOT"] = myopts["--config-root"] |
35 |
+ if "--sysroot" in myopts: |
36 |
+ os.environ["SYSROOT"] = myopts["--sysroot"] |
37 |
if "--root" in myopts: |
38 |
os.environ["ROOT"] = myopts["--root"] |
39 |
if "--prefix" in myopts: |