diff --git a/galaxy.yml b/galaxy.yml index d59b146..f876f6e 100644 --- a/galaxy.yml +++ b/galaxy.yml @@ -8,7 +8,7 @@ namespace: kewlfft name: aur # The version of the collection. Must be compatible with semantic versioning -version: 0.13.0 +version: 0.13.1 # The path to the Markdown (.md) readme file. This path is relative to the root of the collection readme: README.md diff --git a/job_logs.txt b/job_logs.txt new file mode 100644 index 0000000..134c17a --- /dev/null +++ b/job_logs.txt @@ -0,0 +1,208 @@ +2026-01-25T11:51:59.2312007Z Current runner version: '2.331.0' +2026-01-25T11:51:59.2335038Z ##[group]Runner Image Provisioner +2026-01-25T11:51:59.2335937Z Hosted Compute Agent +2026-01-25T11:51:59.2336578Z Version: 20260115.477 +2026-01-25T11:51:59.2337506Z Commit: 4b342d620503cbe250a3154040964899ea7c9b00 +2026-01-25T11:51:59.2338401Z Build Date: 2026-01-15T22:32:41Z +2026-01-25T11:51:59.2339122Z Worker ID: {ba2bc1f5-dbe1-49cb-9eee-351f90f656ad} +2026-01-25T11:51:59.2339809Z Azure Region: westcentralus +2026-01-25T11:51:59.2340465Z ##[endgroup] +2026-01-25T11:51:59.2341840Z ##[group]Operating System +2026-01-25T11:51:59.2342461Z Ubuntu +2026-01-25T11:51:59.2343002Z 24.04.3 +2026-01-25T11:51:59.2343427Z LTS +2026-01-25T11:51:59.2343873Z ##[endgroup] +2026-01-25T11:51:59.2344370Z ##[group]Runner Image +2026-01-25T11:51:59.2344963Z Image: ubuntu-24.04 +2026-01-25T11:51:59.2345496Z Version: 20260119.4.1 +2026-01-25T11:51:59.2346670Z Included Software: https://github.com/actions/runner-images/blob/ubuntu24/20260119.4/images/ubuntu/Ubuntu2404-Readme.md +2026-01-25T11:51:59.2348209Z Image Release: https://github.com/actions/runner-images/releases/tag/ubuntu24%2F20260119.4 +2026-01-25T11:51:59.2349142Z ##[endgroup] +2026-01-25T11:51:59.2351841Z ##[group]GITHUB_TOKEN Permissions +2026-01-25T11:51:59.2353779Z Actions: write +2026-01-25T11:51:59.2354368Z ArtifactMetadata: write +2026-01-25T11:51:59.2354922Z Attestations: write +2026-01-25T11:51:59.2355439Z Checks: write +2026-01-25T11:51:59.2355963Z Contents: write +2026-01-25T11:51:59.2356481Z Deployments: write +2026-01-25T11:51:59.2357185Z Discussions: write +2026-01-25T11:51:59.2357726Z Issues: write +2026-01-25T11:51:59.2358172Z Metadata: read +2026-01-25T11:51:59.2358789Z Models: read +2026-01-25T11:51:59.2359281Z Packages: write +2026-01-25T11:51:59.2359760Z Pages: write +2026-01-25T11:51:59.2360378Z PullRequests: write +2026-01-25T11:51:59.2360960Z RepositoryProjects: write +2026-01-25T11:51:59.2361481Z SecurityEvents: write +2026-01-25T11:51:59.2362062Z Statuses: write +2026-01-25T11:51:59.2362574Z ##[endgroup] +2026-01-25T11:51:59.2364561Z Secret source: Actions +2026-01-25T11:51:59.2365315Z Prepare workflow directory +2026-01-25T11:51:59.2761179Z Prepare all required actions +2026-01-25T11:51:59.2798354Z Getting action download info +2026-01-25T11:51:59.6639934Z Download action repository 'actions/checkout@v5' (SHA:93cb6efe18208431cddfb8368fd83d5badbf9bfd) +2026-01-25T11:51:59.7495119Z Download action repository 'actions/upload-artifact@v4' (SHA:ea165f8d65b6e75b540449e92b4886f43607fa02) +2026-01-25T11:51:59.9548339Z Complete job name: release +2026-01-25T11:52:00.0260134Z ##[group]Run actions/checkout@v5 +2026-01-25T11:52:00.0261025Z with: +2026-01-25T11:52:00.0261537Z path: collections/ansible_collections/kewlfft/aur +2026-01-25T11:52:00.0262206Z repository: kewlfft/ansible-aur +2026-01-25T11:52:00.0262915Z token: *** +2026-01-25T11:52:00.0263332Z ssh-strict: true +2026-01-25T11:52:00.0263769Z ssh-user: git +2026-01-25T11:52:00.0264211Z persist-credentials: true +2026-01-25T11:52:00.0264701Z clean: true +2026-01-25T11:52:00.0265167Z sparse-checkout-cone-mode: true +2026-01-25T11:52:00.0265696Z fetch-depth: 1 +2026-01-25T11:52:00.0266134Z fetch-tags: false +2026-01-25T11:52:00.0266586Z show-progress: true +2026-01-25T11:52:00.0267218Z lfs: false +2026-01-25T11:52:00.0267652Z submodules: false +2026-01-25T11:52:00.0268095Z set-safe-directory: true +2026-01-25T11:52:00.0268841Z ##[endgroup] +2026-01-25T11:52:00.1178184Z Syncing repository: kewlfft/ansible-aur +2026-01-25T11:52:00.1180072Z ##[group]Getting Git version info +2026-01-25T11:52:00.1181208Z Working directory is '/home/runner/work/ansible-aur/ansible-aur/collections/ansible_collections/kewlfft/aur' +2026-01-25T11:52:00.1182606Z [command]/usr/bin/git version +2026-01-25T11:52:00.1238206Z git version 2.52.0 +2026-01-25T11:52:00.1291141Z ##[endgroup] +2026-01-25T11:52:00.1304404Z Temporarily overriding HOME='/home/runner/work/_temp/6bf0fdf3-b91d-481e-bb88-bcedc22d7319' before making global git config changes +2026-01-25T11:52:00.1305961Z Adding repository directory to the temporary git global config as a safe directory +2026-01-25T11:52:00.1309068Z [command]/usr/bin/git config --global --add safe.directory /home/runner/work/ansible-aur/ansible-aur/collections/ansible_collections/kewlfft/aur +2026-01-25T11:52:00.1344664Z ##[group]Initializing the repository +2026-01-25T11:52:00.1350528Z [command]/usr/bin/git init /home/runner/work/ansible-aur/ansible-aur/collections/ansible_collections/kewlfft/aur +2026-01-25T11:52:00.1454957Z hint: Using 'master' as the name for the initial branch. This default branch name +2026-01-25T11:52:00.1456799Z hint: will change to "main" in Git 3.0. To configure the initial branch name +2026-01-25T11:52:00.1458851Z hint: to use in all of your new repositories, which will suppress this warning, +2026-01-25T11:52:00.1460178Z hint: call: +2026-01-25T11:52:00.1460847Z hint: +2026-01-25T11:52:00.1461532Z hint: git config --global init.defaultBranch +2026-01-25T11:52:00.1462175Z hint: +2026-01-25T11:52:00.1462773Z hint: Names commonly chosen instead of 'master' are 'main', 'trunk' and +2026-01-25T11:52:00.1463770Z hint: 'development'. The just-created branch can be renamed via this command: +2026-01-25T11:52:00.1464725Z hint: +2026-01-25T11:52:00.1465150Z hint: git branch -m +2026-01-25T11:52:00.1465782Z hint: +2026-01-25T11:52:00.1466780Z hint: Disable this message with "git config set advice.defaultBranchName false" +2026-01-25T11:52:00.1468459Z Initialized empty Git repository in /home/runner/work/ansible-aur/ansible-aur/collections/ansible_collections/kewlfft/aur/.git/ +2026-01-25T11:52:00.1471149Z [command]/usr/bin/git remote add origin https://github.com/kewlfft/ansible-aur +2026-01-25T11:52:00.1504789Z ##[endgroup] +2026-01-25T11:52:00.1505570Z ##[group]Disabling automatic garbage collection +2026-01-25T11:52:00.1508446Z [command]/usr/bin/git config --local gc.auto 0 +2026-01-25T11:52:00.1535537Z ##[endgroup] +2026-01-25T11:52:00.1536256Z ##[group]Setting up auth +2026-01-25T11:52:00.1541909Z [command]/usr/bin/git config --local --name-only --get-regexp core\.sshCommand +2026-01-25T11:52:00.1572635Z [command]/usr/bin/git submodule foreach --recursive sh -c "git config --local --name-only --get-regexp 'core\.sshCommand' && git config --local --unset-all 'core.sshCommand' || :" +2026-01-25T11:52:00.1889962Z [command]/usr/bin/git config --local --name-only --get-regexp http\.https\:\/\/github\.com\/\.extraheader +2026-01-25T11:52:00.1921424Z [command]/usr/bin/git submodule foreach --recursive sh -c "git config --local --name-only --get-regexp 'http\.https\:\/\/github\.com\/\.extraheader' && git config --local --unset-all 'http.https://github.com/.extraheader' || :" +2026-01-25T11:52:00.2147925Z [command]/usr/bin/git config --local --name-only --get-regexp ^includeIf\.gitdir: +2026-01-25T11:52:00.2179681Z [command]/usr/bin/git submodule foreach --recursive git config --local --show-origin --name-only --get-regexp remote.origin.url +2026-01-25T11:52:00.2397745Z [command]/usr/bin/git config --local http.https://github.com/.extraheader AUTHORIZATION: basic *** +2026-01-25T11:52:00.2432652Z ##[endgroup] +2026-01-25T11:52:00.2433497Z ##[group]Fetching the repository +2026-01-25T11:52:00.2441813Z [command]/usr/bin/git -c protocol.version=2 fetch --no-tags --prune --no-recurse-submodules --depth=1 origin +0b6069083d836a08e5aa544df2bf103d331f6b58:refs/remotes/origin/master +2026-01-25T11:52:00.6066418Z From https://github.com/kewlfft/ansible-aur +2026-01-25T11:52:00.6068228Z * [new ref] 0b6069083d836a08e5aa544df2bf103d331f6b58 -> origin/master +2026-01-25T11:52:00.6097715Z ##[endgroup] +2026-01-25T11:52:00.6099126Z ##[group]Determining the checkout info +2026-01-25T11:52:00.6100821Z ##[endgroup] +2026-01-25T11:52:00.6106240Z [command]/usr/bin/git sparse-checkout disable +2026-01-25T11:52:00.6146828Z [command]/usr/bin/git config --local --unset-all extensions.worktreeConfig +2026-01-25T11:52:00.6173289Z ##[group]Checking out the ref +2026-01-25T11:52:00.6176654Z [command]/usr/bin/git checkout --progress --force -B master refs/remotes/origin/master +2026-01-25T11:52:00.6228242Z Reset branch 'master' +2026-01-25T11:52:00.6231679Z branch 'master' set up to track 'origin/master'. +2026-01-25T11:52:00.6238134Z ##[endgroup] +2026-01-25T11:52:00.6273729Z [command]/usr/bin/git log -1 --format=%H +2026-01-25T11:52:00.6295521Z 0b6069083d836a08e5aa544df2bf103d331f6b58 +2026-01-25T11:52:00.6474442Z ##[group]Run echo "=== RUNNING UPDATED WORKFLOW ===" +2026-01-25T11:52:00.6475250Z echo "=== RUNNING UPDATED WORKFLOW ===" +2026-01-25T11:52:00.6510708Z shell: /usr/bin/bash -e {0} +2026-01-25T11:52:00.6511242Z ##[endgroup] +2026-01-25T11:52:00.6583147Z === RUNNING UPDATED WORKFLOW === +2026-01-25T11:52:00.6621847Z ##[group]Run tag_version="${GITHUB_REF##*/}" # e.g., v0.12.2 +2026-01-25T11:52:00.6622677Z tag_version="${GITHUB_REF##*/}" # e.g., v0.12.2 +2026-01-25T11:52:00.6623473Z tag_version="${tag_version#v}" # strip leading 'v' if present +2026-01-25T11:52:00.6624302Z file_version=$(awk '/^version:/ {print $2}' galaxy.yml) +2026-01-25T11:52:00.6624948Z  +2026-01-25T11:52:00.6625686Z if [ "${GITHUB_EVENT_NAME}" != "workflow_dispatch" ] && [ "$file_version" != "$tag_version" ]; then +2026-01-25T11:52:00.6626792Z  echo "❌ galaxy.yml version ($file_version) does not match tag ($tag_version)" +2026-01-25T11:52:00.6627883Z  exit 1 +2026-01-25T11:52:00.6628310Z fi +2026-01-25T11:52:00.6628791Z echo "✅ Version check passed: $file_version" +2026-01-25T11:52:00.6657866Z shell: /usr/bin/bash -e {0} +2026-01-25T11:52:00.6658371Z ##[endgroup] +2026-01-25T11:52:00.6730822Z ✅ Version check passed: 0.13.0 +2026-01-25T11:52:00.6765371Z ##[group]Run path=$(ansible-galaxy collection build | awk '/Created collection/ {print $NF}') +2026-01-25T11:52:00.6766570Z path=$(ansible-galaxy collection build | awk '/Created collection/ {print $NF}') +2026-01-25T11:52:00.6767681Z echo "TARBALL=$path" >> $GITHUB_ENV +2026-01-25T11:52:00.6768290Z echo "📦 Built collection at $path" +2026-01-25T11:52:00.6797326Z shell: /usr/bin/bash -e {0} +2026-01-25T11:52:00.6797860Z ##[endgroup] +2026-01-25T11:52:02.6902302Z 📦 Built collection at /home/runner/work/ansible-aur/ansible-aur/collections/ansible_collections/kewlfft/aur/kewlfft-aur-0.13.0.tar.gz +2026-01-25T11:52:02.6985036Z ##[group]Run actions/upload-artifact@v4 +2026-01-25T11:52:02.6985415Z with: +2026-01-25T11:52:02.6985652Z name: ansible-collection-tarball +2026-01-25T11:52:02.6986250Z path: /home/runner/work/ansible-aur/ansible-aur/collections/ansible_collections/kewlfft/aur/kewlfft-aur-0.13.0.tar.gz +2026-01-25T11:52:02.6986838Z if-no-files-found: warn +2026-01-25T11:52:02.6987424Z compression-level: 6 +2026-01-25T11:52:02.6987711Z overwrite: false +2026-01-25T11:52:02.6987951Z include-hidden-files: false +2026-01-25T11:52:02.6988215Z env: +2026-01-25T11:52:02.6988711Z TARBALL: /home/runner/work/ansible-aur/ansible-aur/collections/ansible_collections/kewlfft/aur/kewlfft-aur-0.13.0.tar.gz +2026-01-25T11:52:02.6989301Z ##[endgroup] +2026-01-25T11:52:02.9074644Z With the provided path, there will be 1 file uploaded +2026-01-25T11:52:02.9080973Z Artifact name is valid! +2026-01-25T11:52:02.9082368Z Root directory input is valid! +2026-01-25T11:52:03.1276949Z Beginning upload of artifact content to blob storage +2026-01-25T11:52:03.3927774Z Uploaded bytes 19877 +2026-01-25T11:52:03.4508711Z Finished uploading artifact content to blob storage! +2026-01-25T11:52:03.4512963Z SHA256 digest of uploaded artifact zip is 6bc158e8b4894a93cf9755bd5837733b49d1eb8773dcd14b576a733ce10171d0 +2026-01-25T11:52:03.4514293Z Finalizing artifact upload +2026-01-25T11:52:03.5746344Z Artifact ansible-collection-tarball.zip successfully finalized. Artifact ID 5248482570 +2026-01-25T11:52:03.5747733Z Artifact ansible-collection-tarball has been successfully uploaded! Final size is 19877 bytes. Artifact ID is 5248482570 +2026-01-25T11:52:03.5753686Z Artifact download URL: https://github.com/kewlfft/ansible-aur/actions/runs/21332138952/artifacts/5248482570 +2026-01-25T11:52:03.5844854Z ##[group]Run echo "🔎 Checking tarball path..." +2026-01-25T11:52:03.5845462Z echo "🔎 Checking tarball path..." +2026-01-25T11:52:03.5845760Z echo "TARBALL=$TARBALL" +2026-01-25T11:52:03.5846030Z ls -l "$(dirname "$TARBALL")" +2026-01-25T11:52:03.5878886Z shell: /usr/bin/bash -e {0} +2026-01-25T11:52:03.5879140Z env: +2026-01-25T11:52:03.5879662Z TARBALL: /home/runner/work/ansible-aur/ansible-aur/collections/ansible_collections/kewlfft/aur/kewlfft-aur-0.13.0.tar.gz +2026-01-25T11:52:03.5880276Z ##[endgroup] +2026-01-25T11:52:03.5929596Z 🔎 Checking tarball path... +2026-01-25T11:52:03.5930373Z TARBALL=/home/runner/work/ansible-aur/ansible-aur/collections/ansible_collections/kewlfft/aur/kewlfft-aur-0.13.0.tar.gz +2026-01-25T11:52:03.5954623Z total 80 +2026-01-25T11:52:03.5954910Z -rw-r--r-- 1 runner runner 35147 Jan 25 11:52 LICENSE +2026-01-25T11:52:03.5955296Z -rw-r--r-- 1 runner runner 8958 Jan 25 11:52 README.md +2026-01-25T11:52:03.5955684Z -rw-r--r-- 1 runner runner 2858 Jan 25 11:52 galaxy.yml +2026-01-25T11:52:03.5956090Z -rw-r--r-- 1 runner runner 19703 Jan 25 11:52 kewlfft-aur-0.13.0.tar.gz +2026-01-25T11:52:03.5956487Z drwxr-xr-x 2 runner runner 4096 Jan 25 11:52 meta +2026-01-25T11:52:03.5956827Z drwxr-xr-x 3 runner runner 4096 Jan 25 11:52 plugins +2026-01-25T11:52:03.6001394Z ##[group]Run echo "📤 Publishing $TARBALL ..." +2026-01-25T11:52:03.6001773Z echo "📤 Publishing $TARBALL ..." +2026-01-25T11:52:03.6002134Z ansible-galaxy collection publish "$TARBALL" \ +2026-01-25T11:52:03.6002980Z  --api-key "***" +2026-01-25T11:52:03.6032265Z shell: /usr/bin/bash -e {0} +2026-01-25T11:52:03.6032517Z env: +2026-01-25T11:52:03.6033010Z TARBALL: /home/runner/work/ansible-aur/ansible-aur/collections/ansible_collections/kewlfft/aur/kewlfft-aur-0.13.0.tar.gz +2026-01-25T11:52:03.6033571Z ##[endgroup] +2026-01-25T11:52:03.6081107Z 📤 Publishing /home/runner/work/ansible-aur/ansible-aur/collections/ansible_collections/kewlfft/aur/kewlfft-aur-0.13.0.tar.gz ... +2026-01-25T11:52:04.7217832Z [ERROR]: Error when publishing collection to default (https://galaxy.ansible.com/api/) (HTTP Code: 500, Message: Internal Server Error Code: Unknown) +2026-01-25T11:52:04.7219274Z Publishing collection artifact '/home/runner/work/ansible-aur/ansible-aur/collections/ansible_collections/kewlfft/aur/kewlfft-aur-0.13.0.tar.gz' to default https://galaxy.ansible.com/api/ +2026-01-25T11:52:04.7609700Z ##[error]Process completed with exit code 1. +2026-01-25T11:52:04.7713046Z Post job cleanup. +2026-01-25T11:52:04.8469765Z [command]/usr/bin/git version +2026-01-25T11:52:04.8506743Z git version 2.52.0 +2026-01-25T11:52:04.8543786Z Temporarily overriding HOME='/home/runner/work/_temp/e891939b-b76f-4825-aa8c-147a2399ccec' before making global git config changes +2026-01-25T11:52:04.8544826Z Adding repository directory to the temporary git global config as a safe directory +2026-01-25T11:52:04.8549838Z [command]/usr/bin/git config --global --add safe.directory /home/runner/work/ansible-aur/ansible-aur/collections/ansible_collections/kewlfft/aur +2026-01-25T11:52:04.8584049Z [command]/usr/bin/git config --local --name-only --get-regexp core\.sshCommand +2026-01-25T11:52:04.8614937Z [command]/usr/bin/git submodule foreach --recursive sh -c "git config --local --name-only --get-regexp 'core\.sshCommand' && git config --local --unset-all 'core.sshCommand' || :" +2026-01-25T11:52:04.8840028Z [command]/usr/bin/git config --local --name-only --get-regexp http\.https\:\/\/github\.com\/\.extraheader +2026-01-25T11:52:04.8861011Z http.https://github.com/.extraheader +2026-01-25T11:52:04.8870992Z [command]/usr/bin/git config --local --unset-all http.https://github.com/.extraheader +2026-01-25T11:52:04.8900865Z [command]/usr/bin/git submodule foreach --recursive sh -c "git config --local --name-only --get-regexp 'http\.https\:\/\/github\.com\/\.extraheader' && git config --local --unset-all 'http.https://github.com/.extraheader' || :" +2026-01-25T11:52:04.9119984Z [command]/usr/bin/git config --local --name-only --get-regexp ^includeIf\.gitdir: +2026-01-25T11:52:04.9148931Z [command]/usr/bin/git submodule foreach --recursive git config --local --show-origin --name-only --get-regexp remote.origin.url +2026-01-25T11:52:04.9473606Z Cleaning up orphan processes diff --git a/plugins/modules/aur.py b/plugins/modules/aur.py index c674eae..83a9a91 100644 --- a/plugins/modules/aur.py +++ b/plugins/modules/aur.py @@ -155,7 +155,9 @@ def check_packages(module, packages): """ Inform the user what would change if the module were run """ - would_be_changed = [package for package in packages if not package_installed(module, package)] + rc, stdout, stderr = module.run_command(['pacman', '-T'] + packages, check_rc=False) + missing = set(stdout.splitlines()) + would_be_changed = [package for package in packages if package in missing] diff = {'before': '', 'after': '\n'.join(package for package in would_be_changed if module._diff)} if would_be_changed: @@ -166,10 +168,7 @@ def check_packages(module, packages): message = 'package would be installed' else: status = False - if len(packages) > 1: - message = 'all packages are already installed' - else: - message = 'package is already installed' + message = 'all packages are already installed' if len(packages) > 1 else 'package is already installed' module.exit_json(changed=status, msg=message, diff=diff) @@ -177,7 +176,9 @@ def check_packages_absent(module, packages): """ Inform the user what would change if the module were run with state=absent """ - would_be_changed = [package for package in packages if package_installed(module, package)] + rc, stdout, stderr = module.run_command(['pacman', '-T'] + packages, check_rc=False) + missing = set(stdout.splitlines()) + would_be_changed = [package for package in packages if package not in missing] diff = {'before': '\n'.join(pkg for pkg in would_be_changed if module._diff), 'after': ''} if would_be_changed: @@ -188,10 +189,7 @@ def check_packages_absent(module, packages): message = 'package would be removed' else: status = False - if len(packages) > 1: - message = 'all packages are already absent' - else: - message = 'package is already absent' + message = 'all packages are already absent' if len(packages) > 1 else 'package is already absent' module.exit_json(changed=status, msg=message, diff=diff) @@ -298,6 +296,9 @@ def install_packages(module, packages, use, extra_args, state, skip_pgp_check, i installed_pkgs = [] updated_pkgs = [] + if use != 'makepkg' and not local_pkgbuild: + base_command = build_command_prefix(use, extra_args, aur_only=aur_only, update_cache=update_cache) + for package in packages: was_installed = package_installed(module, package) if state == 'present' and was_installed: @@ -308,8 +309,7 @@ def install_packages(module, packages, use, extra_args, state, skip_pgp_check, i elif local_pkgbuild: rc, out, err = install_local_package(module, package, use, extra_args, local_pkgbuild) else: - command = build_command_prefix(use, extra_args, aur_only=aur_only, update_cache=update_cache) - command.append(package) + command = base_command + [package] rc, out, err = module.run_command(command, check_rc=True) changed_pkg = not (out == '' or 'up-to-date -- skipping' in out or 'nothing to do' in out.lower()) @@ -350,14 +350,15 @@ def remove_packages(module, packages, use, extra_args): rc = 0 used_helper = use + base_cmd, helper = base_remove_cmd(use) + used_helper = helper + if extra_args: + base_cmd += shlex.split(extra_args) + for package in packages: if not package_installed(module, package): continue - command, helper = base_remove_cmd(use) - used_helper = helper - if extra_args: - command += shlex.split(extra_args) - command.append(package) + command = base_cmd + [package] rc, out, err = module.run_command(command, check_rc=True) changed_iter |= (rc == 0)