Created
August 16, 2024 14:46
-
-
Save konsolebox/c6bf4122971443f60b39ea28cf9141b5 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/cnf/make.globals b/cnf/make.globals | |
index f951bb3..9716371 100644 | |
--- a/cnf/make.globals | |
+++ b/cnf/make.globals | |
@@ -80,7 +80,7 @@ FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs | |
fixlafiles ipc-sandbox merge-sync multilib-strict | |
network-sandbox news parallel-fetch pid-sandbox | |
preserve-libs protect-owned qa-unresolved-soname-deps | |
- sandbox sfperms strict | |
+ restrict-mirror sandbox sfperms strict | |
unknown-features-warn unmerge-logs unmerge-orphans userfetch | |
userpriv usersandbox usersync" | |
diff --git a/lib/portage/const.py b/lib/portage/const.py | |
index 10a208c..f7a2e6e 100644 | |
--- a/lib/portage/const.py | |
+++ b/lib/portage/const.py | |
@@ -188,6 +188,7 @@ SUPPORTED_FEATURES = frozenset( | |
"protect-owned", | |
"python-trace", | |
"qa-unresolved-soname-deps", | |
+ "restrict-mirror", | |
"sandbox", | |
"selinux", | |
"sesandbox", | |
diff --git a/lib/portage/package/ebuild/fetch.py b/lib/portage/package/ebuild/fetch.py | |
index 0ecad16..d8cfddb 100644 | |
--- a/lib/portage/package/ebuild/fetch.py | |
+++ b/lib/portage/package/ebuild/fetch.py | |
@@ -799,7 +799,7 @@ def fetch( | |
userfetch = portage.data.secpass >= 2 and "userfetch" in features | |
# 'nomirror' is bad/negative logic. You Restrict mirroring, not no-mirroring. | |
- restrict_mirror = "mirror" in restrict or "nomirror" in restrict | |
+ restrict_mirror = "mirror" in restrict or "nomirror" in restrict or "restrict-mirror" in features | |
if restrict_mirror: | |
if ("mirror" in features) and ("lmirror" not in features): | |
# lmirror should allow you to bypass mirror restrictions. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment