summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libretools.conf6
-rwxr-xr-xtoru-path8
2 files changed, 11 insertions, 3 deletions
diff --git a/libretools.conf b/libretools.conf
index 40f92dc..88ba515 100644
--- a/libretools.conf
+++ b/libretools.conf
@@ -7,10 +7,12 @@ DIFFTOOL=vimdiff
# The dir where you work on
WORKDIR=/home/$USER/packages
# The repos you'll be packaging for
+#
# Tip: As early repos take precedence on $REPOS loops, you can use this as
# inverted order of precedence. Put testing repos first so fullpkg find new
-# PKGBUILDs first, for instance.
-REPOS=('core' 'extra' 'community' 'libre' 'libre-testing' 'social' 'sugar')
+# PKGBUILDs first, for instance. Toru-path uses reverse order to enforce repo
+# precedence on the path cache (the last path added replaces the rest)
+REPOS=('core' 'libre' 'extra' 'community' 'libre-testing' 'social' 'sugar')
# The architectures
ARCHES=('i686' 'x86_64' 'mips64el' 'any')
diff --git a/toru-path b/toru-path
index 7f1d599..957f49b 100755
--- a/toru-path
+++ b/toru-path
@@ -3,6 +3,7 @@
source $(dirname $(command -v $0))/toru-utils
TORUPATH=${T:-${TORUPATH}}
+VERBOSE=${V:-false}
if [ ! -w "$TORUPATH" ]; then
error "Toru's path isn't writable. Please check $TORUPATH"
@@ -18,7 +19,11 @@ fi
# TODO pass other paths via flags
# ABSROOT has trailing slash
-fullrepos=($(for _repo in ${REPOS[@]}; do echo "${ABSROOT}${_repo}"; done))
+fullrepos=()
+for (( i = ${#REPOS[@]}-1 ; i >= 0 ; i-- )); do
+ ${VERBOSE} && msg "Processing [%s]" ${REPOS[$i]}
+ fullrepos+=("${ABSROOT}${REPOS[$i]}")
+done
pkgbuilds=($(get_pkgbuilds ${fullrepos[@]}))
msg "Updating path cache"
@@ -33,6 +38,7 @@ for _pkgbuild in ${pkgbuilds[@]}; do
fullpath=$(dirname ${_pkgbuild})
for _pkg in ${pkgbase} ${pkgname[@]} ${provides[@]}; do
+ $VERBOSE && msg2 "${_pkg} -> ${fullpath}"
tcamgr put ${PATHFILE} ${_pkg/[<>=]*} ${fullpath}
done