Skip to content
Browse files

Cleanup logging for required pkgs.

  • Loading branch information...
1 parent 93c3934 commit b4aac99773e0dab91da730f4f87126c42a645517 @cycle cycle committed Aug 7, 2012
Showing with 29 additions and 18 deletions.
  1. +29 −18 system/bldr.sh
View
47 system/bldr.sh
@@ -3612,6 +3612,7 @@ function bldr_build_pkg()
pkg_needs=""
fi
+ local pkg_req_has=""
local pkg_req_build=""
local pkg_need_name=""
@@ -3627,38 +3628,48 @@ function bldr_build_pkg()
local req_name=$(echo "$pkg_need_name" | sed 's/\/.*//g')
local req_vers="latest"
fi
+
local has_existing=$(bldr_has_required_pkg --name "$req_name" --version "$req_vers" )
+
if [ $has_existing == "false" ]
then
if [[ $(echo $pkg_req_build | grep -m1 -c "$req_name/$req_vers") < 1 ]]
then
pkg_req_build="$pkg_req_build $req_name/$req_vers"
fi
else
- bldr_log_info "Using required package '$req_name/$req_vers' for '$pkg_name/$pkg_vers' ... "
+ if [[ $(echo $pkg_req_has | grep -m1 -c "$req_name/$req_vers") < 1 ]]
+ then
+ bldr_log_info "Using required package '$req_name/$req_vers' for '$pkg_name/$pkg_vers' ... "
+ pkg_req_has="$pkg_req_has $req_name/$req_vers"
+ fi
fi
done
bldr_log_split
- bldr_log_status "Building required dependencies:"
- bldr_log_split
- bldr_log_list $pkg_req_build
- bldr_log_split
+ if [ "$pkg_req_build" != "" ]
+ then
+ bldr_log_status "Building required dependencies:"
+ bldr_log_split
- for pkg_need_name in ${pkg_req_build}
- do
- if [[ $(echo $pkg_need_name | grep -m1 -c '\/') > 0 ]]
- then
- local req_name=$(echo "$pkg_need_name" | sed 's/\/.*//g')
- local req_vers=$(echo "$pkg_need_name" | sed 's/.*\///g')
- else
- local req_name=$(echo "$pkg_need_name" | sed 's/\/.*//g')
- local req_vers="latest"
- fi
- bldr_build_required_pkg --name "$req_name" --version "$req_vers" --verbose "$use_verbose"
- done
- bldr_log_split
+ bldr_log_list $pkg_req_build
+ bldr_log_split
+
+ for pkg_need_name in ${pkg_req_build}
+ do
+ if [[ $(echo $pkg_need_name | grep -m1 -c '\/') > 0 ]]
+ then
+ local req_name=$(echo "$pkg_need_name" | sed 's/\/.*//g')
+ local req_vers=$(echo "$pkg_need_name" | sed 's/.*\///g')
+ else
+ local req_name=$(echo "$pkg_need_name" | sed 's/\/.*//g')
+ local req_vers="latest"
+ fi
+ bldr_build_required_pkg --name "$req_name" --version "$req_vers" --verbose "$use_verbose"
+ done
+ bldr_log_split
+ fi
fi
if [ $BLDR_VERBOSE != false ]

0 comments on commit b4aac99

Please sign in to comment.
Something went wrong with that request. Please try again.