5 #trap 'rm -rf -- "$tmp"' EXIT
8 cat >"$tmp"/pacman.conf
<<EOF
10 HoldPkg = pacman-git glibc
14 Include = /etc/pacman.d/mirrorlist
16 Include = /etc/pacman.d/mirrorlist
18 Include = /etc/pacman.d/mirrorlist
20 SigLevel = Optional TrustAll
24 # create local repository
25 repo-add
"$tmp/$tmp_uid".db.
tar
27 config
=(--pacman-conf "$tmp"/pacman.conf
)
29 rev=c07b5215df935cfe02f5c47411d2d717d9bb6aab
32 # checkout and build previous revision
34 env
- HOME
=$HOME USER
=$USER PATH
=$PATH aur fetch
"$pkg"
37 git
reset --hard "$rev"
38 env_unset
=(-u AUR_REPO
-u AUR_DBROOT
-u AUR_DBEXT
-u MAKEPKG
-u XDG_CACHE_HOME
)
40 env
"${env_unset[@]}" AUR_ENV
=/dev
/null aur build
--no-sync \
41 -rnd "$tmp_uid" --margs --skippgpcheck --pacman-conf "$tmp"/pacman.conf
43 fakeroot
-- pacman
--config "$tmp"/pacman.conf
--dbpath "$tmp" -Sy
44 found_package
=$
(pacsift
--config "$tmp"/pacman.conf
--dbpath "$tmp" --repo="$tmp_uid" --satisfies="$pkg=$ver")
45 [[ -n $found_package ]]
47 # update to latest revision
49 env
"${env_unset[@]}" -u AUR_SYNC_NINJA AUR_ENV
=/dev
/null AURDEST
="$tmp" \
50 aur sync
--no-build --upgrades --ignore-file=/dev
/null
-d "$tmp_uid" --no-view --pacman-conf "$tmp"/pacman.conf
54 env
"${env_unset[@]}" AUR_ENV
=/dev
/null aur build
--no-sync \
55 -rnd "$tmp_uid" --margs --skippgpcheck --pacman-conf "$tmp"/pacman.conf
57 fakeroot
-- pacman
--config "$tmp"/pacman.conf
--dbpath "$tmp" -Sy
58 found_package
=$
(pacsift
--config "$tmp"/pacman.conf
--dbpath "$tmp" --repo="$tmp_uid" --satisfies="$pkg>$ver")
59 [[ -n $found_package ]]
61 # vim: set et sw=4 sts=4 ft=sh:\n