_msg_debug "Iso filename is ${iso_filename}"
- # Check packages
- if [[ ${arch} = $(uname -m) ]]; then
+ # Check packages
+ if [[ "${nodepend}" = false ]] && [[ "${arch}" = $(uname -r) ]] ; then
local installed_pkg
local installed_ver
local check_pkg
fi
fi
done
-
- if [[ "${check_failed}" = true ]]; then
- exit 1
- fi
+ echo -n "not"
+ return 0
}
+ echo
+ if [[ ${debug} = false ]]; then
+ _msg_info "Checking dependencies ..."
+ fi
+ for pkg in ${dependence[@]}; do
+ _msg_debug -n "Checking ${pkg} ..."
+ case $(check_pkg ${pkg}) in
+ "old")
+ [[ "${debug}" = true ]] && echo -ne " $(pacman -Q ${pkg} | awk '{print $2}')\n"
+ _msg_warn "${pkg} is not the latest package."
+ _msg_warn "Local: $(pacman -Q ${pkg} 2> /dev/null | awk '{print $2}') Latest: $(pacman -Sp --print-format '%v' --config ${build_pacman_conf} ${pkg} 2> /dev/null)"
+ echo
+ ;;
+ "not") _msg_error "${pkg} is not installed." ; check_failed=true ;;
+ "norepo") _msg_warn "${pkg} is not a repository package." ;;
+ "installed") [[ ${debug} = true ]] && echo -ne " $(pacman -Q ${pkg} | awk '{print $2}')\n" ;;
+ esac
+ done
+
+ if [[ "${check_failed}" = true ]]; then
+ exit 1
+ fi
fi
# Load loop kernel module