Skip to content
This repository has been archived by the owner on May 31, 2018. It is now read-only.

Update branch - Pacaur 5.0 #673

Merged
merged 2 commits into from
Mar 23, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion README.pod
Original file line number Diff line number Diff line change
Expand Up @@ -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<target(s)> from the AUR.
or update I<target(s)> from the AUR. When combined with I<-Syu>, only the I<-Sy>
operation is run for the repositories.

=item B<-r, --repo>

Expand Down
4 changes: 2 additions & 2 deletions libpacaur/checks.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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[@]}"))
Expand Down Expand Up @@ -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
Expand Down
15 changes: 14 additions & 1 deletion libpacaur/deps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down
24 changes: 24 additions & 0 deletions pacaur
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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)
Expand Down