You are not logged in.
I have a question regarding meson use in PKGBUILDS.
If you build with meson outside of PKGBUILDs (assume an app from git) it compiles only the changes made after the last time you build. Is there a way to do this when you use it in a PKGBUILD?
Thanks in advance.
Offline
I think it should work. It depends on what is done in the build() function. Maybe try "makepkg --noprepare" for rebuilds and/or edit the build() function.
Last edited by progandy (2018-07-11 22:52:05)
| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |
Offline
meson works the same way inside of a PKGBUILD as outside.
The difference is that for tarball sources, re-running makepkg will typically update the files by re-extracting them unless you use --noextract. Then meson thinks you've got updated files.
Typically when people want to build incremental builds like this they are using git sources in the PKGBUILD, which will just pull new changes to makepkg's working copy. This should work flawlessly and only compile new changes. It's not meson-specific.
Managing AUR repos The Right Way -- aurpublish (now a standalone tool)
Offline
Typically when people want to build incremental builds like this they are using git sources in the PKGBUILD, which will just pull new changes to makepkg's working copy. This should work flawlessly and only compile new changes. It's not meson-specific.
The thing is that it doesn't work as i expect it and i have no idea what to do.
Offline
Post the PKGBUILD with the command that doesn't do what you expect and clarify what you want to achieve.
If you're using arch-meson, check whether the things it sets may be causing the unexpected behaviour.
Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.
(A works at time B) && (time C > time B ) ≠ (A works at time C)
Offline
Eschwartz wrote:Typically when people want to build incremental builds like this they are using git sources in the PKGBUILD, which will just pull new changes to makepkg's working copy. This should work flawlessly and only compile new changes. It's not meson-specific.
The thing is that it doesn't work as i expect it and i have no idea what to do.
"it" works as I expect, but until you clarify what doesn't work, how it doesn't work, what precise way it deviates from what you did expect, and how to reproduce it, there's really nothing else for me to say.
If you're using arch-meson, check whether the things it sets may be causing the unexpected behaviour.
arch-meson should not be used, ever.
Last edited by eschwartz (2018-07-12 14:33:49)
Managing AUR repos The Right Way -- aurpublish (now a standalone tool)
Offline
https://aur.archlinux.org/cgit/aur.git/ … nology-git
lets take the above package (terminology)
I have a directory with the PKGBUILD in it, i run makepkg -s and compiles the whole thing. If the devs push a change and run makepkg -s again it compiles the whole thing again and not only the changes. I want it to compile only the changes.
Offline
Well, um, it works for me in another meson project?
git clone https://github.com/linuxmint/nemo
cd nemo
git git reset --hard 3.8.4
meson build
ninja -C build
# 269 build objects get generated
git pull
# one new commit, one file modified
ninja -C build
# 18 objects get rebuilt, including one custom command which always runs no matter what
And sure enough, when I use a PKGBUILD and pin the sources, build the tag, then let makepkg update to the latest master, I get the same results! Because makepkg is not doing anything weird...
Clearly it can and does work.
Managing AUR repos The Right Way -- aurpublish (now a standalone tool)
Offline
https://aur.archlinux.org/cgit/aur.git/ … nology-git
lets take the above package (terminology)
I have a directory with the PKGBUILD in it, i run makepkg -s and compiles the whole thing. If the devs push a change and run makepkg -s again it compiles the whole thing again and not only the changes. I want it to compile only the changes.
./autogen.sh \
--prefix=/usr
https://git.enlightenment.org/apps/term … autogen.sh
That removes the build directory and regenerates the build instructions, so it has to build from scratch. You can try to move that to prepare() and then call makepkg with --noprepare on recurring builds.
Last edited by progandy (2018-07-13 06:46:19)
| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |
Offline
Uhm, more specifically the autogen seems to be a wrapper script for meson, which rm -rf build && meson . build/ "$@"
https://git.enlightenment.org/apps/term … autogen.sh
Why can't autogen die even after autotools dies... -_-
EDIT: ninja edit wars.
Last edited by eschwartz (2018-07-13 06:48:26)
Managing AUR repos The Right Way -- aurpublish (now a standalone tool)
Offline
Lone_Wolf wrote:If you're using arch-meson, check whether the things it sets may be causing the unexpected behaviour.
arch-meson should not be used, ever.
I completely agree, all my packages that need meson use it directly.
IF arch-meson is needed/useful (both of which i doubt) , it should be part of devtools, not of the meson package.
I checked the terminology-git autogen.sh and found the same as progandy and Eschwartz posted.
Meson looks at the $directory where it builds to determine what has changed.
If that dir is erased, it has to build everything again.
Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.
(A works at time B) && (time C > time B ) ≠ (A works at time C)
Offline