Commit Graph
8 Commits
Author SHA1 Message Date
BlackAngelTV 97d99c63a2 fix(credentials): run sudo without a password when the account has none
A passwordless sudo setup (NOPASSWD, or an account without a password) was
still asked for a password: leaving the field empty never satisfied the gate,
so the dialog reopened and the operation could not run at all.

The gate now asks sudo itself (`sudo -n true`) and lets the request through
when it needs nothing, privileged commands fall back to `sudo -n` when no
password is held, and an empty field cancels instead of looping. Releasing the
lock records its own pending request so an answered prompt is replayed rather
than lost.
2026-11-11 18:49:55 +01:00
BlackAngelTV fb5c11e153 feat(pacman): close the manager holding the database lock instead of waiting
tests / version-guard (push) Has been cancelled
tests / build-test (push) Has been cancelled
A locked database ended in "Un autre gestionnaire de paquets utilise déjà la
base. Attendez la fin de l'autre opération puis réessayez": the app knew
something else was running but could not say what, leaving the user to find
and close it before retrying by hand.

The lock is now inspected: the process holding /var/lib/pacman/db.lck is
identified through /proc (with a pgrep fallback for the known managers, whose
fd table is unreadable when they run as root), the dialog names it, and one
click stops it — SIGTERM first, so pacman aborts its transaction and releases
the lock itself, SIGKILL only when it does not react — then the pending
operation resumes on its own. A lock whose owner is gone is dropped the same
way, and one that disappears while the action is unwinding is retried without
a dialog at all.

Generated with Codebuff 🤖
Co-Authored-By: Codebuff <noreply@codebuff.com>
2026-09-12 22:47:53 +02:00
BlackAngelTV 632cdf1dea feat(cleanup): add a maintenance page for unused and legacy packages
Leftovers pile up on a machine: dependencies that no installed package
requires any more, and installs coming from the AUR or manual builds that the
sync databases know nothing about. The new Nettoyage page lists both (orphans
first, since they are the ones that can be removed in bulk), shows which
provider reported each row, and frees the space held by the caches: paccache
(or pacman -Sc) and flatpak's unused runtimes.

Cleanup is an optional capability of IPackageManager, so providers that only
install packages keep working unchanged.

Generated with Codebuff 🤖
Co-Authored-By: Codebuff <noreply@codebuff.com>
2026-09-12 22:17:08 +02:00
BlackAngelTV edc3ef2925 fix(pacman): report database locks and refresh failures
A concurrent manager holding /var/lib/pacman/db.lck, or a partially failed
`pacman -Sy`, surfaced as a generic failure with no explanation. Keep the last
error, tell the user which lock is involved and how to recover, and stop
treating a sync error as success.

🤖 Generated with Codebuff
Co-Authored-By: Codebuff <noreply@codebuff.com>
2026-09-11 20:12:43 +02:00
BlackAngelTV 3fa306c815 perf(search): mark results as installed via a single pacman -Q call
tests / build-test (push) Has been cancelled
Search previously ran one 'pacman -Qi <name>' subprocess per result,
making queries with many matches (e.g. 'discord') take minutes. It now
loads the installed package names once into an in-memory set and uses
that set for the installed lookup.
2026-09-09 20:01:25 +02:00
BlackAngelTV ad31e5c597 fix(crashes): stop destroying QThread workers while still running
Deleting SearchWorker/ListWorker/InstallWorker from the `finished` ->
`deleteLater` connection aborted the app with
"QThread: Destroyed while thread is still running" (SIGABRT) whenever a
list loaded or a package op finished. The deferred delete raced the
thread teardown because these workers have no event loop to process it
after run() returns.

Wait for the thread to complete (wait() clears the running flag, and by
then run() already emitted finished) before scheduling deleteLater, and
bind every cross-thread signal to the MainWindow context object so the
handlers run queued on the GUI thread instead of inside the worker.

Also drop the intrusive popups (removal confirmation, pacman/sudo
unavailable, empty-search notice) in favour of status bar messages, and
let sudo take the password via -S so no per-op polkit dialog is shown.

Generated with Codebuff 🤖
Co-Authored-By: Codebuff <noreply@codebuff.com>
2026-08-28 15:13:15 +02:00
BlackAngelTV f525d52ab2 feat(pacman): report install origin and size for installed packages
listInstalled only returned name and version, leaving the size and the
origin repository empty for installed packages. Enrich each entry with
its installed size (parsed from pacman -Qi) and the repository it was
installed from (parsed from pacman -Sl), defaulting foreign/AUR
packages to "AUR" so the origin is always visible.

🤖 Generated with Codebuff
Co-Authored-By: Codebuff <noreply@codebuff.com>
2026-08-27 21:45:38 +02:00
BlackAngelTV e538ed619e test: add unit tests for pacman manager parsing
Cover the pacman -Q output parser: simple lines, hyphenated names,
empty lines and empty input.

Generated with Codebuff 🤖
Co-Authored-By: Codebuff <noreply@codebuff.com>
2026-08-27 19:29:35 +02:00