summaryrefslogtreecommitdiff
path: root/lua_scripts
diff options
context:
space:
mode:
authorLauri Aarnio <Lauri.Aarnio@iki.fi>2009-02-01 17:16:26 +0200
committerLauri Leukkunen <lle@rahina.org>2009-02-10 08:38:10 +0200
commit3f21704c5c130d748f79293b417543747a6607d9 (patch)
treecc7efacf845a27075b24b1446c95f8525d916715 /lua_scripts
parent4660f92124d63f4a83a274d99993775fa1e41471 (diff)
"devel" mode: IMPORTANT POLICY CHANGE: perl* and python* mapped to target_root
- Changed default mapping of perl* and python* to target_root: Prefixes /usr/bin/perl* and /usr/bin/python* are now mapped to the rootstrap. - Previously these scripting languages were used from tools_root - Script interpreter mapping policies have been set up so that a script which is executed from tools_root will take the interpreter still from tools_root => there are many tools that are written as scripts (for example, many of the dpkg-* tools are perl script), so these continue to run with the correct libraries - Obviously, this has some performance penalties when building for a foreign architecture, because the default script interpreter would be running under CPU transparency. However, that penalty appears to be quite minimal (average result, at least)
Diffstat (limited to 'lua_scripts')
-rw-r--r--lua_scripts/pathmaps/devel/00_default.lua52
1 files changed, 46 insertions, 6 deletions
diff --git a/lua_scripts/pathmaps/devel/00_default.lua b/lua_scripts/pathmaps/devel/00_default.lua
index 93880d7..8535029 100644
--- a/lua_scripts/pathmaps/devel/00_default.lua
+++ b/lua_scripts/pathmaps/devel/00_default.lua
@@ -60,6 +60,38 @@ exec_policy_tools = {
script_set_argv0_to_mapped_interpreter = true,
}
+exec_policy_tools_perl = {
+ name = "Tools-perl",
+ native_app_ld_so = devel_mode_tools_ld_so,
+ native_app_ld_so_supports_argv0 = conf_tools_ld_so_supports_argv0,
+ native_app_ld_library_path = devel_mode_tools_ld_library_path,
+ native_app_locale_path = devel_mode_locale_path,
+ native_app_message_catalog_prefix = devel_model_message_catalog_prefix,
+
+ script_log_level = "debug",
+ script_log_message = "SCRIPT from tools (t.p)",
+ script_interpreter_rule = {
+ map_to = tools
+ },
+ script_set_argv0_to_mapped_interpreter = true,
+}
+
+exec_policy_tools_python = {
+ name = "Tools-python",
+ native_app_ld_so = devel_mode_tools_ld_so,
+ native_app_ld_so_supports_argv0 = conf_tools_ld_so_supports_argv0,
+ native_app_ld_library_path = devel_mode_tools_ld_library_path,
+ native_app_locale_path = devel_mode_locale_path,
+ native_app_message_catalog_prefix = devel_model_message_catalog_prefix,
+
+ script_log_level = "debug",
+ script_log_message = "SCRIPT from tools (t.p)",
+ script_interpreter_rule = {
+ map_to = tools
+ },
+ script_set_argv0_to_mapped_interpreter = true,
+}
+
-- For target binaries:
-- First, note that "foreign" binaries are easy to handle, no problem there.
-- But if CPU transparency method has not been set, then host CPU == target CPU:
@@ -119,11 +151,11 @@ test_first_tools_default_is_target = {
}
perl_lib_test = {
- { if_active_exec_policy_is = "Tools",
+ { if_active_exec_policy_is = "Tools-perl",
map_to = tools, readonly = true },
{ if_active_exec_policy_is = "Rootstrap",
map_to = target_root, readonly = true },
- { map_to = tools, readonly = true }
+ { map_to = target_root, readonly = true }
}
perl_bin_test = {
@@ -131,7 +163,9 @@ perl_bin_test = {
map_to = target_root, readonly = true },
{ if_active_exec_policy_is = "Rootstrap",
map_to = target_root, readonly = true },
- { map_to = tools, readonly = true }
+ { if_active_exec_policy_is = "Tools-perl",
+ map_to = tools, readonly = true },
+ { map_to = target_root, readonly = true }
}
python_bin_test = {
@@ -139,15 +173,17 @@ python_bin_test = {
map_to = target_root, readonly = true },
{ if_active_exec_policy_is = "Rootstrap",
map_to = target_root, readonly = true },
- { map_to = tools, readonly = true }
+ { if_active_exec_policy_is = "Tools-python",
+ map_to = tools, readonly = true },
+ { map_to = target_root, readonly = true }
}
python_lib_test = {
- { if_active_exec_policy_is = "Tools",
+ { if_active_exec_policy_is = "Tools-python",
map_to = tools, readonly = true },
{ if_active_exec_policy_is = "Rootstrap",
map_to = target_root, readonly = true },
- { map_to = tools, readonly = true }
+ { map_to = target_root, readonly = true }
}
@@ -656,6 +692,8 @@ devel_exec_policies = {
{prefix = target_root, exec_policy = exec_policy_target},
-- Tools:
+ {prefix = tools .. "/usr/bin/perl", exec_policy = exec_policy_tools_perl},
+ {prefix = tools .. "/usr/bin/python", exec_policy = exec_policy_tools_python},
{prefix = tools, exec_policy = exec_policy_tools},
-- -----------------------------------------------
@@ -674,5 +712,7 @@ all_exec_policies = {
exec_policy_host_os,
exec_policy_target,
exec_policy_tools,
+ exec_policy_tools_perl,
+ exec_policy_tools_python,
}