Giter Site home page Giter Site logo

Comments (3)

rdannert avatar rdannert commented on July 23, 2024 1

on linux cmdline(using zypper version 1.14.27 from openSUSE15.1)

$ zypper -V
$ zypper_version=($(zypper -V))
$ echo ${zypper_version[1]}
1.14.27
$ if [[ ${zypper_version[1]} < '1.14.4' ]]; then echo smaller; else echo larger; fi
smaller

which is clearly wrong

rpmdev-vercmp needs the 'zypper-1.14.4' syntax, because the python algorithm requires it

from vagrant-caasp.

SweBarre avatar SweBarre commented on July 23, 2024

Hi,
I don't really understand the problem here but

#zypper_version=($(zypper -V))
zypper_version='1.14.27'
if [[ ${zypper_version[1]} < '1.14.4' ]]

This won't work,
The row you commented out zypper_version=($(zypper -V)) would result in an array, så ${zypper_version[0] would contain the word zypper and ${zypper_version[1]} would contain the version.
When you just put the version in the zypper_version variable like this zypper_version='1.14.27 then the the ${zypper_version[1]}' wouldn't contain anything. And the row if [[ ${zypper_version[1]} < '1.14.4' ]]` would always compare a blank variable with 1.14.4.

You could test this yourself

$> zypper_version=($(zypper -V))
$> echo ${zypper_version[0]}
zypper
$> echo ${zypper_version[1]}
1.14.27
$> unset zypper_version
$> zypper_version='1.14.27
$> echo ${zypper_version[0]}
1.14.27
$> echo ${zypper_version[1]}

anyhow, the zypper_version test in libvirt_setup/openSUSE_vagrant_setup.sh seems to work for me, what is not working for you?

from vagrant-caasp.

SweBarre avatar SweBarre commented on July 23, 2024

Got it, now I understand the issue.

from vagrant-caasp.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.