-
Notifications
You must be signed in to change notification settings - Fork 375
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
Convert rpmrc data structures to STL #3489
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Our test-suite currently always runs on x86_64, so we can make some assumptions here. We can't test exact values though, because we don't know what kind of hardware it might execute on, giving different values for the different x86_64_v* levels. So just test that the relative values makes sense.
Argh, of course /etc/rpm/platform location depends on the cmake prefix, which differs between CI and my local build, that's why the test fails. Guess that'll have to wait to next week... |
There are various places that need this, the next test being just one of them.
We don't want to maintain a set of duplicate macro values in the test-suite so trim the --showrc output to the start where the arch/os/rpmrc stuff is.
This was maintained as an dynamic array with brute-force lookup, but the actual use-case is a simple string:string map.
This was maintained as an dynamic array with brute-force lookup, but the actual use-case is a simple string:string map.
This should really just use an map of some sort instead of a vector, but the search is case insensitive so punting dealing with that to some other time.
Beneath all the C tedium, it's really just a simple map to a struct that has a further embedded array.
The old code seemed to support variables that are not arch specific, but none of such items are left so we don't need to care about that case. So we might as well use { var, arch } as the key, but that is annoying in a different way.
Wasn't that bad afterall, and we'll need ede6ec2 for various other purposes too. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fun times. There's plenty of room for further cleanup + improvement, but this is plenty for one review...