Skip to content

Commit

Permalink
Merge branch 'jb36606' into 'master'
Browse files Browse the repository at this point in the history
Support /usr merge by allowing /bin/perl to be accelerated JB#36606

See merge request mer-core/scratchbox2!23
  • Loading branch information
xfade committed Apr 23, 2021
2 parents 3b71b4f + a7d33af commit 5df7d2c
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
4 changes: 4 additions & 0 deletions scratchbox2/modes/obs-rpm-build+pp/config.lua
Expand Up @@ -14,8 +14,12 @@ exec_policy_selection = {
-- Tools. at least qemu might be used from there.
{prefix = tools_prefix .. "/usr/bin/perl",
exec_policy_name = "Tools-perl"},
{prefix = tools_prefix .. "/bin/perl",
exec_policy_name = "Tools-perl"},
{prefix = tools_prefix .. "/usr/bin/python",
exec_policy_name = "Tools-python"},
{prefix = tools_prefix .. "/bin/python",
exec_policy_name = "Tools-python"},

-- the toolchain, if not from Tools:
{dir = sbox_target_toolchain_dir, exec_policy_name = "Toolchain"},
Expand Down
12 changes: 12 additions & 0 deletions scratchbox2/modes/obs-rpm-build+pp/fs_rules.lua
Expand Up @@ -62,9 +62,14 @@ perl_lib_test = {
perl_bin_test = {
{ if_redirect_ignore_is_active = "/usr/bin/perl",
map_to = target_root, readonly = true },
{ if_redirect_ignore_is_active = "/bin/perl",
map_to = target_root, readonly = true },
{ if_redirect_force_is_active = "/usr/bin/perl",
map_to = tools, readonly = true,
exec_policy_name = "Tools-perl" },
{ if_redirect_force_is_active = "/bin/perl",
map_to = tools, readonly = true,
exec_policy_name = "Tools-perl" },
{ if_active_exec_policy_is = "Target",
map_to = target_root, readonly = true },
{ if_active_exec_policy_is = "Tools-perl",
Expand All @@ -79,9 +84,14 @@ perl_bin_test = {
python_bin_test = {
{ if_redirect_ignore_is_active = "/usr/bin/python",
map_to = target_root, readonly = true },
{ if_redirect_ignore_is_active = "/bin/python",
map_to = target_root, readonly = true },
{ if_redirect_force_is_active = "/usr/bin/python",
map_to = tools, readonly = true,
exec_policy_name = "Tools-python" },
{ if_redirect_force_is_active = "/bin/python",
map_to = tools, readonly = true,
exec_policy_name = "Tools-python" },
{ if_active_exec_policy_is = "Target",
map_to = target_root, readonly = true },
{ if_active_exec_policy_is = "Tools-python",
Expand Down Expand Up @@ -471,7 +481,9 @@ emulate_mode_rules_usr_bin = {
-- (these are real prefixes, version number may
-- be included in the name (/usr/bin/python2.5 etc))
{prefix = "/usr/bin/perl", actions = perl_bin_test},
{prefix = "/bin/perl", actions = perl_bin_test},
{prefix = "/usr/bin/python", actions = python_bin_test},
{prefix = "/bin/python", actions = python_bin_test},

{path = "/usr/bin/sb2-show", use_orig_path = true,
protection = readonly_fs_always},
Expand Down

0 comments on commit 5df7d2c

Please sign in to comment.