Patchwork [bitbake-devel] cvs.py fetcher

login
register
mail settings
Submitter Jate Sujjavanich
Date Sept. 18, 2012, 4:27 p.m.
Message ID <6C2434209962DC46B88345CA85C334A20183E5A98599@Courier.syntech.org>
Download mbox | patch
Permalink /patch/36957/
State New
Headers show

Comments

Jate Sujjavanich - Sept. 18, 2012, 4:27 p.m.
While using a newer bitbake, I ran into some issues with a recipe that has a cvs SRC_URI. This patch fixes it, and I wanted to submit it for further review.


The localdata variable was removed but is required later in the download
function.
Add an extra space so that cvscmd's parameter is separated from the
command.
Signed-off-by: Jate Sujjavanich <jate.sujjavanich@myfuelmaster.com>
----------------------------- lib/bb/fetch2/cvs.py ----------------------------
Gary Thomas - Sept. 20, 2012, 10:44 a.m.
On 2012-09-18 10:27, Jate Sujjavanich wrote:
> While using a newer bitbake, I ran into some issues with a recipe that has a cvs SRC_URI. This patch fixes it, and I wanted to submit it for further review.
>
>
> The localdata variable was removed but is required later in the download
> function.
> Add an extra space so that cvscmd's parameter is separated from the
> command.
> Signed-off-by: Jate Sujjavanich <jate.sujjavanich@myfuelmaster.com>
> ----------------------------- lib/bb/fetch2/cvs.py ----------------------------
> diff --git a/lib/bb/fetch2/cvs.py b/lib/bb/fetch2/cvs.py
> index 6a948c4..5249d85 100644
> --- a/lib/bb/fetch2/cvs.py
> +++ b/lib/bb/fetch2/cvs.py
> @@ -111,8 +111,10 @@
>           if ud.tag:
>               options.append("-r %s" % ud.tag)
>
> +        localdata = data.createCopy(d)
> +
>           cvsbasecmd = d.getVar("FETCHCMD_cvs", True)
> -        cvscmd = cvsbasecmd + "'-d" + cvsroot + "' co " + " ".join(options) + " " + ud.module
> +        cvscmd = cvsbasecmd + " " + "'-d" + cvsroot + "' co " + " ".join(options) + " " + ud.module

Why not just add the space to the string that's already there, rather
than add another concatenation?  i.e.
     cvscmd = cvsbasecmd + " '-d" + cvsroot + "' co " + " ".join(options) + " " + ud.module

>           cvsupdatecmd = cvsbasecmd + "'-d" + cvsroot + "' update -d -P " + " ".join(options)
>
>           if cvs_rsh:

Patch

diff --git a/lib/bb/fetch2/cvs.py b/lib/bb/fetch2/cvs.py
index 6a948c4..5249d85 100644
--- a/lib/bb/fetch2/cvs.py
+++ b/lib/bb/fetch2/cvs.py
@@ -111,8 +111,10 @@ 
         if ud.tag:
             options.append("-r %s" % ud.tag)
 
+        localdata = data.createCopy(d)
+        
         cvsbasecmd = d.getVar("FETCHCMD_cvs", True)
-        cvscmd = cvsbasecmd + "'-d" + cvsroot + "' co " + " ".join(options) + " " + ud.module
+        cvscmd = cvsbasecmd + " " + "'-d" + cvsroot + "' co " + " ".join(options) + " " + ud.module
         cvsupdatecmd = cvsbasecmd + "'-d" + cvsroot + "' update -d -P " + " ".join(options)
 
         if cvs_rsh: