aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Bo ├śrsted Andresen <bo.andresen@zlin.dk> 2010-02-14 05:29:47 +0000
committerAvatar Bo ├śrsted Andresen <bo.andresen@zlin.dk> 2010-02-14 16:39:40 +0000
commitea4d3f5df4695119b5be9c1d202abdef40a12fb4 (patch)
tree2eacbff7c2e9206a73279eb9e3577611c1959375
parent990c3d22ab79a76d6610f65df63efc14a1167300 (diff)
downloadpaludis-ea4d3f5df4695119b5be9c1d202abdef40a12fb4.tar.gz
paludis-ea4d3f5df4695119b5be9c1d202abdef40a12fb4.tar.xz
Dots and plus are allowed in exlib names but not in shell variable names.
-rw-r--r--paludis/repositories/e/e_repository_TEST_exlibs.cc2
-rwxr-xr-xpaludis/repositories/e/e_repository_TEST_exlibs_setup.sh14
-rw-r--r--paludis/repositories/e/ebuild/exheres-0/exlib_functions.bash5
3 files changed, 20 insertions, 1 deletions
diff --git a/paludis/repositories/e/e_repository_TEST_exlibs.cc b/paludis/repositories/e/e_repository_TEST_exlibs.cc
index bb3edce..46017f1 100644
--- a/paludis/repositories/e/e_repository_TEST_exlibs.cc
+++ b/paludis/repositories/e/e_repository_TEST_exlibs.cc
@@ -201,6 +201,8 @@ namespace test_cases
ExlibsTest test_noarray_bad("noarray-bad", unsupported);
ExlibsTest test_scalar_required("scalar-required", unsupported);
ExlibsTest test_array_required("array-required", unsupported);
+ ExlibsTest test_exlib_dot_with_exparam("exlib-dot-with-exparam", unsupported);
+ ExlibsTest test_exlib_plus_with_exparam("exlib-plus-with-exparam", unsupported);
ExlibsTest test_illegal_in_global_scope("illegal-in-global-scope", unsupported);
ExlibsTest test_illegal_in_global_scope_in_func("illegal-in-global-scope-in-func", success);
ExlibsTest test_called_cross_phase("called-cross-phase", throws_InstallActionError);
diff --git a/paludis/repositories/e/e_repository_TEST_exlibs_setup.sh b/paludis/repositories/e/e_repository_TEST_exlibs_setup.sh
index 042c2d1..c716db8 100755
--- a/paludis/repositories/e/e_repository_TEST_exlibs_setup.sh
+++ b/paludis/repositories/e/e_repository_TEST_exlibs_setup.sh
@@ -506,6 +506,20 @@ cat <<'END' > packages/cat/boolean-notreally/boolean-notreally-1.ebuild || exit
SLOT="0"
require boolean-notreally [ t=monkey ]
END
+mkdir -p "packages/cat/exlib-dot-with-exparam"
+cat <<'END' > packages/cat/exlib-dot-with-exparam/foo.bar.exlib
+myexparam foo
+END
+cat <<'END' > packages/cat/exlib-dot-with-exparam/exlib-dot-with-exparam-1.ebuild
+require foo.bar [ foo=bar ]
+END
+mkdir -p "packages/cat/exlib-plus-with-exparam"
+cat <<'END' > packages/cat/exlib-plus-with-exparam/foo+bar.exlib
+myexparam foo
+END
+cat <<'END' > packages/cat/exlib-plus-with-exparam/exlib-plus-with-exparam-1.ebuild
+require foo+bar [ foo=bar ]
+END
mkdir -p "packages/cat/illegal-in-global-scope"
cat <<'END' > packages/cat/illegal-in-global-scope/illegal-in-global-scope-1.ebuild || exit 1
DESCRIPTION="The Long Description"
diff --git a/paludis/repositories/e/ebuild/exheres-0/exlib_functions.bash b/paludis/repositories/e/ebuild/exheres-0/exlib_functions.bash
index e6f3eb2..a26adc8 100644
--- a/paludis/repositories/e/ebuild/exheres-0/exlib_functions.bash
+++ b/paludis/repositories/e/ebuild/exheres-0/exlib_functions.bash
@@ -37,7 +37,10 @@ exparam()
exparam_var_name()
{
- echo EXPARAMVAR_${1//-/__dash__}
+ local var=EXPARAMVAR_${1//-/__dash__}
+ var=${var//./__dot__}
+ var=${var//+/__plus__}
+ echo ${var}
}
exparam_print()