Skip to content
This repository has been archived by the owner on Nov 21, 2022. It is now read-only.

Commit

Permalink
[patterns] Add flags tag when ver is added to pattern entries
Browse files Browse the repository at this point in the history
Signed-off-by: Juha Kallioinen <juha.kallioinen@jollamobile.com>
  • Loading branch information
kaltsi authored and Islam Amer committed Sep 2, 2013
1 parent 15e25f9 commit e59ef21
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions repomd-pattern-builder.py
Expand Up @@ -106,14 +106,19 @@ def process_yaml(stream, version, release, xmlroot, nsmap_name, newobsapi):

name = p
ver = None
for op in [">=", "<=", ">", "<", "="]:
op_in = [">=", "<=", ">", "<", "="]
op_out = ["GE", "LE", "GT", "LT", "EQ"]
opc = 0
for op in op_in:
if op in p:
name, ver = p.split(op)
break
opc = opc + 1

entry.set("name", name.strip())
if ver:
entry.set("ver", "%s %s" % (op, ver.strip()))
entry.set("flags", "%s" % (op_out[opc]))
entry.set("ver", "%s" % (ver.strip()))

def create_patterns(patterns_dir, version, release, outputdir, newobsapi):
dirlist = os.listdir(patterns_dir)
Expand Down

0 comments on commit e59ef21

Please sign in to comment.