Commit 1aeb6d8c authored by Oleg Dzhimiev's avatar Oleg Dzhimiev
Browse files

PE_PV-PR

parent 3fef028f
Loading
Loading
Loading
Loading
+15 −6
Original line number Original line Diff line number Diff line
# Well
# Well


# returns string - based on file
# returns string - based on file
def version_update(path,file):
def version_update(path,file,evr):
    with open(path+'/'+file, 'r') as content_file:
    for line in open(path+'/'+file):
        content = content_file.read()
        line = line.strip()
        content = content.strip(' \t\n\r')
        if (line[0]!="#"):
    return content
            break
    arr = line.split('.')
    try:
        arr[evr]
    except IndexError:
        if (evr==1): res = 0
        if (evr==2): res = revision_update(path,file)
    else:
        res = arr[evr]
    return res
    
    
def revision_update(path,file):
def revision_update(path,file):
    import subprocess
    import subprocess
+3 −2
Original line number Original line Diff line number Diff line
@@ -20,8 +20,9 @@ SRCDATE = "20131202"
inherit elphel-misc
inherit elphel-misc
VPATH = "${TOPDIR}/../../fpga-elphel/x393"
VPATH = "${TOPDIR}/../../fpga-elphel/x393"
VFILE = "VERSION"
VFILE = "VERSION"
PV = "${@version_update ('${VPATH}','${VFILE}')}"
PE = "${@version_update('${VPATH}','${VFILE}',0)}"
PR = "${@revision_update('${VPATH}','${VFILE}')}"
PV = "${@version_update('${VPATH}','${VFILE}',1)}"
PR = "${@version_update('${VPATH}','${VFILE}',2)}"


RDEPENDS_${PN} += "\ 
RDEPENDS_${PN} += "\ 
             python-core \
             python-core \