summaryrefslogtreecommitdiff
path: root/lua_scripts
diff options
context:
space:
mode:
authorLauri Aarnio <Lauri.Aarnio@iki.fi>2009-02-01 17:03:13 +0200
committerLauri Leukkunen <lle@rahina.org>2009-02-10 08:38:10 +0200
commit817d61e3147380963342acef5df60acb56d9673e (patch)
treece4bfa41a7cf2b127a3fea48f203b05dfca6200f /lua_scripts
parent36506e8e28b3c3bc133dce438e0571e911c044be (diff)
"devel" mode: Changed mapping of /bin, /usr/bin/, /sbin and /usr/sbin
- First try to map to tools_root, but if the program does not exist there, the mapping leads to target_root. This makes it possible to use many tools that are not available at all from the tools distro.
Diffstat (limited to 'lua_scripts')
-rw-r--r--lua_scripts/create_argvmods_usr_bin_rules.lua2
-rw-r--r--lua_scripts/pathmaps/devel/00_default.lua22
2 files changed, 18 insertions, 6 deletions
diff --git a/lua_scripts/create_argvmods_usr_bin_rules.lua b/lua_scripts/create_argvmods_usr_bin_rules.lua
index d617a5e..ce04823 100644
--- a/lua_scripts/create_argvmods_usr_bin_rules.lua
+++ b/lua_scripts/create_argvmods_usr_bin_rules.lua
@@ -42,7 +42,7 @@ function argvmods_to_mapping_rules()
end
if (default_rule ~= nil) then
print(" -- default:")
- print(" {prefix=\"/usr/bin\",", default_rule, "}")
+ print(" ", default_rule)
end
print(" }")
print("}")
diff --git a/lua_scripts/pathmaps/devel/00_default.lua b/lua_scripts/pathmaps/devel/00_default.lua
index 41e3b9c..15f370f 100644
--- a/lua_scripts/pathmaps/devel/00_default.lua
+++ b/lua_scripts/pathmaps/devel/00_default.lua
@@ -343,8 +343,12 @@ devel_mode_rules_usr_bin = {
{prefix = "/usr/bin/perl", actions = perl_bin_test},
{prefix = "/usr/bin/python", actions = python_bin_test},
- -- default: automatically generated rules for /usr/bin:
+ -- next, automatically generated rules for /usr/bin:
{dir = "/usr/bin", chain = argvmods_rules_for_usr_bin},
+
+ -- and finally, the default:
+ {dir = "/usr/bin",
+ actions = test_first_tools_default_is_target},
}
}
@@ -396,6 +400,10 @@ devel_mode_rules_usr = {
readonly = true},
-- -----------------------------------------------
+ {dir = "/usr/sbin",
+ actions = test_first_tools_default_is_target},
+
+ -- -----------------------------------------------
-- 100. DEFAULT RULES:
-- the root directory must not be mapped:
@@ -602,12 +610,16 @@ simple_chain = {
-- the root directory must not be mapped:
{path = "/", use_orig_path = true},
- -- "standard" directories are mapped to tools_root,
+ -- "standard" directories default to tools_root
+ -- (except that bin and sbin also test for target-
+ -- specific programs from target_root),
-- but everything else defaults to the host system
-- (so that things like /mnt, /media and /opt are
-- used from the host)
- {prefix = "/bin", map_to = tools, readonly = true},
- {prefix = "/sbin", map_to = tools, readonly = true},
+ {dir = "/bin",
+ actions = test_first_tools_default_is_target},
+ {dir = "/sbin",
+ actions = test_first_tools_default_is_target},
-- Default = Host, R/W access
{prefix = "/", use_orig_path = true}
@@ -629,7 +641,7 @@ devel_exec_policies = {
binary = nil,
rules = {
- -- ~/bin proobably contains programs for the host OS:
+ -- ~/bin probably contains programs for the host OS:
{prefix = sbox_user_home_dir.."/bin", exec_policy = exec_policy_host_os},
-- Other places under the home directory are expected