diff --git a/README.pod b/README.pod index c892cb92..28eb9c75 100644 --- a/README.pod +++ b/README.pod @@ -117,7 +117,8 @@ Display the help message and quit. =item B<-a, --aur> When used with pacman extended operations, only search, download, build, install -or update I from the AUR. +or update I from the AUR. When combined with I<-Syu>, only the I<-Sy> +operation is run for the repositories. =item B<-r, --repo> diff --git a/libpacaur/checks.sh b/libpacaur/checks.sh index 59a39d23..377ea40e 100644 --- a/libpacaur/checks.sh +++ b/libpacaur/checks.sh @@ -387,7 +387,7 @@ CheckUpdates() { if [[ ! "${opts[@]}" =~ "m" && ! " ${pacopts[@]} " =~ --foreign ]]; then [[ -n "${pkgs[@]}" ]] && pkgs=($(expac -Q '%n' "${pkgs[@]}")) - repopkgsQood=($($pacmanbin -Qunq ${pacopts[@]} ${pkgs[@]})) + repopkgsQood=($($pacmanbin -Qunq ${pkgs[@]})) if [[ -n "${repopkgsQood[@]}" && ! $quiet ]]; then repopkgsQver=($(expac -Q '%v' "${repopkgsQood[@]}")) @@ -429,7 +429,7 @@ CheckUpdates() { printf "${colorB}::${reset} ${colorM}%-${lrepo}s${reset} ${colorW}%-${lname}s${reset} ${colorR}%-${lQver}s${reset} -> ${colorG}%-${lSver}s${reset} ${colorB}%-${lgrp}s${reset} ${colorY}%s${reset}\n" "aur" "${aurpkgsAname[$i]}" "${aurpkgsQver[$i]}" "${aurpkgsAver[$i]}" " " "${aurpkgsQignore[$i]}" done else - tr ' ' '\n' <<< ${aurpkgsQood[@]} + tr ' ' '\n' <<< ${aurpkgsQood[@]} | sort -u fi fi # exit code diff --git a/libpacaur/deps.sh b/libpacaur/deps.sh index 0231e204..2ebe4a41 100644 --- a/libpacaur/deps.sh +++ b/libpacaur/deps.sh @@ -334,7 +334,20 @@ FindDepsAurError() { tsorterrdeps=(${tsorterrdeps[@]:1}) FindDepsAurError ${tsorterrdeps[@]} else - errdepslist+=("$nexterrdep") + for i in "${!aurpkgs[@]}"; do + nextallerrdeps=($(GetJson "arrayvar" "$json" "Depends" "${aurpkgs[$i]}")) + nextallerrdeps+=($(GetJson "arrayvar" "$json" "MakeDepends" "${aurpkgs[$i]}")) + nextallerrdeps+=($(GetJson "arrayvar" "$json" "CheckDepends" "${aurpkgs[$i]}")) + + # remove versioning + for j in "${!nextallerrdeps[@]}"; do + nextallerrdeps[$j]=$(awk -F ">|<|=" '{print $1}' <<< ${nextallerrdeps[$j]}) + done + + if [[ " ${nextallerrdeps[@]} " =~ " $currenterrdep " ]]; then + errdepslist+=("${aurpkgs[$i]}") + fi + done fi } diff --git a/pacaur b/pacaur index 2ba5dd87..65cafd97 100755 --- a/pacaur +++ b/pacaur @@ -31,6 +31,18 @@ userpacmandir="${XDG_CONFIG_HOME:-${HOME}/.config}/pacman" usercachedir="${XDG_CACHE_HOME:-${HOME}/.cache}/pacaur" tmpdir="${XDG_RUNTIME_DIR:-/tmp}" +# preserve environment variables +[[ -n ${PKGDEST} ]] && _PKGDEST=${PKGDEST} +[[ -n ${SRCDEST} ]] && _SRCDEST=${SRCDEST} +[[ -n ${SRCPKGDEST} ]] && _SRCPKGDEST=${SRCPKGDEST} +[[ -n ${LOGDEST} ]] && _LOGDEST=${LOGDEST} +[[ -n ${BUILDDIR} ]] && _BUILDDIR=${BUILDDIR} +[[ -n ${PKGEXT} ]] && _PKGEXT=${PKGEXT} +[[ -n ${SRCEXT} ]] && _SRCEXT=${SRCEXT} +[[ -n ${GPGKEY} ]] && _GPGKEY=${GPGKEY} +[[ -n ${PACKAGER} ]] && _PACKAGER=${PACKAGER} +[[ -n ${CARCH} ]] && _CARCH=${CARCH} + # source makepkg variables if [[ -r "$MAKEPKG_CONF" ]]; then source "$MAKEPKG_CONF" @@ -43,6 +55,18 @@ else fi fi +# restore environment variables +PKGDEST=${_PKGDEST:-$PKGDEST} +SRCDEST=${_SRCDEST:-$SRCDEST} +SRCPKGDEST=${_SRCPKGDEST:-$SRCPKGDEST} +LOGDEST=${_LOGDEST:-$LOGDEST} +BUILDDIR=${_BUILDDIR:-$BUILDDIR} +PKGEXT=${_PKGEXT:-$PKGEXT} +SRCEXT=${_SRCEXT:-$SRCEXT} +GPGKEY=${_GPGKEY:-$GPGKEY} +PACKAGER=${_PACKAGER:-$PACKAGER} +CARCH=${_CARCH:-$CARCH} + # set default config variables editor="${VISUAL:-${EDITOR:-vi}}" # build files editor displaybuildfiles=diff # display build files (none|diff|full)