yay v9.2.1 - libalpm v11.0.3
Since around a month or so every package install of AUR packages failed so far with (before I had newer gotten the error):
==> ERROR: PKGBUILD contains CRLF characters and cannot be sourced.
The only workaround to this is to clone the repo and clone the dependency repos manually and execute 'dos2unix PKGBUILD' for each, defeating the purpose of yay.
yay -S anbox-git ~/Build/AUR
:: There are 2 providers available for anbox-image:
:: Repository AUR
1) anbox-image 2) anbox-image-gapps
Enter a number (default=1):
:: There are 2 providers available for properties-cpp:
:: Repository AUR
1) properties-cpp 2) properties-cpp-bzr
Enter a number (default=1):
:: Checking for conflicts...
:: Checking for inner conflicts...
[Aur: 2] anbox-image-1:2018.07.19-1 anbox-git-1:r1096.ea2b7a3-1
[Aur Make: 1] properties-cpp-0.0.1-1
==> Remove make dependencies after install? [y/N]
3 anbox-image (Build Files Exist)
2 properties-cpp (Build Files Exist)
1 anbox-git (Build Files Exist)
==> Packages to cleanBuild?
==> [N]one [A]ll [Ab]ort [I]nstalled [No]tInstalled or (1 2 3, 1-3, ^4)
==>
:: PKGBUILD up to date, Skipping (1/3): anbox-git
:: PKGBUILD up to date, Skipping (2/3): anbox-image
:: PKGBUILD up to date, Skipping (3/3): properties-cpp
3 anbox-image (Build Files Exist)
2 properties-cpp (Build Files Exist)
1 anbox-git (Build Files Exist)
==> Diffs to show?
==> [N]one [A]ll [Ab]ort [I]nstalled [No]tInstalled or (1 2 3, 1-3, ^4)
==>
:: Parsing SRCINFO (1/3): anbox-image
:: Parsing SRCINFO (2/3): properties-cpp
:: Parsing SRCINFO (3/3): anbox-git
==> ERROR: PKGBUILD contains CRLF characters and cannot be sourced.
Error downloading sources: anbox-image
this is not a yay restriction but a makepkg one. arch build tools inherently require unix line endings
I have tried the example case you've provided yay -S anbox-git and cannot reproduce this bug. Something along your pipe must be replacing \n with CRLF, have you checked if you have anything in your gitconfig set to use CRLF (core.autocrlf)?
EDIT: leaving this here https://help.github.com/en/articles/configuring-git-to-handle-line-endings
Yeah I swear we had a similar issue before where that was the cause.
Thank you all for the hints.
It was indeed a autocrlf related issue. To get it work, I also needed also to clean the build caches for already fetched packages.
For future reference for people with the same issue:
git config --edit --globalsudo rm -r ~/.cache/yayI just found out why this happens:
~/.gictonfig to Linux
Most helpful comment
Thank you all for the hints.
It was indeed a autocrlf related issue. To get it work, I also needed also to clean the build caches for already fetched packages.
For future reference for people with the same issue:
git config --edit --globalsudo rm -r ~/.cache/yay