mirror of
https://git.yoctoproject.org/poky
synced 2026-05-30 00:20:08 +00:00
bitbake: fetcher: svn: Add support for checkout to a custom path
Add support for the Subversion fetcher to checkout modules to a custom path than the module name to avoid checkout is always module - svn is path based and tag/branch-checkout might break builds because of invaid path specs. (Bitbake rev: af88f538e61afa1b115be4d7afe00d8477f61750) Signed-off-by: Jens Rehsack <sno@netbsd.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
4ab7202c31
commit
dcd9cd0f9e
@@ -54,6 +54,11 @@ class Svn(FetchMethod):
|
|||||||
|
|
||||||
ud.module = ud.parm["module"]
|
ud.module = ud.parm["module"]
|
||||||
|
|
||||||
|
if not "path_spec" in ud.parm:
|
||||||
|
ud.path_spec = ud.module
|
||||||
|
else:
|
||||||
|
ud.path_spec = ud.parm["path_spec"]
|
||||||
|
|
||||||
# Create paths to svn checkouts
|
# Create paths to svn checkouts
|
||||||
relpath = self._strip_leading_slashes(ud.path)
|
relpath = self._strip_leading_slashes(ud.path)
|
||||||
ud.pkgdir = os.path.join(data.expand('${SVNDIR}', d), ud.host, relpath)
|
ud.pkgdir = os.path.join(data.expand('${SVNDIR}', d), ud.host, relpath)
|
||||||
@@ -102,7 +107,7 @@ class Svn(FetchMethod):
|
|||||||
|
|
||||||
if command == "fetch":
|
if command == "fetch":
|
||||||
transportuser = ud.parm.get("transportuser", "")
|
transportuser = ud.parm.get("transportuser", "")
|
||||||
svncmd = "%s co %s %s://%s%s/%s%s %s" % (ud.basecmd, " ".join(options), proto, transportuser, svnroot, ud.module, suffix, ud.module)
|
svncmd = "%s co %s %s://%s%s/%s%s %s" % (ud.basecmd, " ".join(options), proto, transportuser, svnroot, ud.module, suffix, ud.path_spec)
|
||||||
elif command == "update":
|
elif command == "update":
|
||||||
svncmd = "%s update %s" % (ud.basecmd, " ".join(options))
|
svncmd = "%s update %s" % (ud.basecmd, " ".join(options))
|
||||||
else:
|
else:
|
||||||
@@ -149,7 +154,7 @@ class Svn(FetchMethod):
|
|||||||
|
|
||||||
os.chdir(ud.pkgdir)
|
os.chdir(ud.pkgdir)
|
||||||
# tar them up to a defined filename
|
# tar them up to a defined filename
|
||||||
runfetchcmd("tar %s -czf %s %s" % (tar_flags, ud.localpath, ud.module), d, cleanup = [ud.localpath])
|
runfetchcmd("tar %s -czf %s %s" % (tar_flags, ud.localpath, ud.path_spec), d, cleanup = [ud.localpath])
|
||||||
|
|
||||||
def clean(self, ud, d):
|
def clean(self, ud, d):
|
||||||
""" Clean SVN specific files and dirs """
|
""" Clean SVN specific files and dirs """
|
||||||
|
|||||||
Reference in New Issue
Block a user