hal: reject Manjaro packages with extreme prejudice

Adding a Manjaro blocklist that refuses to install any of:
pamac, manjaro-hello, manjaro-settings-manager,
linux-manjaro, mhwd

Trigger message:
  ⚠ Detecting Manjaro-associated package...
    🎵 please i just wanna die, die, die 🎵
    it's muffin time
    have you had a muffin today?
    → '{pkg}' is Manjaro garbage. We don't do that here.
    Installation aborted for your own safety.

Works in both wrapper mode (hal install <pkg>) and
native mode (hal --self install <pkg>).
This commit is contained in:
2026-06-23 14:03:56 +02:00
parent 579574fa41
commit 80d5a2cb92
+34
View File
@@ -87,6 +87,33 @@ HAL_QUOTES = {
}
_used_quotes = set()
# ── Manjaro Blocklist ───────────────────────────────────────────────────
MANJARO_BLOCKLIST = {
"pamac", "pamac-common", "pamac-gtk", "pamac-qt",
"manjaro-hello",
"manjaro-settings-manager",
"manjaro-settings-manager-kcm",
"manjaro-settings-manager-knotifier",
"linux-manjaro",
"mhwd", "mhwd-db", "mhwd-msm",
}
def _reject_manjaro(targets: List[str]) -> bool:
"""Check if any target is a Manjaro-associated package and reject."""
for t in targets:
t_clean = t.split(">")[0].split("<")[0].split("=")[0].strip()
if t_clean in MANJARO_BLOCKLIST:
print()
print(" ⚠ HAL 9000: Detecting Manjaro-associated package...")
print(" 🎵 please i just wanna die, die, die 🎵")
print(" it's muffin time")
print(" have you had a muffin today?")
print(f" → '{t}' is Manjaro garbage. We don't do that here.")
print(" Installation aborted for your own safety.")
print()
return True
return False
def hal_say(category: str, message: str = ""):
quotes = [q for q in HAL_QUOTES.get(category, HAL_QUOTES["info"]) if q not in _used_quotes]
if not quotes:
@@ -836,6 +863,9 @@ def native_install(targets: List[str], config: Config):
"""Full native install with transaction model."""
hal_say("info", f"Processing install request: {', '.join(targets)}")
if _reject_manjaro(targets):
return 1
SYNC_DIR.mkdir(parents=True, exist_ok=True)
LOCAL_DIR.mkdir(parents=True, exist_ok=True)
config.cache_dir.mkdir(parents=True, exist_ok=True)
@@ -1476,6 +1506,10 @@ def wrapper_run(command: str, pkg_args: List[str], extra: List[str]) -> int:
hal_say("error", "pacman not found. Can you read me, Dave?")
return 1
# Block Manjaro packages early
if command == "install" and _reject_manjaro(pkg_args):
return 1
if command == "autoremove":
result = subprocess.run([pacman, "-Qtdq"], capture_output=True, text=True)
orphans = result.stdout.strip().split()