Bug 1279185 - dnf searches in /etc/yum.repos.d/*.repo when using --installroot
dnf searches in /etc/yum.repos.d/*.repo when using --installroot
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: dnf (Show other bugs)
24
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Jaroslav Mracek
Fedora Extras Quality Assurance
: Reopened
: 1160612 1304887 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-11-08 08:29 EST by Ali Akcaagac
Modified: 2016-10-04 15:14 EDT (History)
8 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-07-21 10:15:05 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Ali Akcaagac 2015-11-08 08:29:28 EST
I hit a strange behaviour, when using dnf with the --installroot option.

To explain it better, let's use yum for this example:

yum update --installroot=/<somepath>

When issuing this command, the following happens:

1) yum uses the repo files located in /<somepath>/etc/yum.repos.d/.*repo
2) yum uses the cache of /<somepath>/cache/yum.... to store the metadata
3) yum uses the cache of /<somepath>/cache/yum.... to store updated nevra
4) yum uses the cache of /<somepath>/lib/yumdb... to store the db entries

With other words, using --installroot does a full context switch (as I explain it) to a different "root". Not touching the underlaying systems yum.repos.d etc.

This has the advantage, that I can use the real host system (the true one in /) to update a different system (one for systems integration, different updates or other related tasks) in --installroot (which of course can have other .*repo files, other activated ones or disabled ones or other added ones.

When using dnf otoh, it does only steps 2 - 4... sadly dnf searches in the true / (root) directory for repo files. Thus ignoring the repo files found in /<somepath>/yum.repos.d/*.repo.

Temporarely (and contradicting to yum) I have to temporarely copy over the files found in /<somepath>/yum.repos.d/.*repo to /etc/yum.repos.d/ whenever issuing the --installroot command.

With other words... dnf is not correctly switching the context ... when I intend dealing with a different --installroot, then I not only want to store the metadata, cache, downloaded nevra in the installroot but also use the repo files found in the installroots /etc/yum.repos.d directory.
Comment 1 Honza Silhan 2015-11-18 07:18:27 EST
Thanks for the report. We'll take look.
Comment 2 Jaroslav Mracek 2016-01-13 03:57:46 EST
This behavior is fixed by pull-request https://github.com/rpm-software-management/dnf/pull/428
Comment 3 Jaroslav Mracek 2016-01-13 09:53:36 EST
*** Bug 1160612 has been marked as a duplicate of this bug. ***
Comment 4 Jaroslav Mracek 2016-02-15 09:30:09 EST
*** Bug 1304887 has been marked as a duplicate of this bug. ***
Comment 5 Mike McCune 2016-03-28 19:16:15 EDT
This bug was accidentally moved from POST to MODIFIED via an error in automation, please see mmccune@redhat.com with any questions
Comment 6 Fedora End Of Life 2016-07-19 14:26:23 EDT
Fedora 22 changed to end-of-life (EOL) status on 2016-07-19. Fedora 22 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.
Comment 7 Ali Akcaagac 2016-07-19 14:37:41 EDT
Reopened.
Comment 8 Igor Gnatenko 2016-07-21 10:15:05 EDT
Fixed as part of DNF 2.0 which will be available at some point in the near future.

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