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

PE_PV-PR

parent 3fef028f
# Well
# returns string - based on file
def version_update(path,file):
with open(path+'/'+file, 'r') as content_file:
content = content_file.read()
content = content.strip(' \t\n\r')
return content
def version_update(path,file,evr):
for line in open(path+'/'+file):
line = line.strip()
if (line[0]!="#"):
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):
import subprocess
cmd = "cd "+path+"; git rev-list --count $(git log -1 --pretty=format:\"%H\" "+file+")..HEAD"
......
......@@ -20,8 +20,9 @@ SRCDATE = "20131202"
inherit elphel-misc
VPATH = "${TOPDIR}/../../fpga-elphel/x393"
VFILE = "VERSION"
PV = "${@version_update ('${VPATH}','${VFILE}')}"
PR = "${@revision_update('${VPATH}','${VFILE}')}"
PE = "${@version_update('${VPATH}','${VFILE}',0)}"
PV = "${@version_update('${VPATH}','${VFILE}',1)}"
PR = "${@version_update('${VPATH}','${VFILE}',2)}"
RDEPENDS_${PN} += "\
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