| |
@@ -1,5 +1,5 @@
|
| |
import os
|
| |
- import sys
|
| |
+ import logging
|
| |
|
| |
import dnf
|
| |
|
| |
@@ -63,17 +63,20 @@
|
| |
return self.module_id_to_name.get(koji_tag_name, koji_tag_name)
|
| |
|
| |
def obtain_module_names(self):
|
| |
+ logging.info('Scanning built modules, this might take a while.')
|
| |
j = self.p['unreleasedvariants'](
|
| |
variant_type="module",
|
| |
active=True,
|
| |
page_size=-1
|
| |
# variant_version=STREAM,
|
| |
)
|
| |
+ logging.info('Scanning built modules - DONE.')
|
| |
for module in j:
|
| |
self.module_id_to_name[module["koji_tag"]] = "{}:{}".format(module["variant_id"], module["variant_version"])
|
| |
|
| |
@staticmethod
|
| |
def get_base_from_repo(reponame, repourl):
|
| |
+ logging.info('Loading repo: %s', reponame)
|
| |
base = dnf.Base()
|
| |
if LooseVersion(dnf.__version__) < LooseVersion("2.0.0"):
|
| |
repo = dnf.repo.Repo(reponame, base.conf.cachedir)
|
| |
@@ -97,9 +100,9 @@
|
| |
|
| |
initialize repo objects for dnf to kick off queries
|
| |
"""
|
| |
- print("Getting module information from mbs cache." +
|
| |
- " Please run mbs-build local with dependency modules" +
|
| |
- " you are interested in before running this script.")
|
| |
+ logging.warn("Getting module information from mbs cache." +
|
| |
+ " Please run mbs-build local with dependency modules" +
|
| |
+ " you are interested in before running this script.")
|
| |
cache_path = os.path.expanduser("~/modulebuild/cache/koji_tags")
|
| |
for module_name in os.listdir(cache_path):
|
| |
# for now ignore all what is not in f26 stream, remove when situation changes
|
| |
@@ -113,6 +116,7 @@
|
| |
|
| |
def get_package_requires(self):
|
| |
# runtime
|
| |
+ logging.info('Getting package requirements')
|
| |
pkgs = []
|
| |
base = ModuleDepsDiffer.get_base_from_repo('f26', REPO_F26)
|
| |
for pkg in self.packages:
|
| |
@@ -169,6 +173,7 @@
|
| |
base = ModuleDepsDiffer.get_base_from_repo('f26', REPO_F26)
|
| |
q = base.sack.query()
|
| |
for cap in caps:
|
| |
+ logging.info('Getting source package for %s:', cap)
|
| |
pkg = q.filter(provides__glob=[cap], arch=['noarch', ARCH], latest=True)
|
| |
if not pkg:
|
| |
pkg = q.filter(file__glob=cap)
|
| |
Related to https://pagure.io/modularity/modularity-tools/issue/42