| |
@@ -6,6 +6,7 @@
|
| |
import functools
|
| |
import logging
|
| |
import os
|
| |
+ import re
|
| |
|
| |
import smartcols
|
| |
import solv
|
| |
@@ -95,6 +96,12 @@
|
| |
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 @@
|
| |
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
|
| |
@@ -183,11 +194,10 @@
|
| |
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))
|
| |
I'm putting here all the required changes that one needs to apply locally to have a working environment for building the Fedora Flatpaks. As I have doubts whether the changes will be merged and the fedmod in Fedora is orphaned anyway I suggest patching the sources locally for those who wants to work on Flatpaks.