From ec9f775c879d564d049197e9988ff4fdf01d6c67 Mon Sep 17 00:00:00 2001 From: Silvan Calarco Date: Thu, 4 Sep 2014 14:01:45 +0200 Subject: [PATCH] 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. --- plugins/pck-update.in | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/plugins/pck-update.in b/plugins/pck-update.in index a2fe156..0a486ae 100644 --- a/plugins/pck-update.in +++ b/plugins/pck-update.in @@ -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