-
Notifications
You must be signed in to change notification settings - Fork 414
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
repo: Improve *.repo config path ordering to fix a comps merging issue #1734
repo: Improve *.repo config path ordering to fix a comps merging issue #1734
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Otherwise LGTM. Consider also fixing the PEP8 issues.
Also I think the comps merging order is worth the CI stack test. |
018a6ae
to
a221f76
Compare
|
Remove the '.repo' suffix to exclude it from the sort key. Also split the paths into lists to exclude '/' from the sort key. =changelog= msg: Improve repo config path ordering to fix a comps merging issue resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1928181
a221f76
to
f8b0a7f
Compare
This patch fixes the original problem in anaconda: |
@@ -42,8 +43,16 @@ def __iter__(self): | |||
yield r | |||
|
|||
# read .repo files from directories specified by conf.reposdir | |||
for repofn in (repofn for reposdir in self.conf.reposdir | |||
for repofn in sorted(glob.glob('{}/*.repo'.format(reposdir)))): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for rewriting this! I really hate generators with multiple nested for cycles in them.
Remove the '.repo' suffix to exclude it from the sort key.
Also split the paths into lists to exclude '/' from the sort key.
=changelog=
msg: Improve repo config path ordering to fix a comps merging issue
resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1928181