Loading classes/elphel-misc.bbclass +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 Loading recipes-core/init-elphel393/init-elphel393_1.0.bb +3 −2 Original line number Original line Diff line number Diff line Loading @@ -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 \ Loading Loading
classes/elphel-misc.bbclass +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 Loading
recipes-core/init-elphel393/init-elphel393_1.0.bb +3 −2 Original line number Original line Diff line number Diff line Loading @@ -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 \ Loading