mirror of
git://git.openembedded.org/meta-openembedded
synced 2026-01-01 13:58:06 +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:
parent
718daa9754
commit
6ee7d06426
|
|
@ -27,23 +27,20 @@ def get_git_pv(d, tagadjust=None):
|
|||
gitdir = os.path.abspath(os.path.join(srcdir, ".git"))
|
||||
try:
|
||||
ver = gitrev_run("git describe --tags", gitdir)
|
||||
except Exception as exc:
|
||||
bb.fatal(str(exc))
|
||||
|
||||
if not ver:
|
||||
except:
|
||||
try:
|
||||
ver = gitrev_run("git rev-parse --short HEAD", gitdir)
|
||||
except Exception as exc:
|
||||
bb.fatal(str(exc))
|
||||
if ver:
|
||||
return "0.0+%s" % ver
|
||||
else:
|
||||
return "0.0"
|
||||
|
||||
if ver:
|
||||
return "0.0+%s" % ver
|
||||
else:
|
||||
return "0.0"
|
||||
else:
|
||||
if tagadjust:
|
||||
ver = tagadjust(ver)
|
||||
return ver
|
||||
except Exception as exc:
|
||||
raise bb.parse.SkipPackage(str(exc))
|
||||
|
||||
if ver and tagadjust:
|
||||
ver = tagadjust(ver)
|
||||
return ver
|
||||
|
||||
def get_git_hash(d):
|
||||
import os
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user