Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 5f74f69194
Fetching contributors…

Cannot retrieve contributors at this time

executable file 48 lines (35 sloc) 0.963 kb
#!/bin/bash
installed_version() {
# TODO: portageq is not very fast
local installed_version=$(portageq best_version / $1)
if [[ ${installed_version} = "" ]]; then
echo "warning: '$1' is not installed"
fi
echo ${installed_version}
}
dependencies() {
# TODO: list all dependencies
local raw_dependencies=( $(qdepends --rdepend $1) )
# first element is ebuild itself
unset raw_dependencies[0]
# clean pre- and postfixes
for i in ${raw_dependencies[@]}; do
i=${i#>=}
i=${i#=}
i=${i#\~}
i=${i%\[*\]}
i=${i%\*}
echo $i
done
}
all_dependencies=( )
for i in "$@"; do
all_dependencies=( ${all_dependencies[@]} $(dependencies $(installed_version $i)) )
done
# sort array and remove duplicates
all_dependencies=( $(tr ' ' '\n' <<< ${all_dependencies[@]} | sort | uniq) )
for i in ${all_dependencies[@]}; do
atom=( $(qatom $i) )
unversioned_atom=${atom[0]}/${atom[1]}
qatom --compare $(installed_version ${unversioned_atom}) $i
done
Jump to Line
Something went wrong with that request. Please try again.