Yay: I have custom PKGBUILD, is it possible yay to solve build-time dependencies from AUR?

Created on 14 Apr 2019  路  6Comments  路  Source: Jguer/yay

Hello, I have my custom PKGBUILD file, that has build-time dependencies from AUR packages.
Is it possible to yay build-install that dependencies, when building my custom PKGBUILD package?

Most helpful comment

Installing using the --asdeps as in yay -S --asdeps <your-dependencies> will install these packages as hanging dependencies, then you can install your custom PKGBUILD using makepkg and it should work.

All 6 comments

Yes? Yay will install any deps/optdeps of your package.

Thanks for reply, but I see that yay does not install dependencies after editing PKGBUILD using --editmenu option, also that mentioned in https://github.com/Jguer/yay/issues/750#issuecomment-427042210.
makepkg -si solves that dependencies, but using pacman repositories, not AUR (but dependency is in AUR).

As explained in #750, yay uses the AUR RPC for dependency resolution and not PKGBUILD parsing therefore AUR dependencies won't be computed from edited PKGBUILDs (or custom made and unpublished)

Hi and thanks for reply. Use case was: one AUR package was depending on cuda and llvm from official repo, then cuda in repo was updated to 10.1, and llvm to 8.0, but llvm supports only cuda version 9.2 (and 9.2 is in AUR), so I needed to edit PKGBUILD.
If I install that packages by own, they will be marked as explicitly installed and not removed after I remove packaged that was depending on that.
Just taught that it might be useful feature.
Maybe there is another way doing it?

Installing using the --asdeps as in yay -S --asdeps <your-dependencies> will install these packages as hanging dependencies, then you can install your custom PKGBUILD using makepkg and it should work.

Thanks, quite good workaround.

Was this page helpful?
0 / 5 - 0 ratings