msys2 / msys2-autobuild

🏭🏭🏭🏭🏭🏭🏭🏭
https://packages.msys2.org/queue
MIT License
35 stars 25 forks source link

Use a temporary pacman.conf during building #61

Closed lazka closed 1 year ago

lazka commented 1 year ago

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.