-
Notifications
You must be signed in to change notification settings - Fork 179
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
rpm: Refine prefix matching for sub RPMs to reduce fragility (#879)
* rpm: Refine prefix matching for sub RPMs to reduce fragility The current prefix matching for sub RPMs can potentially fail in two ways: - if we have two overlapping prefixes we may match the shorter prefix against the wrong RPM - the shorter prefix will match repeatedly even after finding its target This change keeps track of which sub RPMs have already match so avoid double matching a shorter prefix. Additionally, we sort the sub RPM list by name length in reverse order. This ensures that we prefer to match the longest prefixes first and avoid double matching with the same prefix. * Expand subrpm test for similarly named RPMs This change expands the basic subrpm test to account for multiple subrpms that have matching prefixes.
- Loading branch information
Showing
3 changed files
with
38 additions
and
2 deletions.
There are no files selected for viewing
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
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
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