diff --git a/packaging/rpm/tmt.spec b/packaging/rpm/tmt.spec index 929fc88a82..c9a0acfe54 100644 --- a/packaging/rpm/tmt.spec +++ b/packaging/rpm/tmt.spec @@ -49,7 +49,6 @@ metadata specification (L1 and L2) and allows easy test execution. %pyproject_extras_subpkg -n tmt report-junit %pyproject_extras_subpkg -n tmt report-polarion %pyproject_extras_subpkg -n tmt link-jira -%pyproject_extras_subpkg -n tmt prepare-artifact %package -n tmt+test-convert Summary: Dependencies required for tmt test import and export @@ -135,6 +134,14 @@ Requires: mock %description -n tmt+provision-mock %_metapackage_description +%package -n tmt+prepare-artifact +Summary: Dependencies required for tmt prepare artifact +Requires: tmt == %{version}-%{release} +Requires: koji +Requires: python3-copr + +%description -n tmt+prepare-artifact %_metapackage_description + # Replace with pyproject_extras_subpkg at some point %package -n tmt+all Summary: Extra dependencies for the Test Management Tool diff --git a/tmt/steps/prepare/artifact/providers/koji.py b/tmt/steps/prepare/artifact/providers/koji.py index db2cf8b345..f51cdf972d 100644 --- a/tmt/steps/prepare/artifact/providers/koji.py +++ b/tmt/steps/prepare/artifact/providers/koji.py @@ -125,11 +125,11 @@ def _initialize_session( Also :py:attr:`_top_url` and :py:attr:`_api_url` being the base URL for the Koji instance. """ import_koji(self.logger) + config = koji.read_config("koji") # type: ignore[union-attr] + self._api_url = api_url or config.get("server") + self._top_url = top_url or config.get("topurl") try: - config = koji.read_config("koji") # type: ignore[union-attr] - self._api_url = api_url or config.get("server") - self._top_url = top_url or config.get("topurl") return ClientSession(self._api_url) except Exception as error: raise tmt.utils.GeneralError(