rules_pkg/tests/rpm
Mike Kelly ec08e7fccf
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.
2024-09-02 14:48:35 -04:00
..
source_date_epoch
tree_artifacts
BUILD rpm: Refine prefix matching for sub RPMs to reduce fragility (#879) 2024-09-02 14:48:35 -04:00
analysis_tests.bzl
make_rpm_test.py Add pkg_sub_rpm rule for RPM subpackages (#824) 2024-03-14 22:36:15 -04:00
pkg_rpm_basic_test.py Exclude release from filename when using release_file (#863) 2024-04-29 10:22:14 -04:00
rpm_util.py
template-test.spec.tpl
test.c Add support for generating debuginfo RPMs (#842) 2024-04-24 16:03:11 -04:00
test_debuginfo_rpm_contents.txt.golden Add support for generating debuginfo RPMs (#842) 2024-04-24 16:03:11 -04:00
test_rpm_dirs_contents.txt.golden
test_sub_rpm_contents.txt.golden rpm: Refine prefix matching for sub RPMs to reduce fragility (#879) 2024-09-02 14:48:35 -04:00
toolchain_tests.bzl