Description of problem: Let's say we have ModuleA:f26:1 installed into the system. There is an updated version of ModuleA (ModuleA:f26:2) which now depends on ModuleB. When updating ModuleA, dnf does not install ModuleB. Version-Release number of selected component (if applicable): 2.7.5-14 How reproducible: always Steps to Reproduce: 1. Given module definitions: --- data: name: ModuleA stream: f26 version: 1 summary: Module ModuleA summary description: Module ModuleA description license: module: [MIT] profiles: default: rpms: [TestA] artifacts: rpms: ["TestA-0:1-1.modA.noarch"] components: rpms: TestA: {rationale: 'rationale for TestA'} document: modulemd version: 2 --- data: name: ModuleA stream: f26 version: 2 summary: Module ModuleA summary description: Module ModuleA description license: module: [MIT] dependencies: - requires: ModuleB: [] profiles: default: rpms: [TestA] artifacts: rpms: ["TestA-0:2-1.modA.noarch"] components: rpms: TestA: {rationale: 'rationale for TestA'} document: modulemd version: 2 --- data: name: ModuleB stream: f26 version: 1 summary: Module ModuleB summary description: Module ModuleB description license: module: [MIT] profiles: minimal: rpms: [TestB] artifacts: rpms: ["TestB-0:1-1.modB.noarch"] components: rpms: TestB: {rationale: 'rationale for TestB'} document: modulemd version: 2 2. And a file "/etc/dnf/modules.defaults.d/ModuleB.yaml" with """ document: modulemd-defaults version: 1 data: module: ModuleB stream: f26 profiles: f26: [minimal] """ 3. Install ModuleA:f26:1 4. Update ModuleA Actual results: ModuleB is not installed Expected results: ModuleB's default stream ('minimal') is installed Additional info: Captured stdout: shell.command: ['dnf-3', 'module', 'install', 'ModuleA:f26:1', '-y'] shell.command.stdout: Last metadata expiration check: 0:00:00 ago on Fri May 25 14:18:52 2018. Dependencies resolved. ================================================================================ Package Arch Version Repository Size ================================================================================ Installing module packages: TestA noarch 1-1.modA modularityAB 6.4 k Transaction Summary ================================================================================ Total size: 6.4 k Installed size: 0 Downloading Packages: Running transaction check Transaction check succeeded. Running transaction test Transaction test succeeded. Running transaction Preparing : 1/1 Installing : TestA-1-1.modA.noarch 1/1 Verifying : TestA-1-1.modA.noarch 1/1 Complete! shell.command.stderr: shell.command: ['dnf-3', 'module', 'update', 'ModuleA', '-y'] shell.command.stdout: Last metadata expiration check: 0:00:01 ago on Fri May 25 14:18:52 2018. Dependencies resolved. ================================================================================ Package Arch Version Repository Size ================================================================================ Upgrading: TestA noarch 2-1.modA modularityAB 6.4 k Installing dependencies: TestC noarch 1-1 modularityAB 6.3 k Transaction Summary ================================================================================ Install 1 Package Upgrade 1 Package Total size: 13 k Downloading Packages: Running transaction check Transaction check succeeded. Running transaction test Transaction test succeeded. Running transaction Preparing : 1/1 Installing : TestC-1-1.noarch 1/3 Upgrading : TestA-2-1.modA.noarch 2/3 Cleanup : TestA-1-1.modA.noarch 3/3 Verifying : TestC-1-1.noarch 1/3 Verifying : TestA-2-1.modA.noarch 2/3 Verifying : TestA-1-1.modA.noarch 3/3 Installed: TestC.noarch 1-1 Upgraded: TestA.noarch 2-1.modA Complete! Notice that running "dnf module install ModuleB" works as expected and install the default stream.
I am not sure this is a bug. AFAIK for dependencies the modules are just enabled and rpm package relations are used for complete the requires. This doesn't mean any real profiles is being installed for the required module.
I see. But ModuleB is not even being enabled.
@QE: this scenario is covered by module-update-2.feature in the ci-dnf-stack test suite. Once this bug is resolved, please update/remove this scenario according to the expected functionality.
Yes, ModuleB's default stream should be enabled.
https://github.com/rpm-software-management/dnf/pull/1144
This bug appears to have been reported against 'rawhide' during the Fedora 29 development cycle. Changing version to '29'.