aur.sh: Use --asdeps for makepkg, Add package ignore list

master
Taeyeon Mori 8 years ago
parent 28ed02f497
commit 44e84ad7c1
  1. 28
      bin/aur.sh
  2. 2
      dotfiles/makepkg.conf
  3. 11
      etc/aur.conf
  4. 3
      git/config

@ -31,6 +31,8 @@ ADD_UPDATES=false
RECURSE_DEPS=false
NEED_COWER=false
LIST_ONLY=false
EXCLUDE=
ASDEPS=true
add_makepkg_arg() {
makepkg_args=("${makepkg_args[@]}" "$1")
@ -49,6 +51,8 @@ process_arg() {
case "$_next_arg" in
--aur-host)
AUR_HOST="$cx";;
--exclude)
EXCLUDE=",$cx";;
esac
_next_arg=
continue
@ -63,7 +67,7 @@ process_arg() {
DL_ONLY=true;;
--ask)
ASK=true;;
--aur-host) # need more args
--aur-host|--exclude) # need more args
_next_arg="$cx";;
-u|--update)
[ -n "$MODE" ] && throw 255 "Can only use one flag from the 'aur.sh command' category"
@ -96,6 +100,9 @@ process_arg() {
echo " --old-aur Use the old (non-git) AUR methods"
echo " --ask Ask before installing packages (removes --noconfirm)"
echo " --clean Clean up leaftover temporary files (of failed builds) and exit"
echo " --exclude <pkgs>"
echo " Exclude packages from -u"
echo " --asexplicit Don't pass --asdeps to makepkg"
echo
echo "Useful makepkg options:"
echo " -i Install package after building it"
@ -118,8 +125,10 @@ process_arg() {
done
color 35 echo "Cleaned leftover temporary files."
exit 0;;
--asexplicit)
ASDEPS=false;;
# Makepkg args
--pkg|--key|--config) # These take an additional value
--pkg|--key|--config|-p) # These take an additional value
_proxy_args=1
add_makepkg_arg "$cx";;
-*)
@ -143,6 +152,7 @@ for cx in "$@"; do
esac
done
# Cower Detection
USE_COWER=false
@ -203,11 +213,19 @@ if $ADD_UPDATES; then
packages=("${packages[@]}" "`echo $update | cut -d' ' -f2`")
done
IFS="$OFS"
msg "[AUR] Updates available for: ${packages[*]}"
if [ -n "$EXCLUDE" -o -n "$AURSH_IGNORE_UPDATES" ]; then
packages=(`echo ${packages[@]} | sed -re "s/$(echo $EXCLUDE $AURSH_IGNORE_UPDATES | sed -e 's/[ ,]/|/g')//g"`)
fi
fi
if [ -z "$packages" ]; then
warn "[AUR] Nothing to do."
exit 0
else
msg "[AUR] Package set: ${packages[*]}"
fi
# Figure out build directory
@ -217,7 +235,7 @@ if ! $DL_ONLY && ! $LIST_ONLY; then
test -d "$build" || mkdir -p "$build" || throw 1 "Couldn't create build directory"
clean_exit() {
rm "$build/aur.sh.running"
rm "$build/aur.sh.running" 2>/dev/null || true
exit ${1-0}
}
trap clean_exit TERM
@ -234,6 +252,10 @@ if ! $DL_ONLY && ! $LIST_ONLY; then
add_makepkg_arg "--noconfirm"
fi
$ASDEPS && add_makepkg_arg "--asdeps"
msg "[AUR] Makepkg args: ${makepkg_args[*]}"
fi

@ -16,7 +16,7 @@ CFLAGS="`fix_march $CFLAGS`"
CXXFLAGS="`fix_march $CXXFLAGS`"
LDFLAGS="$LDFLAGS"
MAKEFLAGS="-j`grep "cpu cores" /proc/cpuinfo | cut -d: -f2`"
MAKEFLAGS="-j`nproc`"
# Store stuff
source "$DOTFILES/etc/aur.conf"

@ -5,17 +5,25 @@ AURDIR="$HOME/aur"
AURDEST="$AURDIR/Pkgbuilds"
PKGDEST="$AURDIR/Packages"
SRCDEST="$AURDIR/Source"
ABSDEST="$AURDIR/ABS"
GNUPGHOME="$AURDIR/gnupg"
# Local options
test -e "$DOTFILES/etc/aur.conf.local" &&
source "$DOTFILES/etc/aur.conf.local"
# Create directories
test -d "$AURDEST" || mkdir -p "$AURDEST" || exit 1
test -d "$PKGDEST" || mkdir -p "$PKGDEST" || exit 1
test -d "$SRCDEST" || mkdir -p "$SRCDEST" || exit 1
# GnuPG Signatures
export GNUPGHOME="$AURDIR/gnupg"
export GNUPGHOME
test -d "$GNUPGHOME" || mkdir -p "$GNUPGHOME" && chmod go-w "$GNUPGHOME" || exit 1
if ! test -e "$GNUPGHOME/gpg.conf"; then
echo "[AUR] Initializing GnuPG keyring in $GNUPGHOME"
cat >"$GNUPGHOME/gpg.conf" <<EOF
no-greeting
keyserver hkp://pool.sks-keyservers.net
@ -34,7 +42,6 @@ fi
# ABS
if which asp >/dev/null 2>&1; then
ABSDEST="$AURDIR/ABS"
export ASPROOT="$ABSDEST/.asp"
test -d "$ABSDEST" || mkdir -p "$ABSDEST" || exit 1

@ -7,3 +7,6 @@
[url "git@github.com:"]
insteadOf = git://github.com/
insteadOf = https://github.com/
[url "https://aur.archlinux.org/"]
insteadOf = https://aur4.archlinux.org/

Loading…
Cancel
Save