Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
versionlock: Fix wildcards handling in
add
command
There’s a bug in how the `dnf5 versionlock add <spec>` command handles package specifications when the `spec` contains a wildcard and matches multiple package names with the same version (EVR). In such cases, only the first package is considered, while the rest are quietly skipped. For example there are three packages matching 'aws-checksums*' pattern, but only one is actually locked: ❯ dnf repoquery 'aws-checksums*' Repositories loaded. aws-checksums-0:0.2.2-1.fc40.i686 aws-checksums-0:0.2.2-1.fc40.x86_64 aws-checksums-devel-0:0.2.2-1.fc40.i686 aws-checksums-devel-0:0.2.2-1.fc40.x86_64 aws-checksums-libs-0:0.2.2-1.fc40.i686 aws-checksums-libs-0:0.2.2-1.fc40.x86_64 ❯ dnf versionlock add 'aws-checksums*' Repositories loaded. Adding versionlock on "aws-checksums = 0.2.2-1.fc40". With this patch, each group of packages with the same name is handled separately, ensuring that all the packages are correctly locked: ❯ dnf5 versionlock add 'aws-checksums*' Repositories loaded. Adding versionlock on "aws-checksums = 0.2.2-1.fc40". Adding versionlock on "aws-checksums-devel = 0.2.2-1.fc40". Adding versionlock on "aws-checksums-libs = 0.2.2-1.fc40". For: #1895
- Loading branch information