diff options
author | Luke Shumaker <lukeshu@parabola.nu> | 2017-02-15 14:40:06 -0500 |
---|---|---|
committer | Luke Shumaker <lukeshu@parabola.nu> | 2017-05-05 18:31:17 -0400 |
commit | 0fc1a6fe27fdbb8a366111a9dcb30d9a955b57cf (patch) | |
tree | e61a76398d3a55a76b551ada356ae8a50fa1038d /arch-nspawn.in | |
parent | 4df0e03cd3269cf852dc50ce9c9a0cdc6f2f2652 (diff) | |
download | devtools32-0fc1a6fe27fdbb8a366111a9dcb30d9a955b57cf.tar.xz |
makechrootpkg, arch-nspawn: Force-enable local '/repo/' repository.
The change in arch-nspawn is subtle:
This was the source of "infamous" "it fails every other time" bug that
took me over a year to solve. <https://labs.parabola.nu/issues/435>
By having a repository of local packages (rather than simply running
`pacman -U`), we are inviting pacman to cache them in
`/var/cache/pacman/pkg`. Besides being needless disk writes, this
actually causes a real issue. If the package gets rebuilt, pacman
will balk, as the file no longer matches the cached signature.
So, how do we prevent pacman from caching these local packages?
Simple: include the directory they are already in in the
pacman.conf:CacheDir list. This will prevent pacman from copying
the files to one of the other cache directories.
Diffstat (limited to 'arch-nspawn.in')
-rw-r--r-- | arch-nspawn.in | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/arch-nspawn.in b/arch-nspawn.in index e695a29..0b0dc68 100644 --- a/arch-nspawn.in +++ b/arch-nspawn.in @@ -105,6 +105,7 @@ elif [[ $(cat "$working_dir/.arch-chroot") != "$CHROOT_VERSION" ]]; then fi build_mount_args +cache_dirs+=('/repo/') copy_hostconf eval "$(grep '^CARCH=' "$working_dir/etc/makepkg.conf")" |