Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for dependencies with architecture-specific names #156

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
21 changes: 17 additions & 4 deletions packer
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,11 @@ existsinlocal() {
scrapeaurdeps() {
pkginfo "$1" "$preview"
. "$tmpdir/$1.PKGBUILD"
local deps_carch=( $(eval "echo \$$(echo {depends_${CARCH}[@]})") )
local mkdeps_carch=( $(eval "echo \$$(echo {makedepends_${CARCH}[@]})") )
IFS=$'\n'
dependencies=( $(echo -e "${depends[*]}\n${makedepends[*]}" | sed -e 's/=.*//' -e 's/>.*//' -e 's/<.*//'| sort -u) )
dependencies=( $(echo -e "${depends[*]}\n${makedepends[*]}\n${deps_carch[*]}\n${mkdeps_carch[*]}" |
sed -e 's/=.*//' -e 's/>.*//' -e 's/<.*//'| sort -u) )
unset IFS
}

Expand Down Expand Up @@ -770,19 +773,22 @@ if [[ $option = info ]]; then

# Echo out the -Si formatted package information
# Retrieve each element in order and echo them immediately
depends_carch=( $(eval "echo \$$(echo {depends_${CARCH}[@]})") )
makedepends_carch=( $(eval "echo \$$(echo {makedepends_${CARCH}[@]})") )
echo -e "${COLOR1}Repository : ${COLOR3}aur"
echo -e "${COLOR1}Name : $pkgname"
echo -e "${COLOR1}Version : ${COLOR2}$pkgver-$pkgrel"
echo -e "${COLOR1}URL : ${COLOR4}$url"
echo -e "${COLOR1}Licenses : ${ENDCOLOR}${license[@]}"
echo -e "${COLOR1}Groups : ${ENDCOLOR}${groups[@]:-None}"
echo -e "${COLOR1}Provides : ${ENDCOLOR}${provides[@]:-None}"
echo -e "${COLOR1}Depends On : ${ENDCOLOR}${depends[@]}"
echo -e "${COLOR1}Make Depends : ${ENDCOLOR}${makedepends[@]}"
echo -e "${COLOR1}Depends On : ${ENDCOLOR}${depends[@]} ${depends_carch[@]}"
echo -e "${COLOR1}Make Depends : ${ENDCOLOR}${makedepends[@]} ${makedepends_carch[@]}"
echo -e -n "${COLOR1}Optional Deps : ${ENDCOLOR}"

len="${#optdepends[@]}"
if [[ $len -eq 0 ]]; then
len_carch="$(eval "echo \$$(echo {#optdepends_${CARCH}[@]})")"
if [[ $len -eq 0 ]] && [[ $len_carch -eq 0 ]]; then
echo "None"
else
for ((i=0 ; i<$len ; i++)); do
Expand All @@ -792,6 +798,13 @@ if [[ $option = info ]]; then
echo -e " ${optdepends[$i]}"
fi
done
for ((i=0 ; i<$len_carch ; i++)); do
if [[ $i = 0 ]]; then
echo "$(eval "echo \$$(echo {optdepends_${CARCH}[$i]})")"
else
echo -e " $(eval "echo \$$(echo {optdepends_${CARCH}[$i]})")"
fi
done
fi

echo -e "${COLOR1}Conflicts With : ${ENDCOLOR}${conflicts[@]:-None}"
Expand Down