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

Translate Perl version dependencies #1342

Merged
merged 1 commit into from Jun 15, 2017

Conversation

@rjbell4
Copy link
Contributor

rjbell4 commented Jun 5, 2017

Some CPAN modules have things like use 5.008001, which shows up in their dependencies. However, that's not the version format used by the perl RPMs, which would be 5.8.1 (or newer). This detects such situations and re-formats the version string.

@@ -150,6 +150,10 @@ def input(package)
found_dependencies.each do |dep_name, version|
# Special case for representing perl core as a version.
if dep_name == "perl"
m = version.match(/^(\d)\.(\d{3})(\d{3})$/)
if m
version = m[1] + '.' + m[2].sub(/^0*/, '') + '.' + m[3].sub(/^0*/, '')

This comment has been minimized.

Copy link
@jordansissel

jordansissel Jun 5, 2017

Owner

will this work for all target packages? or just rpm?

If it focuses specific to rpm, then I think this can be added to the converted_from method in rpm.rb instead? Thoughts?

This comment has been minimized.

Copy link
@rjbell4

rjbell4 Jun 5, 2017

Author Contributor

Well, I have a bit of ignorance here, but my Ubuntu machine has Perl 5.22.2 installed, not 5.022002, and I would presume that a comparison of similar x.y.z versions would be better there, as well.

This comment has been minimized.

Copy link
@jordansissel

jordansissel Jun 15, 2017

Owner

ehh. I'm uncertain but willing to try this.

@jordansissel jordansissel merged commit b13f2f0 into jordansissel:master Jun 15, 2017
1 check passed
1 check passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.