#85 Tweak flatpak generation
Closed a year ago by nphilipp. Opened a year ago by otaylor.
modularity/ otaylor/fedmod flatpak-tweaks  into  master

@@ -16,6 +16,7 @@ 

  

  

  FLATPAK_RUNTIME_STREAM = 'f28'

+ DEFAULT_RPM_BRANCH = 'f28'

  

  

  def _get_runtime_packages():

@@ -33,6 +34,7 @@ 

  class FlatpakGenerator(ModuleGenerator):

      def __init__(self, pkg):

          super().__init__([pkg])

+         self.rpm_branch = DEFAULT_RPM_BRANCH

  

      def _calculate_dependencies(self):

          pkg = self.pkgs[0]

@@ -66,7 +68,7 @@ 

          container_yaml = dedent(f'''\

              compose:

                  modules:

-                     - {pkg}:stable

+                     - {pkg}:master

              flatpak:

                  # Derived from the project's domain name

                  id: org.example.MyApp

@@ -32,6 +32,7 @@ 

          self.pkgs = pkgs

          self.mmd = Modulemd.Module(mdversion=2)

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

+         self.rpm_branch = None

  

      def _calculate_dependencies(self):

          pkgs = self.pkgs

@@ -92,6 +93,8 @@ 

              component = Modulemd.ComponentRpm(name=pkg,

                                                rationale="Package in api",

                                                buildorder=self._get_build_order(pkg))

+             if self.rpm_branch is not None:

+                 component.props.ref = self.rpm_branch

              self.mmd.add_rpm_component(component)

  

          # Declare module level dependencies

@@ -105,6 +108,8 @@ 

              component = Modulemd.ComponentRpm(name=pkg,

                                                rationale="Runtime dependencies",

                                                buildorder=self._get_build_order(pkg))

+             if self.rpm_branch is not None:

+                 component.props.ref = self.rpm_branch

              self.mmd.add_rpm_component(component)

  

          # TODO: Always set content licenses appropriately

  • Generate the flatpak for the stable stream being the 'master' stream/branch rather than 'stable'. This matches our current plans
  • Default components to the f28 branch, which matches the platform and the metadata we used to generate dependencies.

LGTM, I'll rebase and apply.

Pull-Request has been closed by nphilipp

a year ago