The release moved every source into its own layer (core/, app/, pages/,
providers/, preferences/, logging/, archive/, update/, translations/) and
replaced the plugin shop with .fwspacm packages. main added the headless update
check run at login. Both sides are kept, the feature moved onto the new layout:
- core/startup-check.{h,cpp} and its test, wired into the CMake targets the
release renamed (core/startup-check.cpp, startup-check-test);
- app/main.cpp carries the --check-updates branch, ahead of the command line so
the login unit never opens a window;
- the settings menu keeps the "check at startup" toggle, now through tr(), and
translations/en.json gains the new strings;
- doc/mise-a-jour.md keeps the release's version and gains the startup-check
section; the documented test count follows the new target.
Le mode headless --check-updates (QT Core uniquement) synchro checkupdates
sans root, classe les paquets critiques (noyau, glibc, systemd, graphics),
envoie une notif urgente via notify-send quand c'est nécessaire, et installe
soi-même son service systemd --user (paramètre actif par défaut) pour
lancer la vérification à chaque ouverture de session. Ajout de tests
d'unité et de doc.
Co-Authored-By: Codebuff <noreply@codebuff.com>
The window needs a display, which kept the package manager out of a script and
off a headless machine. The command line runs the same operations through
AppCore, before any widget exists, so providers, the pacman lock, the journal
and the history behave exactly as in the window.
Refs #22.
The language setting was plumbing with nothing behind it: no catalogue
shipped, and every label was a bare QStringLiteral, so picking English
changed nothing.
A catalogue is now a JSON file read as it is, translations/<code>.json,
keyed by the French source string. No Linguist, no lrelease, no build
step: a new language costs one file. The catalogues the application
ships with are compiled into the binary, so the chosen language works
whatever the install layout is, while one dropped into a translations
folder still wins over it.
"System" reads what the FWS install left behind — LC_ALL, LC_MESSAGES,
LANG, then the LANG= line of /etc/locale.conf — so the interface follows
the language chosen at install time without the user configuring anything.
Fixes#16
The shop was a catalogue served over HTTP that the application fetched and
listed, which put a network round trip between a user and a plugin that was
almost always one file they already had. It also had to keep its catalogue
URLs in step with every release, since an entry that pointed at a missing
asset was indistinguishable from one that never worked.
A plugin is now distributed as a .fwspacm package: a ZIP archive holding a
plugin.json manifest and the shared library, which the user drops anywhere
on the window. The file is the distribution, so there is no catalogue to
publish, no network, and no catalogue URL setting to explain. The manifest
tells the user what they are about to run, and its checksum is verified
before anything is written, so a package whose library is not the one it
declares never reaches the plugin directory.
Qt exposes no public ZIP API, so the archive is read directly (central
directory plus zlib for the deflated entries) rather than through a private
header that could move between toolchains. The reader stays in the logic
layer: app-core-test still links no QtWidgets, and a unit test builds its
own archives to check both compression methods and every refusal path.
The preferences used to be spread across a menu entry and hardcoded paths,
so the user could not see them, let alone change them: where the journal
goes, whether a dropped Flatpak file is accepted, and when the app checks
its own version were all decided in code.
They now live in AppSettings, one model the rest of the app already reads,
and the new Settings screen only writes to it. Nothing keeps a second copy
of a value, so a change is visible everywhere at once — switching directory
moves the journal, unchecking drag & drop makes the window refuse the drop,
blocking the update has the manual check say why instead of silently doing
nothing.
The update block is deliberately limited to PacManager itself: blocking a
system package update is a decision the app has no business making.
The language setting installs a Qt catalogue and asks every widget to
retranslate. The interface is still written in French with QStringLiteral,
so no catalogue ships yet; a language with none is shown in the list but
disabled rather than silently doing nothing, and Qt Linguist stays optional
so the build does not depend on it.
The cleanup page grouped its packages by provider but never handed those
providers to the credential gate, which saw an empty list, concluded
nothing was privileged and let the request through: pacman was then
driven with an empty password. It only worked by accident, while sudo's
timestamp was still valid.
Every privileged path now goes through the same door, which the new test
walks one by one — including the two ways of acting on a single copy of a
multi-installed package — and asserts the request is refused, kept
pending for the prompt, and refused again on replay. Nothing is ever
replayed, so no test can run pacman as root.
The same application can be present twice — in the user installation
and system-wide, or from two remotes or two branches — and flatpak then
refuses to act on the application id alone: "Multiple installed refs
match 'com.hoptodesk.HopToDesk'". Removing either copy was impossible
from the app.
A row now stands for the application and carries the copies it is made
of, so the details panel lists them and Remove opens one checkbox per
copy; the provider gets back the exact target it listed, and naming a
ref plus its installation is what makes the call unambiguous. Update
gains the same resolution, since it hit the very same refusal, and
removing one copy of two no longer takes the other one's launcher entry
away with it.
The listing that feeds it now asks flatpak for the ref, the branch and
the installation, and reads those columns by position: a branch
installed from a subdirectory has no version, and dropping that empty
column shifted every field after it.
Installing a .flatpakref looked frozen: flatpak prints two lines and
then stays silent for the minutes a runtime takes to come down, so the
window repeated the same sentence over a stalled bar and the journal
recorded nothing at all.
It has no meter to print — measured here, on a real 658 MB install, it
draws nothing on a pipe nor on a full terminal, only on the deltas the
CDN happens to serve — so the provider now measures the transfer itself:
the bytes landing in flatpak's own staging directory, reported as they
grow. When even those stop, the window takes over and says which step is
running and for how long, in the status bar and in the journal.
Along the way the runner reads with read() instead of stdio so in-place
updates are not held back by a buffer, strips the ANSI escapes some
tools colour their output with (the AUR plugin's own copy is gone), and
turns a rewritten meter line into a journal entry every 10 %.
Dragging a .flatpakref, .flatpakrepo or .flatpak onto the window, or
opening it with the file manager, has to reach flatpak without the user
going through a search. The provider now owns its formats: it claims the
files it handles and builds the matching command, and the core routes the
request to whichever provider recognises it, so a new provider can claim
its own formats the same way.
🤖 Generated with Codebuff
Co-Authored-By: Codebuff <noreply@codebuff.com>
A minimal Arch system has no cmake, no compiler and no qt6-base, so the
self-update used to fail or fall back to the releases page. The update
now asks pacman what is missing, installs it through sudo with the
password typed in the update dialog, then resumes the build.
🤖 Generated with Codebuff
Co-Authored-By: Codebuff <noreply@codebuff.com>
Installing a plugin meant compiling a shared library and dropping it in a
directory by hand. The shop reads a catalogue (plugins/catalog.json, one
entry per plugin with its description and download URL), lists what can be
installed next to what already is, and installs an entry into
~/.local/share/PacManager/plugins — the directory the registry already
scans — so a plugin becomes usable without root rights and without a
restart. Installing runs third-party code in this process, so the shop only
fetches what the user picked, checks the announced sha256 before writing
anything, and a removal deletes only the files the shop wrote itself.
🤖 Generated with Codebuff
Co-Authored-By: Codebuff <noreply@codebuff.com>
pacman restarts its "(1/24)" counter at every phase of a transaction, so the
bar was fed 0 percent, 100 percent, 0 percent again a few times per update —
and Flatpak/AUR buffered their whole output, which left it indeterminate for
the entire run. A shared ProgressTracker now folds every counter, file
percentage and package step into one value that only moves forward, the
providers stream their output as it is produced, and each provider owns a
slice of the bar so a multi-provider update keeps advancing. pacman -Qu is
cached like the other read queries, so the sidebar badge, the updates screen
and the update button share a single process.
🤖 Generated with Codebuff
Co-Authored-By: Codebuff <noreply@codebuff.com>
All the business logic now lives in AppCore (providers, workers,
history, plugins, sudo and pacman-lock handling), freed from any widget
so it runs headless and is testable on its own. The Qt window becomes a
thin frame around one file per screen under pages/, wired through a
common Page contract and a shared ui-kit. CMake gains the app-core-test
target, which links Qt Core only to enforce the headless guarantee.
🤖 Generated with Codebuff
Co-Authored-By: Codebuff <noreply@codebuff.com>
Trusting the version compiled into the binary alone made the app report a stale
release whenever the build predated a version bump: `version` is read at
configure time, and bumping it is not by itself a reason to configure again, so
`cmake --build` kept the previous number compiled in while the marker it
installed next to the binary said otherwise. The update was then offered again
even though it had just been applied.
The version file is now a configure dependency, so a bump reconfigures the
build, and the reported version is the newest of the two sources, so neither
side can drag the app backwards.
Generated with Codebuff 🤖
Co-Authored-By: Codebuff <noreply@codebuff.com>
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>
The checkout path installed with the build's configured prefix instead of
installing into the directory holding the running copy, so the binary in use
and its version marker both stayed at the old release: the app kept reporting
that version and offered the same update again at every launch.
Every method now stages and installs into the running binary's directory, the
install step writes the release it just installed next to the binary, and
currentVersion() reads the version compiled into the running build first,
falling back to the marker file. The repo-root `version` file stays the single
source of truth: CMake compiles it in.
Generated with Codebuff 🤖
Co-Authored-By: Codebuff <noreply@codebuff.com>
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>
Copying over the executable the update is running from fails with ETXTBSY, so
the self-update aborted after a successful build and left the user to restart
by hand. Installing through a rename, then handing over to the new build, lets
the update complete on its own.
🤖 Generated with Codebuff
Co-Authored-By: Codebuff <noreply@codebuff.com>
Self-update assumed a conventional install prefix (silently reinstalling into
~/.local when the binary lived elsewhere) and needed a release tarball to do
anything. Pick the strategy from what the machine actually has -- a local
checkout, git+cmake+compiler for a clone, the prebuilt archive, or the release
sources -- and always write the fresh binary next to the running one, building
in a temp directory so sudo is only needed for the final copy.
Bundles the UI work that depends on it (tray, shortcuts, log filter, CSV
exports, cached package details), the structured log categories, and the new
test targets (update-manager, AUR, plugins) wired into CTest.
🤖 Generated with Codebuff
Co-Authored-By: Codebuff <noreply@codebuff.com>
Community packages were invisible unless the user ran yay/paru by hand. Wrap
the helper behind the provider interface, like the Flatpak plugin, so AUR
results join search, installed and updates while staying optional.
🤖 Generated with Codebuff
Co-Authored-By: Codebuff <noreply@codebuff.com>
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>
The Plugins page replaces the Providers tab and lists every plugin alike:
package-manager providers and generic C++ addons, which can be any extension
(UI tweak, helper, ...) via IPlugin (onLoad/onUnload/onUiReady) exported with
the new FWS_ADDON_PLUGIN macro. Flatpak now ships as a plugin built by
default (FWS_BUILD_FLATPAK_PLUGIN=ON), so a plain build is Flatpak-enabled.
Generated with Codebuff 🤖
Co-Authored-By: Codebuff <noreply@codebuff.com>
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.
Rewires the flatpak unit, integration and plugin-manager tests to compile
against plugins/flatpak-provider, and updates plugin-manager.test to treat
flatpak as a runtime-loaded plugin rather than a registered built-in.
Generated with Codebuff 🤖
Co-Authored-By: Codebuff <noreply@codebuff.com>
Extend the live-CLI integration test to assert that installing an app links
its .desktop entry into ~/.local/share/applications, and that uninstalling
cleans the link back up.
🤖 Generated with Codebuff
Co-Authored-By: Codebuff <noreply@codebuff.com>
Drives the real FlatpakManager against the live flatpak CLI: install a small
app through the provider's own fallback logic, verify it is listed and
flagged as installed in search, run update and refresh, then uninstall. The
test is non-destructive for pre-existing installs and skips when flatpak is
absent.
🤖 Generated with Codebuff
Co-Authored-By: Codebuff <noreply@codebuff.com>
Group aggregated search results per provider (in query order, pacman
first) and sort each group alphabetically, case-insensitively.
🤖 Generated with Codebuff
Co-Authored-By: Codebuff <noreply@codebuff.com>
When the same package name comes from several providers (pacman, flatpak,
plugins), collapse the rows into one: the Fournisseur column lists every
provider offering it and installed/updateAvailable are combined, while
the first provider stays the routing default. Applies to search and to
the aggregated installed/updates lists.
🤖 Generated with Codebuff
Co-Authored-By: Codebuff <noreply@codebuff.com>
Unit-test the flatpak parsers (search rows, installed/update columns)
and the plugin manager end-to-end: built-in registration, runtime
discovery of the sample plugin, enable/disable persistence, reload and
install-hint exposure.
🤖 Generated with Codebuff
Co-Authored-By: Codebuff <noreply@codebuff.com>
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>
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>