Bug 1565815 - [modularity] module and dependency enabled despite rejected install
Summary: [modularity] module and dependency enabled despite rejected install
Alias: None
Product: Fedora
Classification: Fedora
Component: dnf
Version: 28
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
Assignee: Martin Hatina
QA Contact: Fedora Extras Quality Assurance
Depends On:
Blocks: 1478068 dnf-f28
TreeView+ depends on / blocked
Reported: 2018-04-10 20:16 UTC by Merlin Mathesius
Modified: 2018-04-20 05:08 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed: 2018-04-20 05:08:59 UTC
Type: Bug

Attachments (Terms of Use)

Description Merlin Mathesius 2018-04-10 20:16:14 UTC
Description of problem:
Some failed module installs may leave modules and their dependencies enabled.

Version-Release number of selected component (if applicable):
dnf-2.7.5-8.fc28.noarch, dnf-2.7.5-9.fc28.noarch

How reproducible:

Steps to Reproduce:
1. fresh VM or container running Fedora-Server-28-x86_64-20180407.n.0
2. dnf module list --enabled # no modules enabled
3. dnf --assumeno module install reviewboard:2.5 # rejected because no profile specified
4. dnf module list --enabled

Actual results:
reviewboard:2.5 and django:1.6 (a dependency) modules have been enabled

Expected results:
No modules enabled as a result of rejected transaction.

Additional info:
Running `dnf --assumeno module install reviewboard:2.5/default` as step 3 above is also rejected, but does not enable any modules

Comment 1 Martin Hatina 2018-04-11 10:39:40 UTC
I am not able to reproduce the issue, but I have applied changes from https://github.com/rpm-software-management/dnf/pull/1054, which fixes dnf to use 'default' profile as last resort profile.


Feel free to re-open if you think this needs to be investigated more.

Comment 2 Merlin Mathesius 2018-04-12 19:57:49 UTC
I re-tested using your patched dnf (thank you!), and ran into a different issue.

Steps to Reproduce:
1. fresh container based on docker.io/fedora:28 (or other current F28 VM/container) with latest F28 updates, fedora-repos-modular enabled, and your patched dnf
2. dnf module list --enabled # no modules enabled
3. dnf -y module install reviewboard:2.5

Actual results:
Fails with error: 
 Problem: conflicting requests
  - nothing provides python2-django(abi) = 1.6 needed by ReviewBoard-2.5.17-17.module_d032b812.noarch

Expected results:
django:1.6 should be auto-enabled (since it is explicitly listed as a runtime requires for reviewboard:2.5) and successful installation of reviewboard:2.5/default.

Additional info:
The rejected module install doesn't leave any modules enabled. That's good.

Also, if the system configuration has the default stream for django set to 1.6 (eg., "echo -e '[django]\nname=django\nstream=1.6' > /etc/dnf/modules.defaults.d/app.defaults"), "dnf -y module install reviewboard:2.5" is successful. But this should not be necessary.

Comment 3 Martin Hatina 2018-04-13 09:02:50 UTC
Hi, can you run 'dnf module enable reviewboard:2.5' and provide output of 'dnf module list'? Thank you.

Comment 4 Merlin Mathesius 2018-04-13 13:01:55 UTC
[root@a01ccbf84390 /]# rpm -q dnf
[root@a01ccbf84390 /]# dnf module enable reviewboard:2.5
Fedora Modular 28 - x86_64=-=Test=Updates=-   ] 176 kB/s | 400 kB     00:02 ETA
Last metadata expiration check: 0:00:00 ago on Fri Apr 13 12:57:52 2018.
'reviewboard:2.5' is enabled
[root@a01ccbf84390 /]# dnf module list
Last metadata expiration check: 0:00:15 ago on Fri Apr 13 12:57:52 2018.
Fedora Modular 28 - x86_64
Name		    Stream     Version		 Profiles
nodejs		    6	       20180308155546	 default, development, ...
nodejs		    9	       20180308142225	 default, development, ...
reviewboard	    2.5 [e]    20180206144254	 default, server

Fedora Modular 28 - x86_64 - Test Updates
Name		    Stream     Version		 Profiles
ant		    1.10       20180411122322	 default
container-tools	    2017.0     20180313063358	 default
cri-o		    2017.0     20180313134242	 default
django		    1.6	       20180328170906	 default, python2_development
docker		    2017.0     20180314032736	 default
flatpak-runtime	    f28	       20180307202408	 buildroot, runtime, ...
golang		    1.10       20180327174614	 default
golang-ecosystem    2017.0     20180312141905	 default
maven		    3.5	       20180411112402	 default
maven		    master     20180406164508	 default
nodejs		    8	       20180328183715	 default, development, ...
reviewboard	    3.0	       20180411170047	 default, server

Hint: [d]efault, [e]nabled, [i]nstalled, [l]ocked
[root@a01ccbf84390 /]#

Comment 6 Merlin Mathesius 2018-04-16 17:17:31 UTC
dnf-2.7.5-19.fc28.modularity.1.3fb9e5c.git.8118.7bc81fe from COPR corrects the originally reported problem and the auto-enablement issue.

Anxiously awaiting the proper Fedora release of the fixes.

Comment 7 Merlin Mathesius 2018-04-17 15:35:33 UTC
I have confirmed these problems are fixed with dnf-2.7.5-11.fc28--which was just submitted to Fedora Test Updates.

Note You need to log in before you can comment on or make changes to this bug.