Bug 1506486
| Summary: | [modularity] rpm install doesn't follow package versions from a locked module | ||
|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | Karel Srot <ksrot> |
| Component: | dnf | Assignee: | Martin Hatina <mhatina> |
| Status: | CLOSED RAWHIDE | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
| Severity: | high | Docs Contact: | |
| Priority: | medium | ||
| Version: | 27 | CC: | dmach, extras-qa, jmracek, mhatina, packaging-team-maint, rpm-software-management, vmukhame |
| Target Milestone: | --- | Keywords: | Triaged |
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | If docs needed, set a value | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2018-03-13 08:03:38 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
| Bug Depends On: | |||
| Bug Blocks: | 1478068 | ||
tested with dnf-2.6.3-1.fc26.noarch
shell.command.stderr:
Traceback (most recent call last):
File "/usr/bin/dnf-3", line 58, in <module>
main.user_main(sys.argv[1:], exit_code=True)
File "/usr/lib/python3.6/site-packages/dnf/cli/main.py", line 179, in user_main
errcode = main(args)
File "/usr/lib/python3.6/site-packages/dnf/cli/main.py", line 64, in main
return _main(base, args, cli_class, option_parser_class)
File "/usr/lib/python3.6/site-packages/dnf/cli/main.py", line 99, in _main
return cli_run(cli, base)
File "/usr/lib/python3.6/site-packages/dnf/cli/main.py", line 115, in cli_run
cli.run()
File "/usr/lib/python3.6/site-packages/dnf/cli/cli.py", line 1012, in run
self._process_demands()
File "/usr/lib/python3.6/site-packages/dnf/cli/cli.py", line 765, in _process_demands
load_available_repos=self.demands.available_repos)
File "/usr/lib/python3.6/site-packages/dnf/base.py", line 403, in fill_sack
self._setup_modules()
File "/usr/lib/python3.6/site-packages/dnf/base.py", line 198, in _setup_modules
self.use_module_includes()
File "/usr/lib/python3.6/site-packages/dnf/base.py", line 226, in use_module_includes
self.sack.set_use_includes(True, repo.id)
ValueError: Can't set use_includes for repo with given name.
sorry, dnf version should be dnf-2.7.5-8.fc26.modularity.1.3fb9e5c.git.8060.7666758None.noarch (In reply to Karel Srot from comment #3) > sorry, dnf version should be > dnf-2.7.5-8.fc26.modularity.1.3fb9e5c.git.8060.7666758None.noarch I don't know where you've got this version... Latest version in F27 Modular Server is dnf-2.7.3-1.module_76d0cc8b.modularity.2.7493ec8 module_deadbeef part can be different, but that's a different story. https://github.com/rpm-software-management/dnf/commit/b5ba9b6ded63be94c1d109ca81ddceb72801694f I've cherry-picked patch from master branch to fix this particular bug. (In reply to Igor Gnatenko from comment #4) > (In reply to Karel Srot from comment #3) > > sorry, dnf version should be > > dnf-2.7.5-8.fc26.modularity.1.3fb9e5c.git.8060.7666758None.noarch > > I don't know where you've got this version... Latest version in F27 Modular > Server is dnf-2.7.3-1.module_76d0cc8b.modularity.2.7493ec8 > > module_deadbeef part can be different, but that's a different story. https://copr.fedorainfracloud.org/coprs/mhatina/dnf-modularity-nightly/build/654735/ We agreed to take latest copr builds if they are newer than what's in fedora-testing. Tested with dnf-2.7.5-10.fc26.modularity.1.3fb9e5c.git.8068.798b9b1None.noarch The traceback is gone, however still failing. I have forgot to list some setup steps, complete scenario is as follows:
Given I successfully run "dnf module enable ModuleA:f26"
And I successfully run "dnf module install -y ModuleA:f26:1/minimal"
And I successfully run "dnf module lock ModuleA"
When I save rpmdb
And I successfully run "dnf install -y TestC"
Then rpmdb changes are
| State | Packages |
| installed | TestC/1-1.modA |
However TestC-1-2 is being installed as the package set is locked just to a stream but not a stream version.
The issue is solved by dnf-3.0.1-1 that was released into rawhide. |
TestC-1-2.modA was installed while TestC-1-1.modA was expected due to a locked module profile version. Scenario: Having a locked module:stream I can still install and remove rpms for a locked profile version # behave/module-lock-unlock-2-dnf-3.feature:32 When I save rpmdb # behave/steps/rpm_steps.py:16 And I successfully run "dnf install -y TestC" # behave/steps/command_steps.py:34 And I successfully run "dnf remove --assumeyes TestD" # behave/steps/command_steps.py:34 Then rpmdb changes are # behave/steps/rpm_steps.py:24 | State | Packages | | installed | TestC/1-1.modA | | removed | TestD | Assertion Failed: Element counts were not equal: First has 0, Second has 1: u'TestC-1-2.modA.noarch'