diff options
author | Nicolás Reynolds <apoyosis@correo.inta.gob.ar> | 2012-02-04 13:17:05 -0300 |
---|---|---|
committer | Nicolás Reynolds <apoyosis@correo.inta.gob.ar> | 2012-02-04 13:17:05 -0300 |
commit | 3fb8e62b798c0dffb201727439a6a0d90bc1b20f (patch) | |
tree | f69c1b6db4082e9188f22be8d3d3d5cc5212f34f /fullpkg-find | |
parent | 5ab36af3c7a505ff40bb8ca46ec387b94d85cbdf (diff) | |
parent | 9808018ca09050ade144d0dfc0b0b6edadefa368 (diff) |
Merge branch 'master' of ssh://gparabola/libretools
Conflicts:
libremakepkg
Diffstat (limited to 'fullpkg-find')
-rw-r--r-- | fullpkg-find | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/fullpkg-find b/fullpkg-find index 25565ae..8c0c063 100644 --- a/fullpkg-find +++ b/fullpkg-find @@ -11,6 +11,14 @@ guess_repo() { basename $(dirname $(pwd)) } +# Finds a PKGBUILD on toru's path cache +# Look in all caches but pick the first one +# TODO move to a toru flag (-p?) +where_is() { + grep -m1 "^${1}:" "${TORUPATH}/paths" 2>/dev/null| \ + cut -d: -f2 2>/dev/null +} + # return : full version spec, including epoch (if necessary), pkgver, pkgrel # usage : get_fullver( ${epoch:-0}, $pkgver, $pkgrel ) get_fullver() { @@ -39,7 +47,7 @@ find_deps() { fi fi - if is_built "${pkgbase}>=${fullver}"; then + if is_built "${pkgbase}" "${fullver}"; then exit 0 # pkg is built and updated fi @@ -71,6 +79,7 @@ find_deps() { for _dep in ${deps[@]}; do local found=false +# TODO change for where_is or toru-path local pkgdir=$(toru -p ${_dep}) if [ -n "$pkgdir" -a -d "${pkgdir}" ]; then |