From b597848f6b66fe77b6bbb073b2692365db3ea995 Mon Sep 17 00:00:00 2001 From: Silvan Calarco Date: Wed, 17 Jul 2013 14:32:17 +0200 Subject: [PATCH] pck-update: fix build requirements generation with multiple providers When --whatprovides returns multiple requirements only consider the first one. Seen with mono(..) requirements in monodevelop. --- plugins/pck-update.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/pck-update.in b/plugins/pck-update.in index ff83fb0..70dae54 100644 --- a/plugins/pck-update.in +++ b/plugins/pck-update.in @@ -2262,7 +2262,7 @@ $(echo $solibpath | sed "s|-[0-9.]*\.so|.so|")" elif [[ "$req" =~ .*\(.*\) || "$req" =~ .*\.so ]]; then # a(b) requirement or *.so library rpm -q --qf %{name} --whatprovides "$req" &>/dev/null && - buildreq="$(rpm -q --qf %{name} --whatprovides "$req")" || + buildreq="$(rpm -q --qf "%{name}\n" --whatprovides "$req"|head -n1)" || echo "#$req: unidentified build requirement" else # other requirements probably coming from static 'Requires:'