r319 - trunk/scripts

DONOTREPLY at icculus.org DONOTREPLY at icculus.org
Sun May 27 15:03:01 EDT 2007


Author: icculus
Date: 2007-05-27 15:03:01 -0400 (Sun, 27 May 2007)
New Revision: 319

Modified:
   trunk/scripts/loki_setup_compat.lua
   trunk/scripts/mojosetup_mainline.lua
Log:
Bunch of fixes and work on loki_setup_compat.lua ...


Modified: trunk/scripts/loki_setup_compat.lua
===================================================================
--- trunk/scripts/loki_setup_compat.lua	2007-05-27 18:44:31 UTC (rev 318)
+++ trunk/scripts/loki_setup_compat.lua	2007-05-27 19:03:01 UTC (rev 319)
@@ -20,11 +20,10 @@
 
 -- !!! FIXME: some of these are currently-undocumented MojoSetup.* methods...
 
-function MojoSetup.Loki.manifest(update_url)
-    local install = MojoSetup.install
+function MojoSetup.Loki.manifest(install, update_url)
     local manifestdir = MojoSetup.destination .. "/.manifest"
     MojoSetup.installed_files[#MojoSetup.installed_files+1] = manifestdir
-    if not MojoSetup.platform.mkdir(dest, perms) then
+    if not MojoSetup.platform.mkdir(manifestdir) then
         -- !!! FIXME: formatting
         MojoSetup.logerror("Failed to create dir '" .. manifestdir .. "'")
         MojoSetup.fatal(_("mkdir failed"))
@@ -52,7 +51,7 @@
     f:write('  <component name="Default" version="' .. install.version ..
             '" default="yes">\n')
 
-    local destlen = string.length(MojoSetup.destination) + 2
+    local destlen = string.len(MojoSetup.destination) + 2
     for option,items in pairs(MojoSetup.manifest) do
         f:write('    <option name="' .. option.description .. '">\n')
         for i,item in ipairs(items) do
@@ -61,6 +60,11 @@
                 type = "directory"
             end
 
+            local mode = item.mode
+            if mode == nil then
+                mode = "0600"   -- !!! FIXME
+            end
+
             local path = item.path
             if path ~= nil then
                 path = string.sub(path, destlen)  -- make it relative.
@@ -72,9 +76,9 @@
                 for k,v in pairs(item.checksums) do
                     xml = xml .. ' ' .. k .. '="' .. v .. '"'
                 end
-                xml = xml .. ' mode="' .. item.mode .. '"'
+                xml = xml .. ' mode="' .. mode .. '"'
             elseif type == "directory" then
-                xml = xml .. ' mode="' .. item.mode .. '"'
+                xml = xml .. ' mode="' .. mode .. '"'
             elseif type == "symlink" then
                 xml = xml .. ' dest="' .. item.linkdest .. '" mode="0777"'
             end
@@ -82,6 +86,7 @@
             xml = xml .. '>' .. path .. "</" .. type .. ">\n"
             f:write(xml)
         end
+        f:write('    </option>\n')
     end
 
     f:write('  </component>\n')

Modified: trunk/scripts/mojosetup_mainline.lua
===================================================================
--- trunk/scripts/mojosetup_mainline.lua	2007-05-27 18:44:31 UTC (rev 318)
+++ trunk/scripts/mojosetup_mainline.lua	2007-05-27 19:03:01 UTC (rev 319)
@@ -264,6 +264,8 @@
         end
     end
 
+    -- !!! FIXME: perms may be null...we need a MojoSetup.defaultPermsString()...
+
     if option ~= nil then
         if MojoSetup.manifest[option] == nil then
             MojoSetup.manifest[option] = {}




More information about the mojosetup-commits mailing list