mirror of
https://github.com/openembedded/meta-openembedded.git
synced 2026-07-15 16:07:26 +00:00
gitver: skip packages instead of panic()ing if ${GITVER} fails to expand
`inherit externalsrc gitver` is a very useful combo to get development trees
in your workspace having a ${PN}_git.bb with PV=${GITVER} coexisting with a regular
${PN}_${PV}.bb
but not everyone wants to checkout all developments sources and managinging different
layers for each options is quite troublesome.
making `gitver` skip the .bb instead of panic()ing every time EXTERNALSRC is missing
allows people to have a single development layer where packages get enabled if
the right sources are present or falling back to the last release if not
Signed-off-by: Alejandro Mery <amery@hanoverdisplays.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
This commit is contained in:
committed by
Armin Kuster
parent
4acb87b4d8
commit
29225f2e23
@@ -27,23 +27,20 @@ def get_git_pv(d, tagadjust=None):
|
|||||||
gitdir = os.path.abspath(os.path.join(srcdir, ".git"))
|
gitdir = os.path.abspath(os.path.join(srcdir, ".git"))
|
||||||
try:
|
try:
|
||||||
ver = gitrev_run("git describe --tags", gitdir)
|
ver = gitrev_run("git describe --tags", gitdir)
|
||||||
except Exception as exc:
|
except:
|
||||||
bb.fatal(str(exc))
|
|
||||||
|
|
||||||
if not ver:
|
|
||||||
try:
|
try:
|
||||||
ver = gitrev_run("git rev-parse --short HEAD", gitdir)
|
ver = gitrev_run("git rev-parse --short HEAD", gitdir)
|
||||||
except Exception as exc:
|
if ver:
|
||||||
bb.fatal(str(exc))
|
return "0.0+%s" % ver
|
||||||
|
else:
|
||||||
|
return "0.0"
|
||||||
|
|
||||||
if ver:
|
except Exception as exc:
|
||||||
return "0.0+%s" % ver
|
raise bb.parse.SkipPackage(str(exc))
|
||||||
else:
|
|
||||||
return "0.0"
|
if ver and tagadjust:
|
||||||
else:
|
ver = tagadjust(ver)
|
||||||
if tagadjust:
|
return ver
|
||||||
ver = tagadjust(ver)
|
|
||||||
return ver
|
|
||||||
|
|
||||||
def get_git_hash(d):
|
def get_git_hash(d):
|
||||||
import os
|
import os
|
||||||
|
|||||||
Reference in New Issue
Block a user