5 trap 'rm -rf -- "$tmp"' EXIT
8 cat >"$tmp"/pacman.conf
<<EOF
11 HoldPkg = pacman-git glibc
15 Include = /etc/pacman.d/mirrorlist
17 Include = /etc/pacman.d/mirrorlist
19 SigLevel = Optional TrustAll
23 # create local repository
24 repo-add
"$tmp/$tmp_uid".db.
tar
26 # create temporary pacman database
27 mkdir
-p "$tmp"/pacman
/{local,sync
}
30 cat > "$tmp"/PKGBUILD
<<EOF
36 url="http://example.com"
40 install -dm1777 "\$pkgdir"/tmp
41 install -dm0700 "\$pkgdir"$tmp
42 dd if=/dev/urandom of="\$pkgdir"$tmp/random bs=1M count=4
47 # TODO: add test with pkgver bumps (no CacheDir)
50 while [ $
((i
< 10)) -eq 1 ]; do
51 env
-C "$tmp" -u AUR_REPO
-u AUR_DBROOT
-u AUR_DBEXT
-u MAKEPKG AUR_ENV
=/dev
/null aur build \
52 --no-sync -fd "$tmp_uid" --pacman-conf "$tmp"/pacman.conf
54 fakeroot pacsync
--config "$tmp"/pacman.conf
--dbpath "$tmp"/pacman
55 # XXX: results in "could not change the root directory", however
56 # this does not seem to affect the result of the test
57 fakeroot pacman
-S --noconfirm --dbpath "$tmp"/pacman \
58 --config "$tmp"/pacman.conf
"$tmp_uid"/test-random
63 # vim: set et sw=4 sts=4 ft=sh:\n