Bug 1279185 - dnf searches in /etc/yum.repos.d/*.repo when using --installroot
Summary: dnf searches in /etc/yum.repos.d/*.repo when using --installroot
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: dnf
Version: 24
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Jaroslav Mracek
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Keywords: Reopened
: 1160612 1304887 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-11-08 13:29 UTC by Ali Akcaagac
Modified: 2016-10-04 19:14 UTC (History)
8 users (show)

(edit)
Clone Of:
(edit)
Last Closed: 2016-07-21 14:15:05 UTC


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Bugzilla 1163028 None None None Never

Internal Trackers: 1163028

Description Ali Akcaagac 2015-11-08 13:29:28 UTC
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 12:18:27 UTC
Thanks for the report. We'll take look.

Comment 2 Jaroslav Mracek 2016-01-13 08:57:46 UTC
This behavior is fixed by pull-request https://github.com/rpm-software-management/dnf/pull/428

Comment 3 Jaroslav Mracek 2016-01-13 14:53:36 UTC
*** Bug 1160612 has been marked as a duplicate of this bug. ***

Comment 4 Jaroslav Mracek 2016-02-15 14:30:09 UTC
*** Bug 1304887 has been marked as a duplicate of this bug. ***

Comment 5 Mike McCune 2016-03-28 23:16:15 UTC
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 18:26:23 UTC
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 18:37:41 UTC
Reopened.

Comment 8 Igor Gnatenko 2016-07-21 14:15:05 UTC
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.