Ahlyab / Ahlyab/slowpoke

Add basic Pacman support

未关闭
#4 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
enhancement good first issue
主要语言
Python
星标
0
派生
0
PR 合并指标
30 天内没有已合并 PR

描述

## Summary

Treat **Pacman** as a supported, **basic** path on Arch (and Arch-based) systems: predictable search → install plans, tests, and docs aligned with the code.

## Background

slowpoke picks a package manager from `PATH`, searches for packages locally, then builds a structured plan (`pacman …`) with dry-run before execution.

## Current state (already in tree)

- **Detection:** `pacman` on `PATH` maps to internal name `"pacman"` (`src/slowpoke/system/system_info.py`).
- **Search:** `pacman -Ss ` with parsing into `PackageCandidate` (`src/slowpoke/system/package_managers/pacman.py`).
- **Install plan:** `pacman -S --noconfirm ` via `PackageManager.plan()` (steps use `needs_sudo=True` like other managers — `src/slowpoke/system/package_managers/base.py`).
- **Safety allowlist:** `pacman` is listed (`src/slowpoke/execution/safety.py`).

So this issue is **hardening “basic” support**: correctness on real `pacman -Ss` output, tests, and README — not necessarily feature parity with DNF’s extra orchestration.

## Scope / ideas for contributors

1. **Install flow** — Confirm the generated plan is correct for typical packages (official repos vs names returned by search). Adjust parsing or flags only if real output shows gaps (e.g. edge cases in `-Ss` formatting).
2. **Package search** — Validate or refine parsing of `pacman -Ss` lines (repo/pkg split, continuation lines). Add unit tests with **mocked** `run_capture` output taken from real Arch sessions if needed.
3. **Tests** — Add `tests/test_pacman_manager.py` (mirror `tests/test_dnf_manager.py`): success/empty search, install plan shape.
4. **README** — Update the supported package managers table when Pacman is considered “basic” or “fully” supported (`README.md`).

## Acceptance criteria

- [ ] Unit tests cover Pacman search parsing and install plan (`executable`, `args`, `needs_sudo`).
- [ ] README reflects Pacman status accurately.
- [ ] No loosening of execution safety rules without strong justification.

## Out of scope (separate issues)

- AUR helpers (`yay`, `paru`) or building from PKGBUILD.
- Replacing `--noconfirm` with interactive flows.

---

You can shorten the **Current state** section if you want a minimal issue; keep **Scope** and **Acceptance criteria** so pick-up is clear.

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。