depsolve: relax the module naming requirement
Remove the requirement for `:` in the name which would have been selected by the fronted, instead asking dnf "is this a module?". Signed-off-by: Simon de Vlieger <supakeen@redhat.com>
This commit is contained in:
parent
d92be415f8
commit
ffcafb390d
1 changed files with 8 additions and 4 deletions
|
|
@ -348,10 +348,14 @@ class DNF(SolverBase):
|
|||
modules = {}
|
||||
|
||||
for transaction in transactions:
|
||||
# module specifications must start with an "@" and include a ":", filter them
|
||||
# out so we can use them
|
||||
modules_in_package_specs = [
|
||||
p[1:] for p in transaction.get("package-specs", []) if p.startswith("@") and ":" in p]
|
||||
# module specifications must start with an "@", if they do we try to
|
||||
# ask DNF for a module by that name, if it doesn't exist it isn't a
|
||||
# module; otherwise it is and we should use it
|
||||
modules_in_package_specs = []
|
||||
|
||||
for p in transaction.get("package-specs", []):
|
||||
if p.startswith("@") and self.base_module.get_modules(p):
|
||||
modules_in_package_specs.append(p.lstrip("@"))
|
||||
|
||||
if transaction.get("module-enable-specs") or modules_in_package_specs:
|
||||
# we'll be checking later if any packages-from-modules are in the
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue