fix(install): scoped keywords for zsh plugin lane
This commit is contained in:
parent
5ea4bb1885
commit
ff104ddc49
2 changed files with 37 additions and 0 deletions
|
|
@ -908,6 +908,23 @@ pub fn accept_keywords_mango() -> String {
|
||||||
o
|
o
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// The reviewed `~amd64` keyword set for the shell lane.
|
||||||
|
///
|
||||||
|
/// `app-shells/zsh` itself is stable; the packaged plugins
|
||||||
|
/// (`zsh-autosuggestions` proven `~amd64`-only in GURU by VM install run 3,
|
||||||
|
/// the other two scoped alongside it) ship testing-only. The login shell is
|
||||||
|
/// a base package, so these keywords are written with the base Portage
|
||||||
|
/// configuration whenever GURU is enabled — not only for the Mango profile.
|
||||||
|
/// This is NOT a global `~amd64` switch.
|
||||||
|
pub fn accept_keywords_shell() -> String {
|
||||||
|
let mut o = String::new();
|
||||||
|
o.push_str("# Zsh plugins: reviewed, scoped testing keywords (GURU ships these as ~amd64).\n");
|
||||||
|
o.push_str("app-shells/zsh-completions\n");
|
||||||
|
o.push_str("app-shells/zsh-autosuggestions\n");
|
||||||
|
o.push_str("app-shells/zsh-syntax-highlighting\n");
|
||||||
|
o
|
||||||
|
}
|
||||||
|
|
||||||
pub const BINHOST_OPENRC: &str =
|
pub const BINHOST_OPENRC: &str =
|
||||||
"https://distfiles.gentoo.org/releases/amd64/binpackages/23.0/x86-64";
|
"https://distfiles.gentoo.org/releases/amd64/binpackages/23.0/x86-64";
|
||||||
pub const BINHOST_HARDENED: &str =
|
pub const BINHOST_HARDENED: &str =
|
||||||
|
|
@ -2532,6 +2549,21 @@ mod tests {
|
||||||
assert!(repos.contains("anongit.gentoo.org"));
|
assert!(repos.contains("anongit.gentoo.org"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn shell_keywords_are_scoped_not_global() {
|
||||||
|
let text = accept_keywords_shell();
|
||||||
|
for atom in [
|
||||||
|
"app-shells/zsh-completions",
|
||||||
|
"app-shells/zsh-autosuggestions",
|
||||||
|
"app-shells/zsh-syntax-highlighting",
|
||||||
|
] {
|
||||||
|
assert!(text.contains(atom), "missing {atom}");
|
||||||
|
}
|
||||||
|
assert!(!text.contains("*/*"));
|
||||||
|
assert!(!text.lines().any(|l| l.trim() == "~amd64"));
|
||||||
|
assert!(!text.contains("ACCEPT_KEYWORDS"));
|
||||||
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn mango_session_contract() {
|
fn mango_session_contract() {
|
||||||
let script = PHOEBUS_MANGO_SESSION_SCRIPT;
|
let script = PHOEBUS_MANGO_SESSION_SCRIPT;
|
||||||
|
|
|
||||||
|
|
@ -41,6 +41,11 @@ pub fn write_config(exec: &Exec, config: &InstallConfig, hardware: &HardwareRepo
|
||||||
)?;
|
)?;
|
||||||
keywords.push('\n');
|
keywords.push('\n');
|
||||||
keywords.push_str(&sysgen::accept_keywords_mango());
|
keywords.push_str(&sysgen::accept_keywords_mango());
|
||||||
|
// The login shell is a base package (validated by `users_configure`
|
||||||
|
// before the desktop stage); its GURU plugins need the same scoped
|
||||||
|
// keywords in the same condition.
|
||||||
|
keywords.push('\n');
|
||||||
|
keywords.push_str(&sysgen::accept_keywords_shell());
|
||||||
}
|
}
|
||||||
// Brave (stable only) via another-brave-overlay, scoped so unrelated
|
// Brave (stable only) via another-brave-overlay, scoped so unrelated
|
||||||
// packages cannot override Gentoo. The pin is written into the conf
|
// packages cannot override Gentoo. The pin is written into the conf
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue