Bug 1468302
Summary: | 'rpm-ostree install' not respecting disabled repos | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 7 | Reporter: | Micah Abbott <miabbott> |
Component: | rpm-ostree-client | Assignee: | Colin Walters <walters> |
Status: | CLOSED ERRATA | QA Contact: | atomic-bugs <atomic-bugs> |
Severity: | unspecified | Docs Contact: | |
Priority: | unspecified | ||
Version: | 7.4 | CC: | jlebon, rhughes, salmy |
Target Milestone: | rc | Keywords: | Extras |
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: | 2017-08-01 23:48:29 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: |
Description
Micah Abbott
2017-07-06 15:56:07 UTC
There are two causes to this. First, this ancient commit: https://github.com/rpm-software-management/libdnf/commit/f754f5803b5553857a2e3fe875ca1273adcac095 for some reason introduces hardcoded behavior where *every* repo in a `redhat.repo` file is explicitly forced on to enable metadata. Then, much later: https://github.com/projectatomic/rpm-ostree/pull/736 caused us to start actually honoring that flag. I don't offhand know why we're forcing on enabled metadata. Is that really necessary? For now, I propose this for RHELAH 7.4: From 133b7585854858e96e6861b75bf8509e65341d3e Mon Sep 17 00:00:00 2001 From: Colin Walters <walters> Date: Thu, 6 Jul 2017 14:14:27 -0400 Subject: [PATCH] repo: Remove redhat.repo special case https://bugzilla.redhat.com/show_bug.cgi?id=1468302 --- libdnf/dnf-repo.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/libdnf/dnf-repo.c b/libdnf/dnf-repo.c index cb5fce8..3da74d0 100644 --- a/libdnf/dnf-repo.c +++ b/libdnf/dnf-repo.c @@ -1018,11 +1018,6 @@ dnf_repo_setup(DnfRepo *repo, GError **error) if (g_key_file_has_key(priv->keyfile, priv->id, "enabled_metadata", NULL)) { if (dnf_repo_get_boolean(priv->keyfile, priv->id, "enabled_metadata", NULL)) enabled |= DNF_REPO_ENABLED_METADATA; - } else { - g_autofree gchar *basename = g_path_get_basename(priv->filename); - /* special case the satellite and subscription manager repo */ - if (g_strcmp0(basename, "redhat.repo") == 0) - enabled |= DNF_REPO_ENABLED_METADATA; } dnf_repo_set_enabled(repo, enabled); -- 2.13.2 @hughsie: Do you remember why that code exists? Wait, I'm confused. That PR is doing what we want right? It's filtering by DNF_REPO_ENABLED_PACKAGES rather than METADATA. /me looks at source Ahh, looks like this was changed in https://github.com/projectatomic/rpm-ostree/pull/791 to also look for METADATA repos. So I think what we want is https://github.com/projectatomic/rpm-ostree/pull/863 instead, right? Verified in rpm-ostree-client-2017.6-5.atomic.el7.x86_64 # rpm -q rpm-ostree-client rpm-ostree-client-2017.6-5.atomic.el7.x86_64 # subscription-manager repos --list-enabled +----------------------------------------------------------+ Available Repositories in /etc/yum.repos.d/redhat.repo +----------------------------------------------------------+ Repo ID: rhel-7-server-extras-rpms Repo Name: Red Hat Enterprise Linux 7 Server - Extras (RPMs) Repo URL: https://cdn.redhat.com/content/dist/rhel/server/7/7Server/$basearch/extras/os Enabled: 1 Repo ID: rhel-7-server-rpms Repo Name: Red Hat Enterprise Linux 7 Server (RPMs) Repo URL: https://cdn.redhat.com/content/dist/rhel/server/7/$releasever/$basearch/os Enabled: 1 Repo ID: rhel-7-server-optional-rpms Repo Name: Red Hat Enterprise Linux 7 Server - Optional (RPMs) Repo URL: https://cdn.redhat.com/content/dist/rhel/server/7/$releasever/$basearch/optional/os Enabled: 1 # rpm-ostree install httpd Checking out tree 8018f95... done Enabled rpm-md repositories: epel rhel-7-server-extras-rpms rhel-7-server-rpms rhel-7-server-optional-rpms Updating metadata for 'epel': [============================] 100% rpm-md repo 'epel'; generated: 2017-07-09 03:46:59 Updating metadata for 'rhel-7-server-extras-rpms': [==============================] 100% rpm-md repo 'rhel-7-server-extras-rpms'; generated: 2017-07-04 09:24:58 Updating metadata for 'rhel-7-server-rpms': [==============================] 100% rpm-md repo 'rhel-7-server-rpms'; generated: 2017-07-05 09:16:57 Updating metadata for 'rhel-7-server-optional-rpms': [=============================] 100% rpm-md repo 'rhel-7-server-optional-rpms'; generated: 2017-07-05 07:23:20 Importing metadata [=============================] 100% Resolving dependencies... done Will download: 5 packages (1.5 MB) Downloading from rhel-7-server-rpms: [====================================] 100% Importing: [==================================] 100% Overlaying... done Writing rpmdb... done Writing OSTree commit... done Copying /etc changes: 31 modified, 4 removed, 115 added Transaction complete; bootconfig swap: no deployment count change: 0 Freed objects: 15.4 kB Added: apr-1.4.8-3.el7.x86_64 apr-util-1.5.2-6.el7.x86_64 httpd-2.4.6-45.el7_3.4.x86_64 httpd-tools-2.4.6-45.el7_3.4.x86_64 mailcap-2.1.41-2.el7.noarch Run "systemctl reboot" to start a reboot (In reply to Colin Walters from comment #4) > @hughsie: Do you remember why that code exists? It makes subscription manager work, as the repo is always disabled and we can't modify the project to write a modified redhat.repo file. @hughsie: Let's take this upstream: https://github.com/rpm-software-management/libdnf/issues/306 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/RHBA-2017:2396 |