ad31e5c59726662b689ab901ef2d9b7416c5a0cc
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>
PacManager 📦
Package manager for Arch Linux based on pacman, with a Qt6 graphical interface.
Features
- 🔍 Package search
- 📦 Package installation
- 🗑️ Package removal
- 🔄 Individual or global updates
- 📋 History of all actions
Architecture
package-manager/
├── CMakeLists.txt # Build root
├── include/
│ ├── package-manager.h # Package manager interface
│ ├── pacman-manager.h # pacman manager (Arch Linux)
│ ├── main-window.h # Main GUI
│ ├── history-manager.h # Action history
│ └── package-model.h # Qt model for the list
├── src/
│ ├── main.cpp
│ ├── main-window.cpp
│ ├── pacman-manager.cpp
│ ├── history-manager.cpp
│ └── package-model.cpp
Compilation (Arch Linux)
Dependencies
sudo pacman -S qt6-base cmake gcc base-devel
Build
cd package-manager
# Create the build directory
mkdir -p build && cd build
# Configure
cmake .. -DCMAKE_INSTALL_PREFIX=/usr
# Compile
make -j$(nproc)
# Install (optional)
sudo make install
Run
# From the build directory
./PacManager
# Or from /usr/bin after install
PacManager
Graphical interface
The interface uses Qt6 with a dark theme, a navigation sidebar and stacked pages:
- 🏠 Dashboard: statistics cards, quick actions and recent activity
- 🔍 Search: search bar, package table on the left and details on the right
- 📦 Installed: list with instant name filter (local, no pacman re-run)
- ⬆️ Updates: outdated packages detected by
pacman -Qu, "Update all" button - 📋 History: filterable table (installs / removals / updates)
- 📜 Logs: built-in
/var/log/pacman.logviewer
Interface overview
┌──────────────────────────────────────────────────────────────────────────────────────┐
│ File Tools Help │
├───────────────┬──────────────────────────────────────────────────────────────────────┤
│ 📦 PacManager │ Search │
│ │ Find and install packages │
│ 🏠 Dashboard │ ┌──────────────────────────────────────────────────┐ ┌────────────┐ │
│ 🔍 Search │ │ 🔍 Search for a package (e.g. firefox)... │ │ Search │ │
│ 📦 Installed │ └──────────────────────────────────────────────────┘ └────────────┘ │
│ ⬆️ Updates │ [+ Install] [- Remove] [^ Update] [^^ Update all] │
│ 📋 History │ ┌ Name │ Version │ Repo │ Status ┐ ┌────────────────────┐ │
│ 📜 Logs │ │ firefox │ 128.0 │ extra │ ✅ Installed │ │ firefox │ │
│ │ │ vlc │ 3.0.21 │ extra │ ✅ Installed │ │ Version: 128.0 │ │
│ │ │ ... │ │ │ │ │ [extra] [289 MB] │ │
│ │ └────────────────────────────────────────────┘ ├────────────────────┤ │
│ 🔄 Refresh │ │ Fast and secure │ │
├───────────────┴──────────────────────────────────────────────────────────────────────┤
│ pacman 1.0.0 | Packages shown: 6 | History entries: 12 │
└──────────────────────────────────────────────────────────────────────────────────────┘
Package manager
The IPackageManager interface (implemented by PacmanManager) defines:
| Method | Description |
|---|---|
getName() |
Manager name |
getVersion() |
Manager version |
getDescription() |
Description |
canSearch() |
Supports search |
canInstall() |
Supports installation |
canRemove() |
Supports removal |
canUpdate() |
Supports updates |
canListInstalled() |
Supports listing installed packages |
isAvailable() |
Checks whether pacman is installed |
search(query) |
Search for packages |
install(name, callback) |
Installation |
remove(name, callback) |
Removal |
update(name, callback) |
Update |
listInstalled() |
List installed packages |
listUpdates() |
List outdated packages |
refresh(callback) |
Refresh the databases |
License
Coming soon