- Python 96%
- Shell 4%
| data | ||
| manjaro_simple_update | ||
| tests | ||
| .gitignore | ||
| AGENTS.md | ||
| pyproject.toml | ||
| README.md | ||
| uv.lock | ||
This project has been archived.
Please see [https://code.manjaro.org/linux-aarhus/kiss-up] for the final implementation
Manjaro Simple Update
This is an example of a Python GUI application that checks and installs Manjaro Linux repository updates.
A Python GUI for checking and installing Manjaro Linux repository updates. It uses GTK 3 on GNOME, Xfce, Cinnamon, and MATE, and PySide6 / Qt on other desktops (including KDE Plasma and LXQt). Automatic mode falls back to the other toolkit if the preferred Python bindings are unavailable.
DISCLAIMER This is a proof-of-concept example. It is not intended for production use. It is generated using PyCharm and JetBrains Junie AI under supervision by Frede Hundewadt.
The following prompt was used in conjunction with the AGENTS.md file
## Target
- Manjaro Linux
## Objective
- Create a Python GUI app
- Use either GTK or Qt toolkit (Pyside6) depending on the toolkit for active desktop
- Qt is the preferred toolkit, using GTK as fallback for systems without Qt
- Update Manjaro Linux system
- Only update from official repositories
- flatpak, AUR, development and other custom packages are outside the scope
- Use the `checkupdates` script from `pacman-contrib` package to check for updates
- Display the result and allow the user to select if the updates should be installed
- Allow the user to execute a dry-run using pamac's `--dry-run` option
- Use the native console package manager `pamac` to install updates
## pamac git repositories
If you need doucmentation, use git to clone the relevant repositories and examine the code
- [checkupdates](https://gitlab.archlinux.org/pacman/pacman-contrib.git)
- [pamac](https://github.com/manjaro/pamac.git)
- [pamac-cli](https://github.com/manjaro/pamac-cli.git)
- [libpamac](https://github.com/manjaro/libpamac.git)
Requirements
Use the system Python (3.10+) and Manjaro packages:
pacman-contribsuppliescheckupdates.pamac-clisupplies the consolepamaccommand.- Qt desktops:
pyside6. - GTK desktops:
python-gobjectandgtk3. - One terminal:
konsole,gnome-terminal,xfce4-terminal, orxterm. - A working Manjaro desktop session and network connection.
Install missing dependencies using Manjaro's package manager. Install both sets of GUI bindings if this machine runs both kinds of desktop sessions. System-provided GUI bindings are intentionally not pip dependencies.
Run from this directory
python3 -m manjaro_simple_update
python3 -m manjaro_simple_update --toolkit qt
python3 -m manjaro_simple_update --toolkit gtk
The app checks automatically on launch. Use Check for updates to refresh, then Install updates to open pamac in a terminal. Review its proposed transaction and answer its prompts, including authentication. Keep the terminal open while it works. When pamac finishes, press Enter to return to the GUI; a successful exit triggers a fresh update check.
Run as your normal desktop user. The application does not use sudo, collect passwords, or bypass pamac confirmation. Its window stays open and both action buttons are disabled during an operation. A per-user lock prevents duplicate application instances. Other package managers still rely on pamac's locking.
Optional installation
To expose the command without modifying the distribution-managed Python, create a virtual environment with access to the system GUI bindings:
python3 -m venv --system-site-packages ~/.local/share/manjaro-simple-update/venv
~/.local/share/manjaro-simple-update/venv/bin/python -m pip install .
mkdir -p ~/.local/bin ~/.local/share/applications
ln -sf ~/.local/share/manjaro-simple-update/venv/bin/manjaro-simple-update ~/.local/bin/manjaro-simple-update
cp data/manjaro-simple-update.desktop ~/.local/share/applications/
Ensure ~/.local/bin is in your desktop session's PATH. Alternatively, set the
copied desktop entry's Exec to the absolute executable path in the venv.
Update behavior
checkupdates --nocolorrefreshes an isolated temporary database, not the live system database. Exit status 2 means no updates; failures are shown with details. Checks time out after three minutes.- The table lists package names, installed versions and available versions.
- Installation runs
pamac upgrade --no-aur, keeping pamac's normal interactive confirmation and authentication. It upgrades the system as a whole; the table is a preview, and pamac's refreshed transaction is authoritative. - AUR, Flatpak and Snap updates are not listed or managed by this application. Packages ignored by the package manager remain subject to its configuration.
- The terminal helper reports pamac's exit code, rather than treating a terminal launch as success. An interrupted terminal or failed transaction requires a fresh check before retrying. A successful pamac exit is followed by a check, since a declined transaction may also exit successfully.
The pamac command and authentication flow were verified against the source
of Manjaro pamac-cli, and check semantics
against the installed pacman-contrib script.
Development checks
PYTHONDONTWRITEBYTECODE=1 python3 -m unittest discover -s tests -v
Tests use fake package-manager programs and never update the host system.
GUI smoke tests need the installed bindings; the Qt frontend can be exercised
with QT_QPA_PLATFORM=offscreen. GTK requires a display or Xvfb.