This wasn't complete as it would only ignore broken builds
for direct deps and not indirect ones, but kinda worked in ignoring
some arm64 errors.
But it also causes problems if an error is ignored and the other arches
get uploaded. Then it's hard to roll back the update because lots of
packages with the new version are already in the repo.
With the new autobuild controller we can also restart flaky builds instead
of ignoring them and waiting for jeremy to fix them later.
Let's try removing that special case.
Up until now we created a backup of pacman.conf and restored it after
the build was done. This can leave the environment in an undefined state
if something crashes inbetween.
Instead create a temporary pacman.conf and use that during building.
In theory pacman allows setting a custom config via "--config", but
makepkg doesn't expose this, so that's not working. Luckily makepkg
allows overriding the pacman path via the PACMAN env var, so we create
a temporary script which just forwards everything to pacman and always
sets the temporary config.
In case the job stops because it has reached the time limit it would
not update the build status and just quit. Move the timeout check
a bit later to acoid that.
Turns out disabling the cache just disables the monkey patching,
so we have to disable when creating the session object and not when
we are using the cache.
Create a session object without cache in the main thread at first,
so that the download code can re-use it as is later on.
It isn't thread safe, so wrap the outer code instead and just
assert in download_asset() that the caching is disabled so it's
not called with caching by accident.
This doesn't speed things up usually, since we still make the same amount
of requests, but it doesn't count against the rate-limit in case there
is a cache hit. Also there is a smaller chance of things going wrong,
since we don't transfer any payload.
The cache is store in a .autobuild_cache directory using a sqlite DB.
There isn't an easier way to enabled retries with requests sadly.
This also shares the session between all non-pygithub requests, so
could make things a bit faster.
before libc++ was split off from clang package, it was built after clang within the same PKGBUILD, so this order seems reasonably safe.
Also remove a couple of prior cycle breaks from before it was possible to break them manually in a run. These packages are not related by the same source repo and release, like mingw-w64 and llvm-project are, so are less likely to consistently require a cycle break on every upstream update.
It appears that powershell doesn't properly handle an empty argument, resulting in all the subsequent arguments being shifted left by one.
So, don't specify --optional-deps argument if it is empty.
This gives all cycles in the queue right now, ignoring the build
status of the packages.
If one part of the cycle is already built then it will not matter.
Since we no longer break cycles in msys2-web we have to do it here.
This adds a list of optional deps for some packages. If they are there
they will be used, if not they will be ignored.
By hardcoding it we should get more a more deterministic result, but
not sure if this scales well.
Allow mapping build types to external repos and make some
read-only operations work with it.
This mainly means downloading assets will now also download clangarm64
and the clangarm64 build status will be included on packages.msys2.org.