You are not logged in.
Hi,
I tried to install the package hash-identifier.
While running makepkg -s, there is an error:
==> ERROR: PKGBUILD contains CRLF characters and cannot be sourced.
I guess this is due to the New Line character at line 17 of the PKGBUILD:
sed -e 's|
||g' -i Hash_ID_v${pkgver}.py
So I remove it, but then I get this other error and I don't know what to do with it:
==> Extracting sources...
==> Starting prepare()...
sed: -e expression #1, char 0: no previous regular expression
==> ERROR: A failure occurred in prepare().
Aborting...
Last edited by PâtéDeCerf (2015-03-11 08:18:34)
Offline
So you turned it into
sed -e 's|||g' -i Hash_ID_v${pkgver}.py
What do you expect that to do?
To remove the carriage returns, you can use a special string with an escape sequence:
sed -e $'s|\r||g' -i Hash_ID_v${pkgver}.py
Also, I think python has no problem with CRLF line endings; the only problem is the CR in the shebang, so the 'g' flag isn't necessary (and then this could be merged with the other substitution in the PKGBUILD).
Offline
Thanks for your reply. I'm not familiar with package build syntax nor python, so I don't understand everything you wrote.
It would be good if you could explain more clearly though.
By applying the change you propose, I was able to build the package and install it.
NB: To run the program, type from the command-line :
$ hash-id
...and not simply "hash-identifier"
Last edited by PâtéDeCerf (2015-03-11 08:21:10)
Offline