Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The goal is to improve the current code related to Arch Linux and its derivatives. The code was tested on EndeavourOS.
Firstly, the PKGBUILD file is changed so it corresponds to the suggested layout described in the Arch Linux wiki. The layout and install process matches now the packaging guidelines (https://wiki.archlinux.org/title/PKGBUILD). The checksum parameter is now implemented in the PKGBUILD file. Please consider providing a real checksum for each release instead of skipping the checksum.
Furthermore, the pacman package handling code is now capable of not reinstalling packages if they are already installed.
Pacman also removes unused dependencies when uninstalling a package. This cleans up unused packages.
The package install detection for pacman was also rewritten because the old implementation had limitations with different repositories. The old implementation only filters for specific repositories and excludes custom repos, while the new code respects them.
Moreover, the current check update implementation for the security check is not recommended by Arch Linux because partial upgrades are not supported on a rolling distro. It can brick the system (https://wiki.archlinux.org/title/System_maintenance#Avoid_certain_pacman_commands). Instead a save way of checking updates is added to the code base, which will not touch the pacman system databases.