CRI-O: fix crio_image regexp#944
Conversation
There was a problem hiding this comment.
You don't need Perl regex for this
There was a problem hiding this comment.
And in what case does ORIGIN_PKG_VERSION have more than one line?
There was a problem hiding this comment.
never, but if you get "-3.9.0-something3.4-something432" you'll get:
3.9
3.4
so, that's why the head
There was a problem hiding this comment.
That's what's happening in openshift/openshift-ansible#6449 for instance
-3.9.0-0.alpha.0.169.a2ec324
$ echo "-3.9.0-0.alpha.0.169.a2ec324" | grep -Po '\d\.\d' 1 ↵
3.9
0.1
There was a problem hiding this comment.
You don't need Perl regex for this
do you have any suggestion about doing this w/o perl regexp? I'll happly use your command
There was a problem hiding this comment.
The current regex can be written without Perl syntax, but we can be more specific anyway. It is fair to assume that we could do:
crio_tag="$( grep -Po "(?<=^-)[0-9]+\.[0-9]+" ./ORIGIN_PKG_VERSION )"42ae851 to
0fcd3d0
Compare
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
0fcd3d0 to
44ea04a
Compare
|
Ping @stevekuznetsov 👼 |
|
Make it more robust cause it was failing with weird matches.
@stevekuznetsov @mrunalp PTAL
Signed-off-by: Antonio Murdaca runcom@redhat.com