Morganamilo / paru

Feature packed AUR helper
GNU General Public License v3.0
5.68k stars 221 forks source link

PKGBUILD | paru --build fails to parse keys in .SRCINFO unlike makepkg #1209

Open GrabbenD opened 5 days ago

GrabbenD commented 5 days ago

Affected Version

paru v2.0.3 - libalpm v14.0.0

Description

My goal is to replace makepkg's pacman invocation with paru I though paru --build would be the solution

However, certain instructions in PKGBUILDs like plain cause parsing failures which aren't present with makepkg

Possibly related to discussion in https://github.com/Morganamilo/paru/issues/39

Output

This can be quickly reproduced using linux-tkg's PKGBUILD with default paru.conf / pacman.conf

$ git clone https://github.com/Frogging-Family/linux-tkg.git && cd linux-tkg
(...)

$ paru --build --install ./
:: Generating .SRCINFO for ./linux-tkg...
error: failed to parse srcinfo "/repos/linux-tkg/.SRCINFO": key '.---.`               `.---.' requires a value: Line 1: .---.`               `.---.
:: Generating .SRCINFO for ./linux-tkg...
error: /repos/linux-tkg: failed to parse srcinfo generated by makepkg: key '.---.`               `.---.' requires a value: Line 1: .---.`               `.---.
GrabbenD commented 5 days ago

For reference, building with $ makepkg --noconfirm --syncdeps --needed --install --clean --cleanbuild --force works fine without any additional tweaks.


Regarding Paru, even after removing plain instructions, there's additional parsing errors like:

:: Generating .SRCINFO for ./linux-tkg...
error: failed to parse srcinfo "/repos/linux-tkg/.SRCINFO": key '-> Defaulting to Archlinux target' requires a value: Line 1: -> Defaulting to Archlinux target
:: Generating .SRCINFO for ./linux-tkg...
error: /repos/linux-tkg: failed to parse srcinfo generated by makepkg: key '-> Defaulting to Archlinux target' requires a value: Line 1: -> Defaulting to Archlinux target
GrabbenD commented 5 days ago

Workaround

My goal is to replace makepkg's pacman invocation with paru

$ PACMAN=paru makepkg --noconfirm --syncdeps --needed --install --clean --cleanbuild --force