]> git.e2factory.org Git - e2factory.git/commitdiff
Fixup argument passing to the e2lib.svn() function
authorTobias Ulmer <tu@emlix.com>
Tue, 10 Jul 2012 12:32:55 +0000 (14:32 +0200)
committerTobias Ulmer <tu@emlix.com>
Tue, 10 Jul 2012 12:32:55 +0000 (14:32 +0200)
Signed-off-by: Tobias Ulmer <tu@emlix.com>
local/svn.lua

index 47728511080cd8fd5c18826976cc7cc26d04591a..e0ba9e07bb13ae8889e94cd0292462c80d71e7db 100644 (file)
@@ -57,13 +57,13 @@ end
 
 local svn = {}
 
-function svn.fetch_source(info, sourcename) --OK
+function svn.fetch_source(info, sourcename)
   local rc, re = svn.validate_source(info, sourcename)
   if not rc then
     return false, re
   end
   local e = new_error("fetching source failed: %s", sourcename)
-  local src = info.sources[ sourcename ]
+  local src = info.sources[sourcename]
   local location = src.location
   local server = src.server
   local surl, re = info.cache:remote_url(server, location)
@@ -74,9 +74,10 @@ function svn.fetch_source(info, sourcename) --OK
   if not svnurl then
     return false, e:cat(re)
   end
-  local args = string.format("checkout '%s' '%s/%s'", svnurl, info.root,
-                                                               src.working)
-  rc, re = e2lib.svn(args)
+
+  local argv = { "checkout", svnurl, info.root .. "/" .. src.working }
+
+  rc, re = e2lib.svn(argv)
   if not rc then
     return false, e:cat(re)
   end
@@ -107,9 +108,9 @@ function svn.prepare_source(info, sourcename, source_set, build_path) --OK
     else -- source_set == "branch"
       rev = src.branch
     end
-    local args = string.format("export '%s/%s' '%s/%s'", svnurl, rev,
-                                               build_path, sourcename)
-    rc, re = e2lib.svn(args)
+    local argv = { "export", svnurl .. "/" .. rev,
+      build_path .. "/" .. sourcename }
+    rc, re = e2lib.svn(argv)
     if not rc then
       return false, e:cat(re)
     end
@@ -307,8 +308,7 @@ function svn.update(info, sourcename)
   if not rc then
     return false, e:cat(re)
   end
-  local args = "update"
-  rc, re = e2lib.svn(args)
+  rc, re = e2lib.svn({ "update", })
   if not rc then
     return false, e:cat(re)
   end