Add pamac support

pull/43/head
Jeroen Schepens 2020-08-16 17:48:02 +02:00
parent 5aebeda3d4
commit 354d13642e
2 changed files with 15 additions and 12 deletions

View File

@ -6,22 +6,24 @@ The following helpers are supported and automatically selected, if present, in t
- [pacaur](https://github.com/E5ten/pacaur) - [pacaur](https://github.com/E5ten/pacaur)
- [trizen](https://github.com/trizen/trizen) - [trizen](https://github.com/trizen/trizen)
- [pikaur](https://github.com/actionless/pikaur) - [pikaur](https://github.com/actionless/pikaur)
- [pamac](https://gitlab.manjaro.org/applications/pamac)
- [aurman](https://github.com/polygamma/aurman) (discontinued) - [aurman](https://github.com/polygamma/aurman) (discontinued)
*makepkg* will be used if no helper was found or if it is explicitly specified: *makepkg* will be used if no helper was found or if it is explicitly specified:
- [makepkg](https://wiki.archlinux.org/index.php/makepkg) - [makepkg](https://wiki.archlinux.org/index.php/makepkg)
## Options ## Options
|Parameter |Choices/**Default** |Comments| |Parameter |Choices/**Default** |Comments|
|--- |--- |---| |--- |--- |---|
|name | |Name or list of names of the package(s) to install or upgrade.| |name | |Name or list of names of the package(s) to install or upgrade.|
|state |**present**, latest |Desired state of the package, 'present' skips operations if the package is already installed.| |state |**present**, latest |Desired state of the package, 'present' skips operations if the package is already installed.|
|upgrade |yes, **no** |Whether or not to upgrade whole system.| |upgrade |yes, **no** |Whether or not to upgrade whole system.|
|use |**auto**, yay, pacaur, trizen, pikaur, aurman, makepkg |The tool to use, 'auto' uses the first known helper found and makepkg as a fallback.| |use |**auto**, yay, pacaur, trizen, pikaur, pamac, aurman, makepkg |The tool to use, 'auto' uses the first known helper found and makepkg as a fallback.|
|extra_args |**null** |A list of additional arguments to pass directly to the tool. Cannot be used in 'auto' mode.| |extra_args |**null** |A list of additional arguments to pass directly to the tool. Cannot be used in 'auto' mode.|
|aur_only |yes, **no** |Limit helper operation to the AUR.| |aur_only |yes, **no** |Limit helper operation to the AUR.|
|skip_pgp_check |yes, **no** |Only valid with makepkg. Skip PGP signatures verification of source file, useful when installing packages without GnuPG properly configured.| |skip_pgp_check |yes, **no** |Only valid with makepkg. Skip PGP signatures verification of source file, useful when installing packages without GnuPG properly configured.|
|ignore_arch |yes, **no** |Only valid with makepkg. Ignore a missing or incomplete arch field, useful when the PKGBUILD does not have the arch=('yourarch') field.| |ignore_arch |yes, **no** |Only valid with makepkg. Ignore a missing or incomplete arch field, useful when the PKGBUILD does not have the arch=('yourarch') field.|
### Note ### Note
* Either *name* or *upgrade* is required, both cannot be used together. * Either *name* or *upgrade* is required, both cannot be used together.

View File

@ -42,7 +42,7 @@ options:
description: description:
- The tool to use, 'auto' uses the first known helper found and makepkg as a fallback. - The tool to use, 'auto' uses the first known helper found and makepkg as a fallback.
default: auto default: auto
choices: [ auto, yay, pacaur, trizen, pikaur, aurman, makepkg ] choices: [ auto, yay, pacaur, trizen, pikaur, pamac, aurman, makepkg ]
extra_args: extra_args:
description: description:
@ -98,11 +98,12 @@ use_cmd = {
'pacaur': ['pacaur', '-S', '--noconfirm', '--noedit', '--needed'], 'pacaur': ['pacaur', '-S', '--noconfirm', '--noedit', '--needed'],
'trizen': ['trizen', '-S', '--noconfirm', '--noedit', '--needed'], 'trizen': ['trizen', '-S', '--noconfirm', '--noedit', '--needed'],
'pikaur': ['pikaur', '-S', '--noconfirm', '--noedit', '--needed'], 'pikaur': ['pikaur', '-S', '--noconfirm', '--noedit', '--needed'],
'pamac': ['pamac', 'install', '--no-confirm'],
'aurman': ['aurman', '-S', '--noconfirm', '--noedit', '--needed', '--skip_news', '--pgp_fetch', '--skip_new_locations'], 'aurman': ['aurman', '-S', '--noconfirm', '--noedit', '--needed', '--skip_news', '--pgp_fetch', '--skip_new_locations'],
'makepkg': ['makepkg', '--syncdeps', '--install', '--noconfirm', '--needed'] 'makepkg': ['makepkg', '--syncdeps', '--install', '--noconfirm', '--needed']
} }
has_aur_option = ['yay', 'pacaur', 'trizen', 'pikaur', 'aurman'] has_aur_option = ['yay', 'pacaur', 'trizen', 'pikaur', 'pamac', 'aurman']
def package_installed(module, package): def package_installed(module, package):