* [PATCH] fetcher: svn: Add support for checkout to a custom path
@ 2015-10-16 17:14 Jens Rehsack
2015-10-29 13:00 ` Jens Rehsack
0 siblings, 1 reply; 3+ messages in thread
From: Jens Rehsack @ 2015-10-16 17:14 UTC (permalink / raw)
To: bitbake-devel
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.
Signed-off-by: Jens Rehsack <sno@netbsd.org>
---
bitbake/lib/bb/fetch2/svn.py | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/bitbake/lib/bb/fetch2/svn.py b/bitbake/lib/bb/fetch2/svn.py
index 1733c2b..8a29193 100644
--- a/bitbake/lib/bb/fetch2/svn.py
+++ b/bitbake/lib/bb/fetch2/svn.py
@@ -54,6 +54,11 @@ class Svn(FetchMethod):
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
relpath = self._strip_leading_slashes(ud.path)
ud.pkgdir = os.path.join(data.expand('${SVNDIR}', d), ud.host, relpath)
@@ -102,7 +107,7 @@ class Svn(FetchMethod):
if command == "fetch":
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":
svncmd = "%s update %s" % (ud.basecmd, " ".join(options))
else:
@@ -149,7 +154,7 @@ class Svn(FetchMethod):
os.chdir(ud.pkgdir)
# 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):
""" Clean SVN specific files and dirs """
--
2.4.3
--
Jens Rehsack - rehsack@gmail.com
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH] fetcher: svn: Add support for checkout to a custom path
2015-10-16 17:14 [PATCH] fetcher: svn: Add support for checkout to a custom path Jens Rehsack
@ 2015-10-29 13:00 ` Jens Rehsack
2015-10-29 22:02 ` Richard Purdie
0 siblings, 1 reply; 3+ messages in thread
From: Jens Rehsack @ 2015-10-29 13:00 UTC (permalink / raw)
To: bitbake-devel
> Am 16.10.2015 um 19:14 schrieb Jens Rehsack <rehsack@gmail.com>:
>
>
> 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.
>
> Signed-off-by: Jens Rehsack <sno@netbsd.org>
> ---
> bitbake/lib/bb/fetch2/svn.py | 9 +++++++--
> 1 file changed, 7 insertions(+), 2 deletions(-)
>
> diff --git a/bitbake/lib/bb/fetch2/svn.py b/bitbake/lib/bb/fetch2/svn.py
> index 1733c2b..8a29193 100644
> --- a/bitbake/lib/bb/fetch2/svn.py
> +++ b/bitbake/lib/bb/fetch2/svn.py
> @@ -54,6 +54,11 @@ class Svn(FetchMethod):
>
> 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
> relpath = self._strip_leading_slashes(ud.path)
> ud.pkgdir = os.path.join(data.expand('${SVNDIR}', d), ud.host, relpath)
> @@ -102,7 +107,7 @@ class Svn(FetchMethod):
>
> if command == "fetch":
> 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":
> svncmd = "%s update %s" % (ud.basecmd, " ".join(options))
> else:
> @@ -149,7 +154,7 @@ class Svn(FetchMethod):
>
> os.chdir(ud.pkgdir)
> # 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):
> """ Clean SVN specific files and dirs """
> --
> 2.4.3
Ping :)
--
Jens Rehsack - rehsack@gmail.com
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH] fetcher: svn: Add support for checkout to a custom path
2015-10-29 13:00 ` Jens Rehsack
@ 2015-10-29 22:02 ` Richard Purdie
0 siblings, 0 replies; 3+ messages in thread
From: Richard Purdie @ 2015-10-29 22:02 UTC (permalink / raw)
To: Jens Rehsack; +Cc: bitbake-devel
On Thu, 2015-10-29 at 14:00 +0100, Jens Rehsack wrote:
> > Am 16.10.2015 um 19:14 schrieb Jens Rehsack <rehsack@gmail.com>:
> >
> >
> > 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.
> >
> > Signed-off-by: Jens Rehsack <sno@netbsd.org>
> > ---
> > bitbake/lib/bb/fetch2/svn.py | 9 +++++++--
> > 1 file changed, 7 insertions(+), 2 deletions(-)
> >
> > diff --git a/bitbake/lib/bb/fetch2/svn.py b/bitbake/lib/bb/fetch2/svn.py
> > index 1733c2b..8a29193 100644
> > --- a/bitbake/lib/bb/fetch2/svn.py
> > +++ b/bitbake/lib/bb/fetch2/svn.py
> > @@ -54,6 +54,11 @@ class Svn(FetchMethod):
> >
> > 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
> > relpath = self._strip_leading_slashes(ud.path)
> > ud.pkgdir = os.path.join(data.expand('${SVNDIR}', d), ud.host, relpath)
> > @@ -102,7 +107,7 @@ class Svn(FetchMethod):
> >
> > if command == "fetch":
> > 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":
> > svncmd = "%s update %s" % (ud.basecmd, " ".join(options))
> > else:
> > @@ -149,7 +154,7 @@ class Svn(FetchMethod):
> >
> > os.chdir(ud.pkgdir)
> > # 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):
> > """ Clean SVN specific files and dirs """
> > --
> > 2.4.3
>
> Ping :)
It merged 3 days ago:
http://git.yoctoproject.org/cgit.cgi/poky/commit/?id=dcd9cd0f9e117d5cc1440ddbf7582e3440d0cc66
Cheers,
Richard
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-10-29 22:03 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-16 17:14 [PATCH] fetcher: svn: Add support for checkout to a custom path Jens Rehsack
2015-10-29 13:00 ` Jens Rehsack
2015-10-29 22:02 ` Richard Purdie
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.