Skip to content
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

/etc/portage/* content parsing doesn't force sorting for ordering of file loading. #385

Closed
ferringb opened this issue Dec 25, 2022 · 1 comment
Assignees
Labels

Comments

@ferringb
Copy link
Contributor

Package.use in particular is affected by this. Currently pkgcore/ebuild/domain's load_property invokes livefs iter_scan to get the list of files; that returns whatever ordering the underlying FS uses.

That in turn can lead to situations where a 00_* package.use files isn't used as the base for files that follow, leading to incorrect USE stacking.

TL;DR: force ordering here. Portage's logic for this appears to just be a straight up sort, and I can't see any fault w/ doing the same.

@ferringb ferringb added the bug label Dec 25, 2022
@ferringb ferringb self-assigned this Dec 25, 2022
@ferringb ferringb changed the title /etc/portage/* content parsing doesn't force sorting on file loading. /etc/portage/* content parsing doesn't force sorting for ordering of file loading. Dec 25, 2022
@ferringb
Copy link
Contributor Author

As to the fix for this; it should just be a matter of using sorted_scan, but some double checking + tests are warranted.

ferringb added a commit to ferringb/pkgcore that referenced this issue Dec 26, 2022
Specifically, alphanumeric sorting; a '00' should always be
parsed before an '01' or 'a'.

The ordering must be stable so that globals- in a 00 file- can
be overridden per package via other files.  If there is no stable
ordering forced on how the order of files read, then this isn't supported.

Closes pkgcore#385

Signed-off-by: Brian Harring <ferringb@gmail.com>
ferringb added a commit to ferringb/pkgcore that referenced this issue Dec 26, 2022
Specifically, alphanumeric sorting; a '00' should always be
parsed before an '01' or 'a'.

The ordering must be stable so that globals- in a 00 file- can
be overridden per package via other files.  If there is no stable
ordering forced on how the order of files read, then this isn't supported.

Closes pkgcore#385

Signed-off-by: Brian Harring <ferringb@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant