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

URL quoting to fix "ERROR: Cannot find the tarball for perl-$version" #669

Merged
merged 1 commit into from Oct 23, 2019

Conversation

@rage311
Copy link
Contributor

rage311 commented May 22, 2019

When trying to install the new perl-5.30.0 release with Perlbrew, I got the error: ERROR: Cannot find the tarball for perl-5.30.0. I tracked down the issue and discovered that the metacpan API URL was being passed to curl to be run directly in the shell. The shell breaks the URL argument at the &, interpreting it as the shell built-in instead of the URL query param syntax, and erroneously returned a result for the query https://fastapi.metacpan.org/v1/release/_search?size=1 (instead of https://fastapi.metacpan.org/v1/release/_search?size=1&q=name:perl-5.30.0), producing a result for a different package altogether, and subsequently making the perl version regex match fail.

The fix was to simply pass in the URL with embedded quotes to http_get.

@coveralls

This comment has been minimized.

Copy link

coveralls commented May 22, 2019

Coverage Status

Coverage remained the same at 85.323% when pulling 0b3573f on rage311:develop into ddbd141 on gugod:develop.

@coveralls

This comment has been minimized.

Copy link

coveralls commented May 22, 2019

Coverage Status

Coverage remained the same at 85.323% when pulling 9b2a49c on rage311:develop into 0ca4d4e on gugod:develop.

@gugod

This comment has been minimized.

Copy link
Owner

gugod commented Jun 21, 2019

@rage311 it looks like you are modifying the fatpacked 'perlbrew' executable -- this is a file generated by machine but not humans. You should be able to find corresponding changse in lib/App/perlbrew.pm.

@rage311 rage311 closed this Jul 4, 2019
@rage311 rage311 force-pushed the rage311:develop branch from 0b3573f to 0ca4d4e Jul 4, 2019
…shells interpreting some punctuation characters.
@rage311

This comment has been minimized.

Copy link
Contributor Author

rage311 commented Jul 4, 2019

My mistake... probably because I started chasing down the reported errors at the given lines from the executable. I think I've got it right now. And hopefully I didn't screw up my git history with the new change.

@rage311 rage311 reopened this Jul 4, 2019
@gugod gugod merged commit f282062 into gugod:develop Oct 23, 2019
2 checks passed
2 checks passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
coverage/coveralls Coverage remained the same at 85.323%
Details
@gugod

This comment has been minimized.

Copy link
Owner

gugod commented Oct 23, 2019

@rage311 I merged this but I would like to do some small modifications to avoid calling http_get() with 2 layer of quotes. Big thanks for following up on this iussue 👍

@rage311

This comment has been minimized.

Copy link
Contributor Author

rage311 commented Oct 23, 2019

@rage311 I merged this but I would like to do some small modifications to avoid calling http_get() with 2 layer of quotes. Big thanks for following up on this iussue +1

Sounds good to me. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.