Add APT install support
- Lingua principale
- Python
- Stelle
- 0
- Fork
- 0
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
## Summary
Bring **APT** to **first-class** status alongside DNF: reliable behavior on Debian/Ubuntu, tests, and documentation that matches reality.
## Background
slowpoke detects the package manager, builds a structured install plan (dry-run → confirm → run), and uses an LLM to resolve package names when local search returns candidates.
## Current state (already in tree)
- Detection: `apt-get` on `PATH` → internal name `"apt"` (`src/slowpoke/system/system_info.py`).
- Manager: `AptManager` uses `apt-cache search` and `apt-get install -y` (`src/slowpoke/system/package_managers/apt.py`).
- Sudo: install steps use `needs_sudo=True` via `PackageManager.plan()` (`src/slowpoke/system/package_managers/base.py`); CLI respects `auto_sudo` (`src/slowpoke/cli.py`).
So this issue is **not** “implement apt from scratch” — it is **hardening and parity** with how DNF is treated (see `tests/test_dnf_manager.py` and DNF-specific logic in `src/slowpoke/core/orchestrator.py`).
## Scope / ideas for contributors
Pick one or more; discuss in the PR if the change is large:
1. **Tests** — Add `tests/test_apt_manager.py` (or similar) mirroring the DNF tests: mocked `run_capture`, search parsing, and install plan shape (`executable`, `args`, `needs_sudo`).
2. **Real-system validation** — Document manual checks on Debian/Ubuntu (interactive dry-run, `--yes`, typical packages). Note any edge cases (minimal images missing `apt-cache`, etc.).
3. **Docs-backed install path** — When local search finds nothing, web-assisted planning runs; confirm APT systems get sensible prompts/plans and file issues for any bad LLM output patterns (compare to DNF-only augmentations where relevant).
4. **README** — Update the “Supported package managers” table when APT is considered “fully supported” (`README.md` currently lists APT as planned).
## Acceptance criteria
- [ ] Automated tests cover APT manager behavior (search + install plan), consistent with existing patterns.
- [ ] README status reflects APT support accurately.
- [ ] No regression to safety validation (`src/slowpoke/execution/safety.py`) or execution path.
## Out of scope (unless you open a separate issue)
- Replacing `apt-get` with `apt` for UX only (justify if it affects scripting or minimal images).
- Non-APT Debian packaging (Snap, AppImage, etc.).
---
**Maintainers:** Some of this already exists; comment on this issue if you want to scope a smaller “tests-only” PR.
Guida per i contributori
Apri la guida per i contributori
Valutazione
Questa issue non è ancora stata valutata.