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

Fix case-insensitive finding of LICENSE.*.TXT (bsc#1215698) #1292

Merged
merged 3 commits into from
Oct 6, 2023

Conversation

mvidner
Copy link
Member

@mvidner mvidner commented Oct 3, 2023

Problem

"License Agreement" not shown in installer (maybe related to KVM??)

it turns out Ruby 3.1 drops the formerly working FNM_CASEFOLD for Dir.glob but it keeps working for File.fnmatch?

Solution

Implement a globbing method that avoids the dropped feature

Testing

  • Extended an existing test, checked that it fails/succeeds before/after fix

Screenshots

N/A

@mvidner
Copy link
Member Author

mvidner commented Oct 4, 2023

ah, I need to add FNM_EXTGLOB for brace expansion,
and add a casematching filename to the test data

usr/etc/YaST2/licenses/licenses_test_package/LICENSE.cz_CZ.TXT
to
usr/etc/YaST2/licenses/licenses_test_package/LICENSE.cz_CZ.txt
Ruby 3.1 drops the formerly working FNM_CASEFOLD for `Dir.glob`
but it keeps working for `File.fnmatch?`

For added fun, `glob` has brace expansion built in but `fnmatch?` needs
`FNM_EXTGLOB` for that.
@coveralls
Copy link

coveralls commented Oct 4, 2023

Coverage Status

coverage: 41.872% (+0.008%) from 41.864% when pulling e3b678e on broken-casefold into c443e4d on master.

@mvidner
Copy link
Member Author

mvidner commented Oct 4, 2023

ah, version+changelog missing

@mvidner mvidner marked this pull request as ready for review October 5, 2023 08:51
@mvidner mvidner merged commit e5c76d7 into master Oct 6, 2023
16 checks passed
@mvidner mvidner deleted the broken-casefold branch October 6, 2023 08:15
@mvidner
Copy link
Member Author

mvidner commented Oct 6, 2023

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants