#69 Update for F28 branched
Merged 6 years ago by karsten. Opened 6 years ago by otaylor.
modularity/ otaylor/fedmod f28-branched  into  master

file modified
+1 -1
@@ -14,7 +14,7 @@ 

  * `fedmod rpm2module`: generates a draft modulemd file based on

    the given RPM name (multiple RPM names can be given, but the resulting

    draft module will lack any descriptive metadata in that case)

- * `fedmod fetch-metadata`: download the F27 package and module metadata needed

+ * `fedmod fetch-metadata`: download the F28 package and module metadata needed

    to generate draft module definitions (the metadata sets to use are not yet

    configurable)

  

file modified
+3 -7
@@ -13,7 +13,7 @@ 

  * `fedmod rpm2module`: generates a draft modulemd file based on

    the given RPM name (multiple RPM names can be given, but the resulting

    draft module will lack any descriptive metadata in that case)

- * `fedmod fetch-metadata`: download the F27 package and module metadata needed

+ * `fedmod fetch-metadata`: download the F28 package and module metadata needed

    to generate draft module definitions (the metadata sets to use are not yet

    configurable)

  
@@ -173,7 +173,7 @@ 

  The following metadata is currently used as input to the draft module generation

  process:

  

- * Package dependency definitions are pulled from the regular Fedora 27

+ * Package dependency definitions are pulled from the regular Fedora 28

    release and updates repositories, with the metadata being downloaded for

    local use via the `fedmod fetch-metadata` command

  
@@ -181,10 +181,6 @@ 

    repository, with the metadata being downloaded for local use via the

    `fedmod fetch-metadata` command

  

- * The definition of Fedora's build-only `bootstrap` module is retrieved

-   directly from the relevant

-   [dist-git repository](https://src.fedoraproject.org/modules/bootstrap/raw/master/f/bootstrap.yaml)

- 

  * Descriptive metadata is taken from the system running `fedmod`. Due to this,

    `fedmod` currently only supports Fedora 26+. (This will be fixed to use

    the same repository metadata as is used for package dependency resolution)
@@ -202,6 +198,6 @@ 

  

  * `components` are only given a name and rationale, relying on the default

    settings for everything else

- * the stream for module level dependencies is currently hardcoded to `f27`.

+ * the stream for module level dependencies is currently hardcoded to `f28`.

    This isn't right, but we can't set anything better until the mechanism for

    depending on multiple streams without naming them specifically is defined.

@@ -155,9 +155,6 @@ 

      else:

          result = set()

      for s in solver.transaction().newpackages():

-         if s.name.startswith("fedora-release"):

-             # Relying on the F27 metadata injects irrelevant fedora-release deps

-             continue

          if s.arch in ("src", "nosrc"):

              continue

          # Ensure the solvables don't outlive the solver that created them by

file modified
+23 -44
@@ -1,4 +1,5 @@ 

  """_fetchrepodata: Map yum/dnf repo metadata to local lookup caches"""

+ import gzip

  import json

  import logging

  import os
@@ -19,12 +20,12 @@ 

  log = logging.getLogger(__name__)

  

  FALLBACK_STREAM = 'master'

- STREAM = 'f27'

+ STREAM = 'f28'

  ARCH = 'x86_64'

- _F27_BIKESHED_REPO = "https://dl.fedoraproject.org/pub/fedora/linux/modular/development/bikeshed/Server/"

- _F27_MAIN_REPO = "https://dl.fedoraproject.org/pub/fedora/linux/development/27/Everything/"

- _F27_UPDATES_REPO = "https://dl.fedoraproject.org/pub/fedora/linux/updates/27/"

- _F27_BOOTSTRAP_MODULEMD = "https://src.fedoraproject.org/modules/bootstrap/raw/master/f/bootstrap.yaml"

+ _F28_MODULAR_REPO = "https://dl.fedoraproject.org/pub/fedora/linux/development/28/Modular/"

+ _F28_MAIN_REPO = "https://dl.fedoraproject.org/pub/fedora/linux/development/28/Everything/"

+ # F28 updates repo is empty until F28 is released, and the structure is still evolving

+ #_F28_UPDATES_REPO = "https://dl.fedoraproject.org/pub/fedora/linux/updates/28/Everything/"

  

  class MissingMetadata(Exception):

      """Reports failure to find the local metadata cache"""
@@ -56,27 +57,25 @@ 

      return RepoPaths(remote_repo_url, remote_metadata_url,

                       local_cache_path, local_metadata_path)

  

- _x86_64_MODULE_INFO = _define_repo(_F27_BIKESHED_REPO, "f27-modules", ARCH)

- _SOURCE_MODULE_INFO = _define_repo(_F27_BIKESHED_REPO, "f27-modules")

- _x86_64_PACKAGE_INFO = _define_repo(_F27_MAIN_REPO, "f27-packages", ARCH)

- _SOURCE_PACKAGE_INFO = _define_repo(_F27_MAIN_REPO, "f27-packages")

- _x86_64_UPDATES_INFO = _define_repo(_F27_UPDATES_REPO, "f27-updates", ARCH)

- _SOURCE_UPDATES_INFO = _define_repo(_F27_UPDATES_REPO, "f27-updates")

+ _x86_64_MODULE_INFO = _define_repo(_F28_MODULAR_REPO, "f28-modular", ARCH)

+ _SOURCE_MODULE_INFO = _define_repo(_F28_MODULAR_REPO, "f28-modular")

+ _x86_64_PACKAGE_INFO = _define_repo(_F28_MAIN_REPO, "f28-packages", ARCH)

+ _SOURCE_PACKAGE_INFO = _define_repo(_F28_MAIN_REPO, "f28-packages")

+ #_x86_64_UPDATES_INFO = _define_repo(_F28_UPDATES_REPO, "f28-updates", ARCH)

+ #_SOURCE_UPDATES_INFO = _define_repo(_F28_UPDATES_REPO, "f28-updates")

  _ALL_REPOS = (

      _x86_64_MODULE_INFO,

      _SOURCE_MODULE_INFO,

      _x86_64_PACKAGE_INFO,

      _SOURCE_PACKAGE_INFO,

-     _x86_64_UPDATES_INFO,

-     _SOURCE_UPDATES_INFO,

+ #    _x86_64_UPDATES_INFO,

+ #    _SOURCE_UPDATES_INFO,

  )

- _BOOTSTRAP_MODULEMD = os.path.join(CACHEDIR, "f27-bootstrap.yaml")

  

  _LOOKUP_CACHES = {

-     "_BOOTSTRAP_COMPONENTS_CACHE": os.path.join(CACHEDIR, "f27-bootstrap-cache.json"),

-     "_MODULE_FORWARD_LOOKUP_CACHE": os.path.join(CACHEDIR, "f27-module-contents-cache.json"),

-     "_SRPM_REVERSE_LOOKUP_CACHE": os.path.join(CACHEDIR, "f27-srpm-to-module-cache.json"),

-     "_RPM_REVERSE_LOOKUP_CACHE": os.path.join(CACHEDIR, "f27-rpm-to-module-cache.json"),

+     "_MODULE_FORWARD_LOOKUP_CACHE": os.path.join(CACHEDIR, "f28-module-contents-cache.json"),

+     "_SRPM_REVERSE_LOOKUP_CACHE": os.path.join(CACHEDIR, "f28-srpm-to-module-cache.json"),

+     "_RPM_REVERSE_LOOKUP_CACHE": os.path.join(CACHEDIR, "f28-rpm-to-module-cache.json"),

  }

  

  METADATA_SECTIONS = ("filelists", "primary", "modules")
@@ -150,23 +149,6 @@ 

      with open(cache_fname, "r") as cache_file:

          return json.load(cache_file)

  

- def _download_bootstrap_modulemd():

-     from ._depchase import make_pool, get_rpms_for_srpms

-     print("Downloading build bootstrap module details")

-     _download_one_file(_F27_BOOTSTRAP_MODULEMD, _BOOTSTRAP_MODULEMD)

-     # TODO: Cache the modulemd file hash, and only regenerate the cache

-     # if that has changed

-     mmd = modulemd.ModuleMetadata()

-     mmd.load(_BOOTSTRAP_MODULEMD)

-     pool = make_pool("x86_64")

-     bootstrap_rpms = set()

-     rpms = get_rpms_for_srpms(pool, mmd.components.rpms)

-     for rpmname in rpms:

-         bootstrap_rpms.add(rpmname)

-     for srpmname in mmd.components.rpms:

-         bootstrap_rpms.add(srpmname)

-     _write_cache("_BOOTSTRAP_COMPONENTS_CACHE", list(bootstrap_rpms))

- 

  def _write_lookup_caches():

      metadata_dir = os.path.join(_x86_64_MODULE_INFO.local_cache_path)

      repomd_fname = os.path.join(metadata_dir, "repodata", "repomd.xml")
@@ -197,7 +179,6 @@ 

      """Downloads the latest repo metadata"""

      for repo_definition in _ALL_REPOS:

          _download_metadata_files(repo_definition)

-     _download_bootstrap_modulemd()

      _write_lookup_caches()

  

  @attributes
@@ -206,17 +187,16 @@ 

      cache_dir = attrib(str)

      srpm_to_modules = attrib(dict)

      rpm_to_modules = attrib(dict)

-     bootstrap_components = attrib(set)

      module_to_packages = attrib(dict)

      source_repo_cache = attrib(str)

      arch_repo_cache = attrib(str)

-     source_updates_cache = attrib(str)

-     arch_updates_cache = attrib(str)

+ #    source_updates_cache = attrib(str)

+ #    arch_updates_cache = attrib(str)

  

  

  def load_cached_repodata(dataset_name):

-     if dataset_name != "f27-bikeshed-x86_64":

-         raise RuntimeError("Data sets other than 'f27-bikeshed-x86_64' are not yet supported")

+     if dataset_name != "f28-x86_64":

+         raise RuntimeError("Data sets other than 'f28-x86_64' are not yet supported")

      # Check whether or not fetch-metadata has been run at all

      metadata_dir = os.path.join(_x86_64_MODULE_INFO.local_cache_path)

      repomd_fname = os.path.join(metadata_dir, "repodata", "repomd.xml")
@@ -235,10 +215,9 @@ 

          cache_dir = CACHEDIR,

          srpm_to_modules = _read_cache("_SRPM_REVERSE_LOOKUP_CACHE"),

          rpm_to_modules = _read_cache("_RPM_REVERSE_LOOKUP_CACHE"),

-         bootstrap_components = _read_cache("_BOOTSTRAP_COMPONENTS_CACHE"),

          module_to_packages = _read_cache("_MODULE_FORWARD_LOOKUP_CACHE"),

          source_repo_cache = _SOURCE_PACKAGE_INFO.local_cache_path,

          arch_repo_cache = _x86_64_PACKAGE_INFO.local_cache_path,

-         source_updates_cache = _SOURCE_UPDATES_INFO.local_cache_path,

-         arch_updates_cache = _x86_64_UPDATES_INFO.local_cache_path,

+ #        source_updates_cache = _SOURCE_UPDATES_INFO.local_cache_path,

+ #        arch_updates_cache = _x86_64_UPDATES_INFO.local_cache_path,

      )

file modified
+7 -9
@@ -4,7 +4,6 @@ 

  import os.path

  import requests

  import click

- import gzip

  import logging

  import modulemd

  import solv
@@ -14,7 +13,7 @@ 

  log = logging.getLogger(__name__)

  

  _ACTIVE_DATASET = None

- _DEFAULT_DATASET_NAME = "f27-bikeshed-x86_64"

+ _DEFAULT_DATASET_NAME = "f28-x86_64"

  

  def _load_dataset(dataset_name):

      global _ACTIVE_DATASET
@@ -35,14 +34,12 @@ 

      result = _get_dataset().rpm_to_modules.get(rpm_name)

      return result

  

- def get_module_for_rpm(rpm_name, *, allow_bootstrap=False):

+ def get_module_for_rpm(rpm_name):

      result = _get_dataset().rpm_to_modules.get(rpm_name)

      if result is not None:

          if len(result) > 1:

              log.warn(f"Multiple modules found for {rpm_name!r}: {','.join(result)}")

          result = result[0]

-     elif allow_bootstrap and rpm_name in _get_dataset().bootstrap_components:

-         result = "bootstrap"

      return result

  

  def get_rpm_reverse_lookup():
@@ -278,7 +275,8 @@ 

      srcrepo = Repo("distro-source", dataset.source_repo_cache)

      repo = Repo("distro", dataset.arch_repo_cache)

      repo.srcrepo = srcrepo

-     updates_srcrepo = Repo("distro-updates-source", dataset.source_updates_cache)

-     updates_repo = Repo("distro-updates", dataset.arch_updates_cache)

-     updates_repo.srcrepo = updates_srcrepo

-     return [repo, srcrepo, updates_repo, updates_srcrepo]

+     # updates_srcrepo = Repo("distro-updates-source", dataset.source_updates_cache)

+     # updates_repo = Repo("distro-updates", dataset.arch_updates_cache)

+     # updates_repo.srcrepo = updates_srcrepo

+     # return [repo, srcrepo, updates_repo]

+     return [repo, srcrepo]

file modified
+2 -4
@@ -51,13 +51,11 @@ 

  # modulemd generation

  @_cli_commands.command()

  @click.option("--output", "-o", metavar="FILE", help="Write to FILE instead of stdout.")

- @click.option("--build-deps", metavar="N", default=0,

-             help="Attempt to ensure N levels of build dependencies (Default: 0).")

  @click.argument("pkgs", metavar='PKGS', nargs=-1, required=True)

- def rpm2module(pkgs, output, build_deps):

+ def rpm2module(pkgs, output):

      """Generate a draft modulemd from an RPM (or list of RPMs)"""

      mg = ModuleGenerator(pkgs)

-     mg.run(output, build_deps)

+     mg.run(output)

  

  # Checking availability of dependencies through module streams

  @_cli_commands.command('resolve-deps')

file modified
+12 -48
@@ -7,11 +7,11 @@ 

      name, version, release = rpm_name.rsplit("-", 2)

      return name

  

- def _categorise_deps(all_rpm_deps, *, allow_bootstrap=False):

+ def _categorise_deps(all_rpm_deps):

      module_deps = set()

      remaining_rpm_deps = set()

      for pkgname in all_rpm_deps:

-         modname = _repodata.get_module_for_rpm(pkgname, allow_bootstrap=allow_bootstrap)

+         modname = _repodata.get_module_for_rpm(pkgname)

          if modname is not None:

              module_deps.add(modname)

          else:
@@ -26,42 +26,18 @@ 

          self.mmd = modulemd.ModuleMetadata()

          self._pool = _depchase.make_pool("x86_64")

  

-     def _calculate_dependencies(self, build_deps_iterations):

+     def _calculate_dependencies(self):

          pkgs = self.pkgs

          pool = self._pool

          self.api_srpms = {_name_only(_depchase.get_srpm_for_rpm(pool, dep)) for dep in pkgs}

          run_deps = _depchase.ensure_installable(pool, pkgs)

          module_run_deps, rpm_run_deps = _categorise_deps(run_deps)

+         # The platform module provides any other runtime dependencies - we expect we'll

+         # always depend on it, but check for the heck of it.

+         if len(rpm_run_deps) > 0:

+             module_run_deps.add('platform')

          self.module_run_deps = module_run_deps

-         run_srpms, build_deps = _depchase.ensure_buildable(pool, rpm_run_deps)

-         module_build_deps = set()

-         resolved_build_deps = set()

-         build_srpms = set()

-         for i in range(build_deps_iterations+1):

-             # Give up on making the module self-hosting after the requested

-             # number of iterations

-             new_module_build_deps, remaining_build_deps = _categorise_deps(build_deps, allow_bootstrap=True)

-             module_build_deps |= new_module_build_deps

-             resolved_build_deps |= (build_deps - remaining_build_deps)

-             build_deps -= resolved_build_deps

-             if build_deps and i < build_deps_iterations:

-                 new_build_srpms, remaining_build_deps = _depchase.ensure_buildable(pool, build_deps)

-                 build_srpms |= new_build_srpms

-                 resolved_build_deps |= (build_deps - remaining_build_deps)

-                 build_deps -= resolved_build_deps

-             if not build_deps:

-                 break

-         else:

-             if build_deps_iterations:

-                 logging.warn(f"Failed to close out build dependencies after {build_deps_iterations} iterations")

-         self.module_run_deps = module_run_deps

-         self.module_build_deps = module_build_deps

-         run_srpm_names = {_name_only(n) for n in run_srpms}

-         build_srpm_names = {_name_only(n) for n in build_srpms}

-         self.run_srpms = run_srpm_names - build_srpm_names

-         self.build_srpms = build_srpm_names - run_srpm_names

-         self.build_and_run_srpms = run_srpm_names & build_srpm_names

-         self.unresolved_build_rpms = {n for n in build_deps}

+         self.run_srpms = set()

  

      def _set_core_srpm(self):

          """Set core SRPM based on first listed package"""
@@ -102,25 +78,13 @@ 

              self.mmd.components.add_rpm(pkg, "Package in api", buildorder=self._get_build_order(pkg))

  

          # Declare module level dependencies

-         for modname in self.module_build_deps:

-             self.mmd.buildrequires[modname] = "f27"

          for modname in self.module_run_deps:

-             self.mmd.requires[modname] = "f27"

- 

-         # Add any other RPMs not available from existing modules as components

-         for pkg in self.build_and_run_srpms:

-             self.mmd.components.add_rpm(pkg, "Build and runtime dependency.", buildorder=self._get_build_order(pkg))

+             self.mmd.buildrequires[modname] = "f28"

+             self.mmd.requires[modname] = "f28"

  

          for pkg in self.run_srpms:

              self.mmd.components.add_rpm(pkg, "Runtime dependency.", buildorder=self._get_build_order(pkg))

  

-         for pkg in self.build_srpms:

-             self.mmd.components.add_rpm(pkg, "Build dependency.", buildorder=self._get_build_order(pkg))

-             # Filter out any build-only packages

-             # TODO: This won't filter out all the RPMs, only the one matching the SRPM name

-             #       See https://pagure.io/modulemd/issue/54 for discussion

-             self.mmd.filter.add_rpm(pkg)

- 

          # TODO: Always set content licenses appropriately

  

          # TODO: Emit something for non-empty self.unresolved_build_rpms
@@ -133,9 +97,9 @@ 

          else:

              return 0

  

-     def run(self, output_fname, build_deps_iterations):

+     def run(self, output_fname):

          if len(self.pkgs) == 1:

              self._set_core_srpm()

-         self._calculate_dependencies(build_deps_iterations)

+         self._calculate_dependencies()

          self._update_module_md()

          self._save_module_md(output_fname)

file modified
+2 -136
@@ -7,10 +7,8 @@ 

  from _fedmod.cli import _cli_commands

  from _fedmod.module_generator import ModuleGenerator

  

- def _generate_modulemd(rpms, build_deps_iterations=0):

+ def _generate_modulemd(rpms):

      cmd = ['rpm2module']

-     if build_deps_iterations:

-         cmd.extend(['--build-deps', str(build_deps_iterations)])

      cmd.extend(rpms)

      runner = CliRunner()

      result = runner.invoke(_cli_commands, cmd)
@@ -41,7 +39,7 @@ 

          assert set(modmd.components.rpms) == set(input_rpms)

  

          # Expected module dependencies for grep

-         assert set(modmd.buildrequires) == set()

+         assert set(modmd.buildrequires) == {'platform',}

          assert set(modmd.requires) == {'platform',}

  

  
@@ -71,135 +69,3 @@ 

          assert set(modmd.requires) == {'platform',}

  

  

- class TestRecursiveBuildDeps(object):

- 

-     def test_generated_modulemd_file(self):

-         input_rpms = ('mariadb',)

-         modmd = _generate_modulemd(input_rpms, 100)

- 

-         # Descriptive metadata

-         assert modmd.summary == "Generated module for mariadb"

-         assert modmd.description == "Module auto-generated by fedmod"

- 

-         # Expected licenses

-         assert modmd.module_licenses == {'MIT'}

-         assert modmd.content_licenses == set()

- 

-         # Only given modules are listed in the public API

-         assert sorted(modmd.api.rpms) == sorted(input_rpms)

- 

-         # MariaDB's complicated test suite poses some real challenges for

-         # build dependency resolution, even when the generator is kind of

-         # cheating and relying on the actual Fedora MariaDB module at runtime

- 

-         # Expected components

-         expected_components = set(input_rpms)

-         expected_components |= {

-             'systemtap',

-             'libselinux',

-             'numpy',

-             'Judy',

-             'setools',

-             'pyparsing',

-             'boost',

-             'libsemanage',

-             'jemalloc',

-         }

-         assert set(modmd.components.rpms) == expected_components

- 

-         # Expected module dependencies

-         expected_build_deps = {

-             'platform',

-             'bootstrap',

-             'mariadb',

-             'networking-base',

-             'host',

-             'perl',

-             'installer',

-         }

-         assert set(modmd.buildrequires) == expected_build_deps

-         assert set(modmd.requires) == {'platform', 'perl', 'mariadb'}

- 

- 

- class TestNonRecursiveBuildDeps(object):

- 

-     def test_generated_modulemd_file(self):

-         input_rpms = ('graphite-web',)

-         modmd = _generate_modulemd(input_rpms)

- 

-         # Descriptive metadata

-         assert modmd.summary == "Generated module for graphite-web"

-         assert modmd.description == "Module auto-generated by fedmod"

- 

-         # Expected licenses

-         assert modmd.module_licenses == {'MIT'}

-         assert modmd.content_licenses == set()

- 

-         # Only given modules are listed in the public API

-         assert sorted(modmd.api.rpms) == sorted(input_rpms)

- 

-         # Expected components

-         expected_components = set(input_rpms)

-         expected_components |= {

-             'python-twisted',

-             'python-simplejson',

-             'python-service-identity',

-             'python-crypto',

-             'python-xpyb',

-             'python-memcached',

-             'python-zope-interface',

-             'python-whitenoise',

-             'python-whisper',

-             'pyparsing',

-             'dejavu-fonts',

-             'python-zope-event',

-             'python-django',

-             'python-django-tagging',

-             'python-attrs',

-             'python-carbon',

-             'python-fadvise',

-             'pyserial',

-         }

-         assert set(modmd.components.rpms) == expected_components

- 

-         # Expected module dependencies

-         # graphite-web is currently generating more runtime module dependencies

-         # than expected, so it makes for an interesting test case to look for

-         # cases where fedmod is picking up module implementation details

- 

-         expected_build_requires = {

-             'platform',

-             'fonts',

-             'python2',

-             'python2-ecosystem',

-             'bootstrap'

-         }

-         _unexpected_build_requires = {

-             'pki',

-             'samba',

-             'python3',

-             'python3-ecosystem',

-             'installer',

-             'X11-base',

-             'freeipa',

-             'perl',

-             'fonts',

-             'freeipa',

-             'java',

-             'host',

-             'networking-base',

-         }

-         assert set(modmd.buildrequires) == expected_build_requires | _unexpected_build_requires

-         expected_requires = {

-             'platform',

-             'httpd',

-             'fonts',

-         }

-         _unexpected_requires = {

-             'pki',

-             'samba',

-             'installer',

-             'X11-base',

-             'freeipa',

-         }

-         assert set(modmd.requires) == expected_requires | _unexpected_requires

file modified
+19 -20
@@ -13,8 +13,8 @@ 

          self.mr.list_modules()

          out, err = capfd.readouterr()

  

-         assert "platform" in out

-         assert "host" in out

+         assert "reviewboard" in out

+         assert "django" in out

  

  

  class TestListingPackages(object):
@@ -26,17 +26,17 @@ 

          self.mr.list_modularized_pkgs()

          out, err = capfd.readouterr()

  

-         assert "kernel" in out

-         assert "gcc" in out

-         assert "(platform)" not in out

+         assert "ReviewBoard" in out

+         assert "python2-django" in out

+         assert "(reviewboard)" not in out

  

      def test_list_packages_with_modules(self, capfd):

          self.mr.list_modularized_pkgs(list_modules=True)

          out, err = capfd.readouterr()

  

-         assert "kernel" in out

-         assert "gcc" in out

-         assert "(platform)" in out

+         assert "ReviewBoard" in out

+         assert "python2-django" in out

+         assert "(reviewboard)" in out

  

  

  class TestResolvingDependencies(object):
@@ -45,18 +45,19 @@ 

          self.mr = ModuleRepoquery()

  

      def test_list_pkg_deps(self, capfd):

-         self.mr.list_pkg_deps(["nginx"], [])

+         self.mr.list_pkg_deps(["timeline"], [])

          out, err = capfd.readouterr()

  

-         assert "gzip" in out

-         assert "nginx" in out

+         assert "python2-markdown" in out

+         assert "python2-setuptools" in out

  

      def test_list_pkg_deps_with_module_deps(self, capfd):

-         self.mr.list_pkg_deps(["nginx"], ["platform", "host"])

+         self.mr.list_pkg_deps(["timeline"], ["reviewboard"])

          out, err = capfd.readouterr()

  

-         assert "gzip" not in out

-         assert "nginx" in out

+         assert "python2-markdown" not in out

+         assert "python2-setuptools" in out

+ 

  

  class TestListingPackagesInModule(object):

  
@@ -64,11 +65,10 @@ 

          self.mr = ModuleRepoquery()

  

      def test_list_rpms_in_module(self, capfd):

-         self.mr.list_rpms_in_module("host")

+         self.mr.list_rpms_in_module("reviewboard")

          out, err = capfd.readouterr()

  

-         assert "kernel" in out

-         assert "httpd" not in out

+         assert "ReviewBoard" in out

  

  class TestListingModulesWithPackage(object):

  
@@ -76,11 +76,10 @@ 

          self.mr = ModuleRepoquery()

  

      def test_list_modules_for_rpm(self, capfd):

-         self.mr.list_modules_for_rpm("kernel")

+         self.mr.list_modules_for_rpm("ReviewBoard")

          out, err = capfd.readouterr()

  

-         assert "host" in out

-         assert "httpd" not in out

+         assert "reviewboard" in out

  

  class TestGettingSRPMOfRPM(object):

  

Here's a basic set of patches that get fedmod working again on top of F28 branched and the modular repository. Module generation is considerably simplified with hybrid modularity.

  • Components in the rpm2flatpak output are only the srpms for the packages listed on the command line
  • Module requires and buildrequires are a) modules containing packages required by the packages on the command line b) platform

Some more fine-tuning is necessary - fedmod doesn't have any handling for modules with multiple streams - like we have with nodejs. And probably if a package is available both in the base package set and in modules the default should be to just use the package in the base package set, which is the opposite of what happens here.

But this gets things to the point where fedmod runs and the tests pass and should be a good basis for further work.

6 new commits added

  • Strip down module generation
  • Comment out references to updates repo
  • Move from F27 to F28
  • Remove special handling of fedora-release
  • Remove references to bootstrap module
  • Move gzip import into the right file
6 years ago

LGTM with one exception
The output of 'fedmod rpm2module' is still spec_v1, we need spec_v2:
https://github.com/fedora-modularity/libmodulemd/blob/master/spec.v2.yaml

I'll go ahead and merge this anyway

Pull-Request has been merged by karsten

6 years ago