pck-update: support for package.arch specfile build requirement

When this form of requirement is detected it is converted to package@arch as required by smart.
Also add comments and a FIXME about a problem with previous patch of this code and noarch packages.
This commit is contained in:
Silvan Calarco 2014-09-04 14:01:45 +02:00
parent 6f965f674b
commit ec9f775c87

View File

@ -1990,7 +1990,15 @@ build requirement found"": \`${NOTE}$f${NORM}' ""\
# remove duplicates
buildreqs_to_install=(
$(for f in ${buildreqs_to_install[@]}; do echo $f@$target_cpu; done | sort -u))
$(for f in ${buildreqs_to_install[@]}; do
if [ "${f/.*}" != "${f}" ]; then
# if arch specified convert from spec to smart format: package.arch -> package@arch
echo ${f/./@}
else
# if not add arch (FIXME: smart won't find package if noarch)
echo $f@$target_cpu
fi
done | sort -u))
# install missing build requirements
if [[ "${buildreqs_to_install[@]}" ]]; then