From 9e8d1be6f00e61f15ab58459dcfb7b6e98609e2f Mon Sep 17 00:00:00 2001 From: Nicolas Reynolds Date: Mon, 13 Feb 2012 12:08:49 -0300 Subject: Add pkgbase to the path list --- toru-path | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'toru-path') diff --git a/toru-path b/toru-path index 7500aed..25d3995 100755 --- a/toru-path +++ b/toru-path @@ -19,7 +19,7 @@ for _pkgbuild in ${pkgbuilds[@]}; do fullpath=$(dirname $(readlink -f ${_pkgbuild})) - for _pkg in ${pkgname[@]} ${provides[@]}; do + for _pkg in ${pkgbase} ${pkgname[@]} ${provides[@]}; do paths+=(${_pkg/[<>=]*}:${fullpath}) done -- cgit v1.2.3-54-g00ecf From b3047be050482448ef6487aefe8193bf911807d6 Mon Sep 17 00:00:00 2001 From: Nicolas Reynolds Date: Mon, 27 Feb 2012 11:30:10 -0300 Subject: Unset pkgbase too --- toru-path | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'toru-path') diff --git a/toru-path b/toru-path index b82dbb2..22b991b 100755 --- a/toru-path +++ b/toru-path @@ -23,7 +23,7 @@ for _pkgbuild in ${pkgbuilds[@]}; do paths+=(${_pkg/[<>=]*}:${fullpath}) done - unset pkgname provides + unset pkgbase pkgname provides done # TODO remove old paths -- cgit v1.2.3-54-g00ecf From da785c8272457a70f21942bf4943bfc69f4fbeb8 Mon Sep 17 00:00:00 2001 From: Nicolas Reynolds Date: Mon, 27 Feb 2012 11:35:55 -0300 Subject: Use only one find --- toru-path | 2 ++ toru-utils | 9 +++------ 2 files changed, 5 insertions(+), 6 deletions(-) (limited to 'toru-path') diff --git a/toru-path b/toru-path index 22b991b..71dc85c 100755 --- a/toru-path +++ b/toru-path @@ -27,6 +27,8 @@ for _pkgbuild in ${pkgbuilds[@]}; do done # TODO remove old paths +# by joining new paths to old paths and exclude the joining points from the +# cache (sort of a sql join) echo ${paths[@]} | tr ' ' "\n" | sort >> ${TORUPATH}/paths lastsync ${LASTSYNCFILE} diff --git a/toru-utils b/toru-utils index bb0aef4..2488091 100755 --- a/toru-utils +++ b/toru-utils @@ -59,17 +59,14 @@ get_pkgbuilds() { $QUIET || warning "Forcing upgrade" # Get all PKGBUILDs - pkgbuilds=($(find $@ -mindepth 2 -maxdepth 3 -type f -name 'PKGBUILD')) - + extra="" else - # Only find newer than lastsyncfile and read everything else from cache - pkgbuilds=($(find $@ -mindepth 2 -maxdepth 3 -type f -name 'PKGBUILD' -newer ${LASTSYNCFILE})) - + extra=" -newer ${LASTSYNCFILE}" fi # Return all PKGBUILDs found - echo ${pkgbuilds[@]} + find $@ -mindepth 2 -maxdepth 3 -type f -name 'PKGBUILD' ${extra} } # End inmediately but print a useful message -- cgit v1.2.3-54-g00ecf