diff options
Diffstat (limited to 'dagpkg')
-rwxr-xr-x | dagpkg | 17 |
1 files changed, 10 insertions, 7 deletions
@@ -43,13 +43,15 @@ trap 'trap_exit "An unknown error has occurred. Exiting..."' ERR source_pkgbuild() { # Source this PKGBUILD, if it doesn't exist, exit + unset pkgbase pkgname depends makedepends + unset pkgrel pkgver epoch if ! source ./PKGBUILD &>/dev/null ; then error "No PKGBUILD in %s" "$PWD" exit 1 fi # Save resources - unset pkgdesc arch license groups backup install md5sums sha1sums \ + unset pkgdesc license groups backup install md5sums sha1sums \ sha256sums source options &>/dev/null unset build package &>/dev/null @@ -93,6 +95,10 @@ visit_pkgbuild() { local name source_pkgbuild + # If it's already built we don't bother + is_built ${pkgname[0]} $(get_fullver ${epoch:-0} ${pkgver} ${pkgrel}) && + return + # Detect cycle or already visited package case "${marks[$name]:-0}" in 1) msg2 "cycle found with %s depending on %s" $prev $name @@ -100,19 +106,16 @@ visit_pkgbuild() { 2) return;; esac - # If it's already built we don't bother - is_built ${pkgname[0]} $(get_fullver ${epoch:-0} ${pkgver} ${pkgrel}) && - return + msg "%s (%s)" ${name} ${prev} - echo "${arch[@]}" | grep -qw "$CARCH" || warning "%s isn't ported to %s yet" ${name} ${CARCH} + echo "${arch[@]}" | grep -qw "$CARCH" || + warning "%s isn't ported to %s yet" ${name} ${CARCH} # If the envvar I contains this package, ignore it and exit echo "$I" | grep -qw "$name" && msg2 "%s ignored" ${name} && return - msg "%s (%s)" ${name} ${prev} - # Mark the package as being visited marks[$name]=1 |