Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
meta-elphel393
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
Elphel
meta-elphel393
Commits
032b2a47
Commit
032b2a47
authored
Nov 24, 2016
by
Oleg Dzhimiev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
install versions for php and kernel
parent
68f23375
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
40 additions
and
96 deletions
+40
-96
elphel-misc-functions.bbclass
classes/elphel-misc-functions.bbclass
+34
-0
elphel-misc.bbclass
classes/elphel-misc.bbclass
+1
-32
php_5.6.%.bbappend
recipes-devtools/php/php_5.6.%.bbappend
+1
-32
linux-xlnx_4.0.bbappend
recipes-kernel/linux/linux-xlnx_4.0.bbappend
+4
-32
No files found.
classes/elphel-misc-functions.bbclass
0 → 100644
View file @
032b2a47
# Well
# returns string - based on file
def version_update(path,file,evr):
import os.path
if not os.path.exists(path+'/'+file):
return 0
f=open(path+'/'+file)
for line in f:
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]
f.close()
return res
def revision_update(path,file):
import subprocess
cmd = "cd "+path+"; git rev-list --count $(git log -1 --pretty=format:\"%H\" "+file+")..HEAD"
try:
res = subprocess.check_output(cmd,stderr=subprocess.STDOUT,shell=True)
except subprocess.CalledProcessError as e:
res = "error_"+e.returncode
res = str(int(res))
res = res.strip(' \t\n\r')
return res
classes/elphel-misc.bbclass
View file @
032b2a47
# Well
# returns string - based on file
def version_update(path,file,evr):
import os.path
if not os.path.exists(path+'/'+file):
return 0
f=open(path+'/'+file)
for line in f:
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]
f.close()
return res
def revision_update(path,file):
import subprocess
cmd = "cd "+path+"; git rev-list --count $(git log -1 --pretty=format:\"%H\" "+file+")..HEAD"
try:
res = subprocess.check_output(cmd,stderr=subprocess.STDOUT,shell=True)
except subprocess.CalledProcessError as e:
res = "error_"+e.returncode
res = str(int(res))
res = res.strip(' \t\n\r')
return res
inherit elphel-misc-functions
VFILE = "VERSION"
PE = "${@version_update('${VPATH}','${VFILE}',0)}"
...
...
recipes-devtools/php/php_5.6.%.bbappend
View file @
032b2a47
...
...
@@ -55,38 +55,7 @@ do_target_scp () {
ssh ${REMOTE_USER}@${REMOTE_IP} ${SSH_COMMAND}
}
# returns string - based on file
def version_update(path,file,evr):
import os.path
if not os.path.exists(path+'/'+file):
return 0
f=open(path+'/'+file)
for line in f:
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]
f.close()
return res
def revision_update(path,file):
import subprocess
cmd = "cd "+path+"; git rev-list --count $(git log -1 --pretty=format:\"%H\" "+file+")..HEAD"
try:
res = subprocess.check_output(cmd,stderr=subprocess.STDOUT,shell=True)
except subprocess.CalledProcessError as e:
res = "error_"+e.returncode
res = str(int(res))
res = res.strip(' \t\n\r')
return res
inherit elphel-misc-functions
ELPHEL_PE = "${@version_update('${VPATH}','${VFILE}',0)}"
ELPHEL_PV = "${@version_update('${VPATH}','${VFILE}',1)}"
...
...
recipes-kernel/linux/linux-xlnx_4.0.bbappend
View file @
032b2a47
...
...
@@ -158,39 +158,11 @@ kernel_do_compile() {
fi
}
# returns string - based on file
def version_update(path,file,evr):
import os.path
if not os.path.exists(path+'/'+file):
return 0
f=open(path+'/'+file)
for line in f:
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]
f.close()
return res
def revision_update(path,file):
import subprocess
cmd = "cd "+path+"; git rev-list --count $(git log -1 --pretty=format:\"%H\" "+file+")..HEAD"
try:
res = subprocess.check_output(cmd,stderr=subprocess.STDOUT,shell=True)
except subprocess.CalledProcessError as e:
res = "error_"+e.returncode
res = str(int(res))
res = res.strip(' \t\n\r')
return res
inherit elphel-misc-functions
VPATH = "${DEV_DIR}"
VFILE = "VERSION"
ELPHEL_PE = "${@version_update('${VPATH}','${VFILE}',0)}"
ELPHEL_PV = "${@version_update('${VPATH}','${VFILE}',1)}"
ELPHEL_PR = "${@version_update('${VPATH}','${VFILE}',2)}"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment