| |
@@ -31,6 +31,12 @@
|
| |
|
| |
|
| |
class ModuleGenerator(object):
|
| |
+ # If True, packages from the command line will be put into api: in the generated modulemd
|
| |
+ include_api_section = True
|
| |
+ # Rationale for packages from the command line
|
| |
+ api_component_rationale = "Package in api"
|
| |
+ # Rationale for other packages
|
| |
+ other_component_rationale = "Runtime dependency"
|
| |
|
| |
def __init__(self, pkgs):
|
| |
self.pkgs = pkgs
|
| |
@@ -87,10 +93,11 @@
|
| |
|
| |
# Declare the public API
|
| |
for pkg in self.api_srpms:
|
| |
- self.mmd.peek_rpm_api().add(pkg)
|
| |
+ if self.include_api_section:
|
| |
+ self.mmd.peek_rpm_api().add(pkg)
|
| |
|
| |
component = Modulemd.ComponentRpm(
|
| |
- name=pkg, rationale="Package in api",
|
| |
+ name=pkg, rationale=self.api_component_rationale,
|
| |
buildorder=self._get_build_order(pkg))
|
| |
if self.rpm_branch is not None:
|
| |
component.props.ref = self.rpm_branch
|
| |
@@ -105,7 +112,7 @@
|
| |
|
| |
for pkg in self.run_srpms:
|
| |
component = Modulemd.ComponentRpm(
|
| |
- name=pkg, rationale="Runtime dependencies",
|
| |
+ name=pkg, rationale=self.other_component_rationale,
|
| |
buildorder=self._get_build_order(pkg))
|
| |
if self.rpm_branch is not None:
|
| |
component.props.ref = self.rpm_branch
|
| |
This PR cleans up the generated modulemd files a bit: