Skip to contentSkip to conversation

fetch2/cvs.py: Switch to use FETCHCMD_cvs and handle parameters in the fetcher itself

PATCH New Richard Purdie 1 participant 1 message Jul 9, 2012

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fetch2/cvs.py: Switch to use FETCHCMD_cvs and handle parameters in the fetcher itself

This brings the cvs fetcher more into line with the others and allows consistent usage of the FETCHCMD variable and option handling.

---

bitbake/lib/bb/fetch2/cvs.py +3 -9
index a111467..6a948c4 100644
@@ -111,15 +111,9 @@ class Cvs(FetchMethod):
         if ud.tag:
             options.append("-r %s" % ud.tag)
 
-        localdata = data.createCopy(d)
-        data.setVar('OVERRIDES', "cvs:%s" % data.getVar('OVERRIDES', localdata), localdata)
-        data.update_data(localdata)
-
-        data.setVar('CVSROOT', cvsroot, localdata)
-        data.setVar('CVSCOOPTS', " ".join(options), localdata)
-        data.setVar('CVSMODULE', ud.module, localdata)
-        cvscmd = data.getVar('FETCHCOMMAND', localdata, True)
-        cvsupdatecmd = data.getVar('UPDATECOMMAND', localdata, True)
+        cvsbasecmd = d.getVar("FETCHCMD_cvs", True)
+        cvscmd = cvsbasecmd + "'-d" + cvsroot + "' co " + " ".join(options) + " " + ud.module
+        cvsupdatecmd = cvsbasecmd + "'-d" + cvsroot + "' update -d -P " + " ".join(options)
 
         if cvs_rsh:
             cvscmd = "CVS_RSH=\"%s\" %s" % (cvs_rsh, cvscmd)