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

Fails to download atmelavr on Windows 7 #26

Closed
huntersan9 opened this Issue Nov 20, 2014 · 3 comments

Comments

Projects
None yet
2 participants
@huntersan9

huntersan9 commented Nov 20, 2014

Installed platformio 0.7.0 and 0.8.0 with Python 2.7.8 on Windows 7 64 bit, works fine. Installs perfectly.
Run platformio.exe install atmelavr:
Installing toolchain-atmelavr package:
Downloading [####################################] 100%
cygwin warning:
MS-DOS style path detected: c:\Users\USER/.platformio\atmelavr\tools\toolchai
n\toolchain-atmelavr-windows-1.tar.gz
Preferred POSIX equivalent is: /cygdrive/c/Users/USER/.platformio/atmelavr/to
ols/toolchain/toolchain-atmelavr-windows-1.tar.gz
CYGWIN environment variable option "nodosfilewarning" turns off this warning.
Consult the user's guide for more details about POSIX paths:
http://cygwin.com/cygwin-ug-net/using.html#using-pathnames
Error: The 'sha1' sum '\a9b2f3779bcd64196c499f7a30b221987c15a68' of downloaded f
ile 'toolchain-atmelavr-windows-1.tar.gz' is not equal to remote 'a9b2f3779bcd64
196c499f7a30b221987c15a681'

sha1sum is part of cygwin on my machine, even though the python is windows, not cygwin.
as can be seen, the sha1 sum has a leading '' in front of it and throws off the comparison.

Changed platformio/downloader.py, Line 71:
FROM
dlsha1 = res[:40]
TO
dlsha1 = res[1:41]

to fix in my case.

FYI
C:\Python27-64\Scripts>sha1sum --version
sha1sum (GNU coreutils) 8.15
Packaged by Cygwin (8.15-3)
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Written by Ulrich Drepper, Scott Miller, and David Madore.

Perhaps there should be a check for cygwin binaries.

@ivankravets ivankravets added the bug label Nov 21, 2014

@ivankravets

This comment has been minimized.

Member

ivankravets commented Nov 21, 2014

Thanks a lot for this report. I've just fixed it 👍
As for your issues:

MS-DOS style path detected: c:\Users\USER/.platformio\atmelavr\tools\toolchai

I don't see these warnings in my virtual Win7 x64 + Cygwin. PlatformIO doesn't use "hardcoded" paths in the source code. It uses Python's "os" package for file system operations.

CYGWIN environment variable option "nodosfilewarning" turns off this warning.

I didn't setup any env.vars. Clean Win7 + Clean Cygwin.

P.S: Do you have any ideas how I can reproduce these bad paths? If yes, please reopen this issue.

@ivankravets

This comment has been minimized.

Member

ivankravets commented Dec 1, 2014

@huntersan9

This comment has been minimized.

huntersan9 commented Dec 10, 2014

Ah, The two lines you are referring to are likely coming from the cygwin version of the sha1sum executable on my path. My only issue was that the SHA1 didn't match. Please close this as works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment