Description of problem:
yum can't install modularized content into user specified install root because of missing /etc/os-release in the install root. IMO, the file shall be read from the standard location, if not found in the destination.
# yum --installroot=/var/tmp/tmp.FPC0jWdbj7 --nogpg install postgresql-server -y
Unable to detect release version (use '--releasever' to specify release version)
Updating Subscription Management repositories.
Detection of Platform Module failed: Cannot open file: /var/tmp/tmp.FPC0jWdbj7/etc/os-release
Modular dependency problems:
Problem 1: conflicting requests
- nothing provides module(platform:el8) needed by module subversion:1.10:820181215112250:a51370e3-0.x86_64
Problem 2: conflicting requests
- nothing provides module(platform:el8) needed by module idm:client:820181214203528:49cc9d1b-0.x86_64
Problem 40: conflicting requests
- nothing provides module(platform:el8) needed by module perl-YAML:1.24:820181214175558:8652dbeb-0.x86_64
- nothing provides module(platform:el8) needed by module perl-YAML:1.24:820181214175558:7c757546-0.x86_64
No match for argument: postgresql-server
Error: Unable to find a match
Installing of non-module components works as expected.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
Workaround: copy /etc/os-release to the install root
I was instructed that there is --setopt=module_platform_id=platform:el8 option allowing instalation of modularized content into install root. Tried, tested - it works. It is documented but the mention is hidden in the huge man page. So hint in case of this failure (similar to --allowerasing / --skip-broken hints in case of package transaction problem) could help a great deal and would be enough as a fix for this bug.
I created a patch (https://github.com/rpm-software-management/dnf/pull/1355) that provides a hint how to set up the platform module.
I believe that the issue is solved by changed detection of module_platform_id. Now it is taken from available package that provides a system-release.
(In reply to Jaroslav Mracek from comment #3)
> I believe that the issue is solved by changed detection of
> module_platform_id. Now it is taken from available package that provides a
could you please provide more details on how this is supposed to work? Thank you.
Found the answer here https://github.com/rpm-software-management/libdnf/pull/712
However bug 1698942 is not fixed and thus the detection capabilities are limited.
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory, and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.