diff --git a/api b/api index 9b6663b002..da0a306428 100755 --- a/api +++ b/api @@ -600,6 +600,9 @@ install_packages() { #Make some packages dependencies of the $app app. Package-n #request package version if backports repo was specified elif [ ! -z "$repo_selection" ];then local packageversion="$(package_latest_version "$package" -t "$repo_selection" | sed 's/+.*//g')" + if [ -z "$packageversion" ];then + error "install_packages(): failed to get package version for $package, apt-cache output was $(apt-cache policy -t "$repo_selection" "$package" 2>&1)" + fi #add version specification to package packages="$(echo "$packages" | sed "s|^${package}$|$package (>= $packageversion)|")" fi