Configure for nokia n900 with xfce4. Then, gtk+-maemo is rebuilt, in each and every build, and even two times doing one build?! It takes 40 minutes to build, so ... it is a bit of a problem. First build:
This problem probably goes away when you disable timestamp based rebuilds, because it fails to detect which packages need to be rebuilt if the pkgrel and pkgver is the same.
Do you have timestamp based rebuilds enabled (it's the default and can be changed in pmbootstrap init)? Check with: pmbootstrap config timestamp_based_rebuild
Could you attach the log? It should list why it decides to build packages. There's (a lot!) more information with the -v flag (e.g. pmbootstrap -v install)
With -v, yes, I seem to get some additional information:
(014167) [23:22:24] (buildroot_armhf) % cd /home/pmos/build && busybox su pmos -c 'CCACHE_PATH=/usr/lib/arch-bin-masquerade/armhf:/usr/bin CCACHE_COMPILERCHECK=string:6.4.0-r6 CARCH=armhf CCACHE_PREFIX=distcc DISTCC_HOSTS=127.0.0.1:33632 abuild -d'
gtk+2.0-maemo: abuild 3.1.0-r4
gtk+2.0-maemo: Checking sanity of /home/pmos/build/APKBUILD...
WARNING: gtk+2.0-maemo: You should not have $install in source
WARNING: gtk+2.0-maemo: You should not have $install in source
WARNING: gtk+2.0-maemo: You should not have $install in source
WARNING: gtk+2.0-maemo: No maintainer
gtk+2.0-maemo: Cleaning temporary build dirs...
gtk+2.0-maemo: Fetching http://ftp.gnome.org/pub/gnome/sources/gtk+/2.24/gtk+-2.24.31.tar.xz
I would need your log to reproduce the problem. The timestamp based builds logic tries to detect which packages need to be rebuilt even if the version (pkgver, pkgrel) did not change.
This seems easy at first, but in combination with git, when you switch branches or just cloned a repo, then the files will have newer timestamps than the binary packages. So pmbootstrap would think they need to be rebuilt.
To work around this, we ask git to diff against current master, and only look at the files that have changed in regard to master. But this only seems to work correctly when using git rebase instead of git merge (and I'm not 100% sure of that even, need to investigate this more). This feature got even more complicated as the binary repo was introduced.
Could you attach the full log leading up to one build (from starting pmbootstrap to shortly after the build started, e.g. as attachment here in the comments)? First without -v so it's easier to read, and I might also need it with -v enabled.
That is expected. In Alpine, the folder where abuild gets executed is a git repository. With pmbootstrap this is not the case, as we copy all files for one aport (APKBUILD, patches, ...) to the regular folder $chroot/home/pmos/build.
abuild tries to write down which git commit the aport had at compile time, that's why it executes git. And fails, because git is not installed in the native chroot, and even if it was, this would not be a git folder anyway.
This is not related to pmbootstrap's git checking, which relies on the host system's git binary (if git should not be installed, this falls back gracefully).
Actually we've discussed in #1167 (closed) (as linked above) whether it would be better to remove this feature, as this is buggy right now (depending on how you use git, and with the binary repo enabled in general), and it's too hard to get it right if it is even possible. No one seems to be against removing it, so I will make a PR later that removes this feature altogether.
Thanks a lot for creating and posting the log though, I know that this takes some time and effort as well, and I appreciate it!