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

PE_PV-PR

parent 3fef028f
# 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
......
...@@ -20,8 +20,9 @@ SRCDATE = "20131202" ...@@ -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 \
......
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