You are not logged in.
The AUR package x2godesktopsharing is missing a dependency for qt5-svg. (I left a comment on the project's AUR page.) I want to use my script to build this package in a chroot along with several other packages. Therefore, I modify the PKGBUILD before using aurutils to finish the process.
if [ -f /"$pkgsroot"/"$reponame"/x2godesktopsharing/PKGBUILD ]; then
# x2godesktopsharing is missing dependency: qt5-svg
grep "depends.*qt5-svg" /"$pkgsroot"/"$reponame"/x2godesktopsharing/PKGBUILD >/dev/null
if [[ $? -ne 0 ]]; then
sed -i.bak '/depends=/ s/\x27)/\x27 \x27qt5-svg\x27)/' /"$pkgsroot"/"$reponame"/x2godesktopsharing/PKGBUILD
fi
fi
My script does the above step before calling "aur sync" like this:
xargs -a tobuild.txt aur sync --chroot --sign --upgrades --noconfirm --database="$reponame" --directory=/$chrootpath
However, the step above uses the unmodified PKGBUILD. It looks to be downloading it fresh. Is that because I'm using the "--upgrades" option? I do want all packages that are out of date to be updated by the script, but I want this particular package to also use my fixed PKGBUILD. How do I achieve that with an automated script?
Even when I verify that the PKGBUILD has been changed correctly, the build step fails like this:
==> Extracting sources...
-> Extracting x2godesktopsharing-3.2.0.0.tar.gz with bsdtar
==> Starting build()...
Info: creating stash file /build/x2godesktopsharing/src/x2godesktopsharing-3.2.0.0/.qmake.stash
Project ERROR: Unknown module(s) in QT: svg
==> ERROR: A failure occurred in build().
Aborting...
==> ERROR: Build failed, check /mnt/chroots/arch/test3/myuser/build
xargs: aur: exited with status 255; aborting
I am doing this to learn about aurutils, chroots, and bash automation. I know other ways to build this package, but my goal is not simply to build the package one time. I want to learn how to handle packages that have problems within my script, and this package gives me an example to work with that doesn't seem overly complex.
Last edited by MountainX (2020-10-27 06:09:59)
Offline
Once upon a tim there was a script "customizepkg" for exactly this task, AFAIR from the peaple who created yaourt. Now there are different flavours of that script. It lets you modify the PKGBUILD in an automated way.
The original script used a self-invented modification language (well, maybe language is the wrong name, it was surely not Turing-complete). I use a flavour that makes use of diff and patch.
One of the moderators of this forum wrote a flavour that uses scripts. I did not test it, but maybe I should.
Offline
Once upon a time there was a script "customizepkg" for exactly this task, AFAIR from the peaple who created yaourt. Now there are different flavours of that script...
Here are the 3 flavors I found:
ava1ar/customizepkg: A tool for Arch Linux package manager pacman to modify PKGBUILD automatically
Offline
With aurutils 3.0.0, you can use git commit to save your local changes. aur-sync uses aur fetch --sync=auto which then attempts git rebase if aurutils.rebase is true (run git config aurutils.rebase true in the repository where you want to have local changes).
Last edited by Alad (2020-10-28 17:57:53)
Mods are just community members who have the occasionally necessary option to move threads around and edit posts. -- Trilby
Offline