tazpkg diff modules/check @ rev 842
tazpkg: internal command 'call ...' to call tazpkg functions from modules (to share functions between tazpkg and its modules)
author | Aleksej Bobylev <al.bobylev@gmail.com> |
---|---|
date | Wed Sep 02 03:31:47 2015 +0300 (2015-09-02) |
parents | a02e36d44d06 |
children | d6cbd0c5f273 |
line diff
1.1 --- a/modules/check Fri Aug 28 16:10:34 2015 +0300 1.2 +++ b/modules/check Wed Sep 02 03:31:47 2015 +0300 1.3 @@ -13,29 +13,6 @@ 1.4 1.5 1.6 1.7 -# Get repositories priority using $PKGS_DB/priority. 1.8 -# In this file undigest repos are called by their names and main mirror 1.9 -# by 'main'. Sort order: priority 1.10 - 1.11 -look_for_priority() { 1.12 - [ -s "$PKGS_DB/priority" ] && priority=$(cat "$PKGS_DB/priority") 1.13 - 1.14 - for rep in main $(ls "$PKGS_DB/undigest" 2>/dev/null); do 1.15 - if [ ! -s "$PKGS_DB/priority" ] || ! grep -q "^$rep$" "$PKGS_DB/priority"; then 1.16 - priority=$(echo -e "$priority\n$rep") 1.17 - fi 1.18 - done 1.19 - 1.20 - priority=$(echo "$priority" | sed '/^$/d' | \ 1.21 - while read line; do 1.22 - case $line in 1.23 - (main) echo "$PKGS_DB";; 1.24 - (*) echo "$PKGS_DB/undigest/$line";; 1.25 - esac 1.26 - done) 1.27 -} 1.28 - 1.29 - 1.30 # Print package name if not printed yet 1.31 print_pkgname() { 1.32 if [ "$PACKAGE" != "$PACKAGE_PRINTED" ]; then 1.33 @@ -109,7 +86,7 @@ 1.34 1.35 1.36 # Get repositories priority list. 1.37 -look_for_priority 1.38 +priority=$(tazpkg call look_for_priority) 1.39 1.40 cd "$INSTALLED" 1.41 if [ -z "$2" -o -n "$full" ]; then PACKAGES="$(ls)"; else PACKAGES="$2"; fi