diff --git a/ansible-packaging.spec b/ansible-packaging.spec index 03d5a78..1a5ec61 100644 --- a/ansible-packaging.spec +++ b/ansible-packaging.spec @@ -1,6 +1,6 @@ Name: ansible-packaging Version: 1 -Release: 9.1%{?dist} +Release: 10%{?dist} Summary: RPM packaging macros and generators for Ansible collections License: GPL-3.0-or-later @@ -149,6 +149,9 @@ echo "Ensure macro prefers the collection namespace and name passed as an argume %changelog +* Thu May 11 2023 Maxwell G - 1-10 +- %%ansible_collection_install - disable spurious collections path warnings + * Wed Jan 18 2023 Fedora Release Engineering - 1-9.1 - Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild diff --git a/ansible_collection.py b/ansible_collection.py index 70093be..80c4b33 100755 --- a/ansible_collection.py +++ b/ansible_collection.py @@ -19,6 +19,7 @@ the provided arguments. """ import argparse +import os import shutil import subprocess import sys @@ -96,7 +97,12 @@ class AnsibleCollection: # Without this, the print statements are shown after the command # output when building in mock. sys.stdout.flush() - subprocess.run(args, cwd=temppath, check=True) + subprocess.run( + args, + cwd=temppath, + check=True, + env={**os.environ, "ANSIBLE_GALAXY_COLLECTIONS_PATH_WARNING": "0"}, + ) def parseargs() -> argparse.Namespace: