From 63e60fc2568d9fabbd6b80dfe82ec611295163b0 Mon Sep 17 00:00:00 2001 From: kewl fft Date: Sun, 12 Apr 2020 19:40:51 -0400 Subject: [PATCH] add comments for ignore_arch --- README.md | 3 ++- library/aur.py | 22 +++++++++++----------- 2 files changed, 13 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index 9e23d86..c72cce2 100644 --- a/README.md +++ b/README.md @@ -18,8 +18,9 @@ The following helpers are supported and automatically selected, if present, in t |upgrade |no |no |yes, no |Whether or not to upgrade whole system.| |use |no |auto |auto, yay, aurman, pacaur, trizen, pikaur, makepkg |The helper to use, 'auto' uses the first known helper found and makepkg as a fallback.| |skip_installed |no |no |yes, no |Skip operations if the package is present.| -|skip_pgp_check |no |no |yes, no |Skip verification of PGP signatures. This is useful when installing packages on a host without GnuPG (properly) configured. Only valid with makepkg.| |aur_only |no |no |yes, no |Limit operation to the AUR. Compatible with yay, aurman, pacaur and trizen.| +|skip_pgp_check |no |no |yes, no |Only valid with makepkg. Skip PGP signatures verification of source file, useful when installing packages on a host without GnuPG properly configured.| +|ignore_arch |no |no |yes, no |Only valid with makepkg. Ignore a missing or incomplete arch field, useful when the PKGBUILD does no have the arch=('yourarch') field.| ### Note * Either *name* or *upgrade* is required, both cannot be used together. diff --git a/library/aur.py b/library/aur.py index fb114c1..0dd9f04 100644 --- a/library/aur.py +++ b/library/aur.py @@ -25,13 +25,6 @@ options: description: - Name or list of names of the package(s) to install or upgrade. - ignore_arch: - description: - - Set to yes to skip architecture check. - Only valid with makepkg. - type: bool - default: no - upgrade: description: - Whether or not to upgrade whole system. @@ -52,9 +45,16 @@ options: skip_pgp_check: description: - - Skip verification of PGP signatures. + - Only valid with makepkg. + Skip PGP signatures verification of source file. This is useful when installing packages on a host without GnuPG (properly) configured. - Only valid with makepkg. + type: bool + default: no + + ignore_arch: + description: + - Only valid with makepkg. + Ignore a missing or incomplete arch field, useful when the PKGBUILD does no have the arch=('yourarch') field. type: bool default: no @@ -153,7 +153,7 @@ def install_with_makepkg(module, package): if module.params['skip_pgp_check']: use_cmd['makepkg'].append('--skippgpcheck') if module.params['ignore_arch']: - use_cmd['makepkg'].append('-A') + use_cmd['makepkg'].append('--ignorearch') rc, out, err = module.run_command(use_cmd['makepkg'], check_rc=True) os.chdir(current_path) return (rc, out, err) @@ -210,7 +210,7 @@ def main(): 'name': { 'type': 'list', }, - 'ignore_arch' : { + 'ignore_arch': { 'default': False, 'type': 'bool', },