From 9aa9586fc4153ca1a6e027bf9f342fd35a52e0b9 Mon Sep 17 00:00:00 2001 From: Jon Turney Date: Thu, 18 Jan 2024 20:50:18 +0000 Subject: Anchor nonexistent_provides at the end Anchor the nonexistent_provides regex at the end, so it matches the whole provide name, avoiding unpleasant surprises. --- calm/package.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/calm/package.py b/calm/package.py index f70fb98..552a2f3 100755 --- a/calm/package.py +++ b/calm/package.py @@ -738,7 +738,7 @@ def validate_packages(args, packages, valid_provides_extra=None, missing_obsolet # all packages listed in a hint must exist (unless the # disable-check option says that's ok) - if (r not in valid) and (r not in past_mistakes.expired_provides) and (not any(re.match(nep, r) for nep in past_mistakes.nonexistent_provides)): + if (r not in valid) and (r not in past_mistakes.expired_provides) and (not any(re.match(nep + r'$', r) for nep in past_mistakes.nonexistent_provides)): if okmissing not in getattr(args, 'disable_check', []): logging.error("package '%s' version '%s' %s: '%s', but nothing satisfies that" % (p, v, c, r)) error = True -- cgit v1.2.3