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: allow underscore in package nevr regex #325

Merged
merged 1 commit into from
Aug 10, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion convert2rhel/pkghandler.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ def get_problematic_pkgs(output, excluded_pkgs=set()):
loggerinst.info("Found protected packages: %s" % set(protected))
problematic_pkgs["protected"] = set(protected) - excluded_pkgs

package_nevr_re = r"[0-9]*:?([a-z][a-z0-9-]*?)-[0-9]"
package_nevr_re = r"[0-9]*:?([a-z][a-z0-9-_]*?)-[0-9]"
deps = re.findall("Error: Package: %s" % package_nevr_re, output, re.MULTILINE)
if deps:
loggerinst.info("Found packages causing dependency errors: %s" % set(deps))
Expand Down
10 changes: 9 additions & 1 deletion convert2rhel/unit_tests/pkghandler_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -312,6 +312,8 @@ def test_get_problematic_pkgs(self):
self.assertIn("libreport-plugin-rhtsupport", error_pkgs["required"])
self.assertIn("python2-hawkey", error_pkgs["all"])
self.assertIn("python2-hawkey", error_pkgs["required"])
self.assertIn("mod_ldap", error_pkgs["all"])
self.assertIn("mod_ldap", error_pkgs["errors"])
self.assertIn("redhat-lsb-trialuse", error_pkgs["all"])
self.assertIn("redhat-lsb-trialuse", error_pkgs["errors"])
self.assertIn("redhat-lsb-core", error_pkgs["all"])
Expand Down Expand Up @@ -1398,7 +1400,13 @@ def test_fix_default_kernel_with_no_incorrect_kernel(self):
Downgraded By: redhat-lsb-core-4.1-27.el7.x86_64 (rhel-7-server-rpms)
redhat-lsb-core(x86-64) = 4.1-27.el7
Available: redhat-lsb-core-4.1-24.el7.x86_64 (rhel-7-server-rpms)
redhat-lsb-core(x86-64) = 4.1-24.el7"""
redhat-lsb-core(x86-64) = 4.1-24.el7
Error: Package: mod_ldap-2.1.11-34.el7.x86_64 (rhel-7-server-rpms)
Requires: python2_hawkey >= 0.7.0
Removing: python2_hawkey-0.22.5-2.el7_9.x86_64 (@extras/7)
python2_hawkey = 0.22.5-2.el7_9
Downgraded By: python2_hawkey-0.6.3-4.el7.x86_64 (rhel-7-server-rpms)
python2_hawkey = 0.6.3-4.el7"""

YUM_MULTILIB_ERROR = """
Error: Protected multilib versions: 2:p11-kit-0.18.7-1.fc19.i686 != p11-kit-0.18.3-1.fc19.x86_64
Expand Down