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

Unable to locate package if Windows-style CR+LF newlines used in Aptfile #53

Open
weslord opened this issue Sep 9, 2019 · 2 comments
Open

Comments

@weslord
Copy link

weslord commented Sep 9, 2019

If I create a new heroku dyno with the buildpacks:
https://github.com/heroku/heroku-buildpack-apt
heroku/python

And then I push a commit with an empty requirements.txt and an Aptfile containing:

poppler-utils

I get different results depending on if the file was created in MacOS or Windows. If the file was created in MacOS, everything works as expected, poppler-utils is installed just fine. On a Windows machine, the release contains an error message: E: Unable to locate package poppler-utils.

I noticed that the Windows version of the Aptfile uses CR+LF for linebreaks, while the MacOS version uses LF for linebreaks - I'm assuming that's what's causing the problem, because I can't see any other difference at all.

hexdump of (non-working) Aptfile from Windows:

0000000 70 6f 70 70 6c 65 72 2d 75 74 69 6c 73 0d 0a   
000000f

hexdump of (working) Aptfile from MacOS:

0000000 70 6f 70 70 6c 65 72 2d 75 74 69 6c 73 0a      
000000e
@howlettga
Copy link

thanks, this was an issue for me as well. Strangely one package would install and all the rest would fail. It would be great if this buildpack could check for line-ending in the Aptfile and issue a warning or add to the documentation that in must use linux file endings

@brandoncc
Copy link

Someone opened a ticket on one of my buildpacks that ended up being this issue. Is there any movement on this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants