Commit 05698d7c by Jiri Slaby Committed by Stéphane Graber

templates: lxc-opensuse, use rpm to determine build version

zypper info's output is not usable for several reasons: * it is localized -- there is no "Version: " in my output * it shows results both from the repo and local system So use plain rpm to determine whether build is installed and if proper version is in place. Signed-off-by: 's avatarJiri Slaby <jslaby@suse.cz>
parent 4d7ca2e6
...@@ -421,7 +421,8 @@ if [ -z "$path" ]; then ...@@ -421,7 +421,8 @@ if [ -z "$path" ]; then
fi fi
if grep -q Harlequin /etc/os-release || grep -q Tumbleweed /etc/os-release ; then if grep -q Harlequin /etc/os-release || grep -q Tumbleweed /etc/os-release ; then
if [[ "$(zypper info build|awk -F "[- ]" '/Version/ {print $2}')" -lt "20141120" ]] ; then BVER=`rpm -q --qf '%{version}\n' build`
if [ $? -ne 0 -o "$BVER" -lt "20141120" ]; then
echo "Building openSUSE containers with your version of the build package is broken. Please install the update to version 20141120 or newer." echo "Building openSUSE containers with your version of the build package is broken. Please install the update to version 20141120 or newer."
exit 1 exit 1
fi fi
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment