Merge pull request #981 from AladW/build-results-append
[aurutils.git] / tests / issue / 513
blob55445ea9c5fb136aa850480aaf283bf658b53132
1 #!/bin/bash
2 set -e
4 tmp=$(mktemp -d)
5 #trap 'rm -rf -- "$tmp"' EXIT
6 tmp_uid=custom-$RANDOM
8 cat >"$tmp"/pacman.conf <<EOF
9 [options]
10 HoldPkg = pacman-git glibc
11 Architecture = auto
12 CheckSpace
13 [core]
14 Include = /etc/pacman.d/mirrorlist
15 [extra]
16 Include = /etc/pacman.d/mirrorlist
17 [community]
18 Include = /etc/pacman.d/mirrorlist
19 [$tmp_uid]
20 SigLevel = Optional TrustAll
21 Server = file://$tmp
22 EOF
24 cat >"$tmp"/PKGBUILD <<EOF
25 pkgname=foo
26 pkgver=1
27 pkgrel=1
28 arch=('any')
30 package() {
31 true
33 EOF
35 # create local repository
36 repo-add "$tmp/$tmp_uid".db.tar
38 # issue 513: PKGDEST (environment) should be ignored
39 env -C "$tmp" -u AUR_REPO -u AUR_DBROOT -u AUR_DBEXT -u MAKEPKG PKGDEST=/does/not/exist \
40 aur build --no-sync -d "$tmp_uid" --pacman-conf "$tmp"/pacman.conf
41 tar -tf "$tmp"/foo-1-1-any.pkg.tar.zst
43 # vim: set et sw=4 sts=4 ft=sh:\n