Bug 1781420
| Summary: | microdnf --disablerepo=* fails | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 8 | Reporter: | Derrick Ornelas <dornelas> |
| Component: | microdnf | Assignee: | Jaroslav Rohel <jrohel> |
| Status: | CLOSED ERRATA | QA Contact: | Radek Bíba <rbiba> |
| Severity: | medium | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 8.1 | CC: | ahogbin, amatej, dornelas, jrohel, lberton, rmahique, smccarty |
| Target Milestone: | rc | Keywords: | Triaged |
| Target Release: | --- | Flags: | pm-rhel:
mirror+
|
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | libdnf-0.39.1-3.el8 | Doc Type: | If docs needed, set a value |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2020-04-28 16:55:25 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: | 1186913 | ||
|
Description
Derrick Ornelas
2019-12-10 00:49:26 UTC
> Using '--disablerepo=*' with microdnf fails with the following error: Yes. Microdnf does not support wildcards in the "--enablerepo" and "--disablerepo" arguments. The libdnf library functions are used internally: - "dnf_context_repo_enable()" - "dnf_context_repo_disable()" So I prepared a patch with wildcards support for the libdnf library (into listed functions). PR https://github.com/rpm-software-management/libdnf/pull/863 Note:
> With microdnf v2, all repos were disabled by default, and any repos you wanted to use had to be explicitly enabled.
I can't reproduce the statement. Are you sure that the "rhel-7-server-rpms" repository was not disabled in configuration file? (Maybe there is a change of default settings of the distributed repository.)
Example:
I tried 3 tests:
# podman run --rm -ti registry.access.redhat.com/ubi7-minimal bash
bash-4.2# microdnf install libpcap
# podman run --rm -ti registry.access.redhat.com/ubi7-minimal bash
bash-4.2# microdnf --enablerepo=ubi-7 install libpcap
# podman run --rm -ti registry.access.redhat.com/ubi7-minimal bash
bash-4.2# microdnf --enablerepo=ubi-7-server-optional-rpms install libpcap
The "libpcap" was allways installed until I disabled "ubi-7" repository (--disablerepo=ubi-7).
(In reply to Jaroslav Rohel from comment #2) > Note: > > With microdnf v2, all repos were disabled by default, and any repos you wanted to use had to be explicitly enabled. > > I can't reproduce the statement. Are you sure that the "rhel-7-server-rpms" > repository was not disabled in configuration file? (Maybe there is a change > of default settings of the distributed repository.) > > Example: > I tried 3 tests: > # podman run --rm -ti registry.access.redhat.com/ubi7-minimal bash > bash-4.2# microdnf install libpcap > > # podman run --rm -ti registry.access.redhat.com/ubi7-minimal bash > bash-4.2# microdnf --enablerepo=ubi-7 install libpcap > > # podman run --rm -ti registry.access.redhat.com/ubi7-minimal bash > bash-4.2# microdnf --enablerepo=ubi-7-server-optional-rpms install libpcap > > The "libpcap" was allways installed until I disabled "ubi-7" repository > (--disablerepo=ubi-7). Sorry I wasn't more clear. The "ubi-7" repo is statically defined in /etc/yum.repos.d/ubi.repo which is baked into all UBI7 images. It will always be enabled, as will a few other repos. We always want these repos enabled so that users can easily get updates for the packages that are pre-installed in the image. Here's the default repo list: # podman run --rm -ti registry.access.redhat.com/ubi7-minimal bash bash-4.2# awk '/^\[/{nr[NR]; nr[NR+3]; print '\n'}; NR in nr' /etc/yum.repos.d/ubi.repo [ubi-7] enabled = 1 [ubi-7-server-debug-rpms] enabled = 0 [ubi-7-server-source-rpms] enabled = 0 [ubi-7-server-optional-rpms] enabled = 1 [ubi-7-server-optional-debug-rpms] enabled = 0 [ubi-7-server-optional-source-rpms] enabled = 0 [ubi-7-server-extras-rpms] enabled = 1 [ubi-7-server-extras-debug-rpms] enabled = 0 [ubi-7-server-extras-source-rpms] enabled = 0 [ubi-7-rhah] enabled = 1 [ubi-7-rhah-debug] enabled = 0 [ubi-7-rhah-source] enabled = 0 [ubi-server-rhscl-7-rpms] enabled = 1 [ubi-server-rhscl-7-debug-rpms] enabled = 0 [ubi-server-rhscl-7-source-rpms] enabled = 0 [ubi-7-server-devtools-rpms] enabled = 1 [ubi-7-server-devtools-debug-rpms] enabled = 0 [ubi-7-server-devtools-source-rpms] enabled = 0 When /etc/yum.repos.d/redhat.repo is dynamically created after running microdnf for the first time all of the Red Hat repos are defined as disabled: bash-4.2# cat /etc/yum.repos.d/redhat.repo cat: /etc/yum.repos.d/redhat.repo: No such file or directory bash-4.2# microdnf This is microdnf, which implements subset of `dnf'. Usage: microdnf [OPTION?] COMMAND [...] error: No command specified bash-4.2# grep "enabled=" /etc/yum.repos.d/redhat.repo | sort | uniq -c 969 enabled=false The large number of repos is caused by using a Red Hat Employee subscription for this test, but I don't think that has any other effect on this test. I prepared CI tests. PR https://github.com/rpm-software-management/ci-dnf-stack/pull/734 PRs are merged in upstream. https://github.com/rpm-software-management/libdnf/pull/863 CI tests https://github.com/rpm-software-management/ci-dnf-stack/pull/734 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. https://access.redhat.com/errata/RHEA-2020:1855 |