From e8843575f6480b6347d912b7edfabb2da67f4b37 Mon Sep 17 00:00:00 2001 From: Tomas Popela Date: May 13 2022 11:28:50 +0000 Subject: [PATCH 1/4] Change the URL for source packages in updates Previous one doesn't work anymore. --- diff --git a/config/fedora.yaml b/config/fedora.yaml index eacd5f9..e7bafc5 100644 --- a/config/fedora.yaml +++ b/config/fedora.yaml @@ -35,7 +35,7 @@ data: arch: baseurl: https://download.fedoraproject.org/pub/fedora/linux/updates/$releasever/Everything/$basearch/ source: - baseurl: https://download.fedoraproject.org/pub/fedora/linux/updates/$releasever/Everything/SRPMS/ + baseurl: https://download.fedoraproject.org/pub/fedora/linux/updates/$releasever/Everything/source/ fedora-modular: arch: baseurl: https://download.fedoraproject.org/pub/fedora/linux/releases/$releasever/Modular/$basearch/os/ @@ -45,7 +45,7 @@ data: arch: baseurl: https://download.fedoraproject.org/pub/fedora/linux/updates/$releasever/Modular/$basearch/ source: - baseurl: https://download.fedoraproject.org/pub/fedora/linux/updates/$releasever/Modular/SRPMS/ + baseurl: https://download.fedoraproject.org/pub/fedora/linux/updates/$releasever/Modular/source/ fedora-branched: extends: fedora-base repositories: From 0df9ced507b8e9ce76a62cc35015c403073873ca Mon Sep 17 00:00:00 2001 From: Tomas Popela Date: May 13 2022 11:29:31 +0000 Subject: [PATCH 2/4] Update to F36 Add F35 and move rawhide to F37 --- diff --git a/config/fedora.yaml b/config/fedora.yaml index e7bafc5..63b0c3f 100644 --- a/config/fedora.yaml +++ b/config/fedora.yaml @@ -2,7 +2,7 @@ document: fedmod-configuration version: 1 data: options: - dataset: f34 + dataset: f36 datasets: templates: fedora-base: @@ -70,11 +70,15 @@ data: template: fedora-stable f34: template: fedora-stable + f35: + template: fedora-stable + f36: + template: fedora-stable rawhide: dataset-regex: rawhide platform-module: # nothing to match -> hardcode - stream-template: f35 + stream-template: f37 template: fedora-base repositories: fedora: From 966fa4adbec996db859032f4bf471d9f90322bdf Mon Sep 17 00:00:00 2001 From: Tomas Popela Date: May 13 2022 11:32:18 +0000 Subject: [PATCH 3/4] Don't panic on rich dependencies Before this change the fedmod resolve-deps would fail if processing the rich dependencies such as: (glibc-gconv-extra(x86-64) = 2.35-4.fc36 if redhat-rpm-config) With this change if fedmod will find a dependency that it cannot handle, it will look whether it's a rich one and if so, then it won't quit, but ignore it and log it. Original author of this change is Owen Taylor. --- diff --git a/_fedmod/_depchase.py b/_fedmod/_depchase.py index daeac3b..1cebb3c 100644 --- a/_fedmod/_depchase.py +++ b/_fedmod/_depchase.py @@ -6,6 +6,7 @@ import collections import functools import logging import os +import re import smartcols import solv @@ -95,6 +96,12 @@ def _iterate_all_requires(package): yield dep +_BOOLEAN_KEYWORDS = re.compile(r" (?:and|or|if|with|without|unless) ") + +def _dependency_is_conditional(dependency): + return _BOOLEAN_KEYWORDS.search(str(dependency)) is not None + + def _get_dependency_details(pool, transaction): cache = {} @@ -122,7 +129,11 @@ def _get_dependency_details(pool, transaction): if s in candq } # It was possible to resolve set, so something is wrong here - assert matches + if not matches: + if _dependency_is_conditional(dep): + log.debug("Conditional dependency {} doesn't need to be satisfied".format(dep)) + else: + raise RuntimeError("Dependency {} isn't satisfied in resolved packages!".format(dep)) cache[dep] = matches # While multiple packages providing the same thing is rare, it's From c86735f311c5977874c515b76cecde071d9c91f2 Mon Sep 17 00:00:00 2001 From: Tomas Popela Date: May 13 2022 12:39:30 +0000 Subject: [PATCH 4/4] Dependency resolution fails on packages with dot in name When handling the dot in the package name (i.e. openssl1.1-devel) we have to allow not just canonical selection (SELECTION_CANON), but also the others (SELECTION_NAME and SELECTION_DOTARCH) Original idea is from Owen Taylor. --- diff --git a/_fedmod/_depchase.py b/_fedmod/_depchase.py index 1cebb3c..022adf1 100644 --- a/_fedmod/_depchase.py +++ b/_fedmod/_depchase.py @@ -194,11 +194,10 @@ def _solve(solver, pkgnames, full_info=False): jobs = [] # Initial jobs, no conflicting packages for n in pkgnames: + search_criteria = (solv.Selection.SELECTION_NAME + | solv.Selection.SELECTION_DOTARCH) if "." in n: - search_criteria = solv.Selection.SELECTION_CANON - else: - search_criteria = (solv.Selection.SELECTION_NAME - | solv.Selection.SELECTION_DOTARCH) + search_criteria |= solv.Selection.SELECTION_CANON sel = pool.select(n, search_criteria) if sel.isempty(): log.warn("Could not find package for {}".format(n))