aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar David Leverton <levertond@googlemail.com> 2009-10-18 13:04:31 +0100
committerAvatar David Leverton <levertond@googlemail.com> 2009-10-18 13:04:31 +0100
commita280339aac7031b5ec1f2cadc655f64da3023b23 (patch)
tree6cf2611ab2d7c2d2ee6c4dbf4dfdaf853e86625d
parentaf666269d2748c813cfa962b64968fc8213382f7 (diff)
downloadpaludis-a280339aac7031b5ec1f2cadc655f64da3023b23.tar.gz
paludis-a280339aac7031b5ec1f2cadc655f64da3023b23.tar.xz
EAPI 3 doins now supports symlinks without -r too
-rw-r--r--paludis/repositories/e/e_repository_TEST.cc4
-rwxr-xr-xpaludis/repositories/e/e_repository_TEST_setup.sh24
-rw-r--r--paludis/repositories/e/eapi.cc2
-rw-r--r--paludis/repositories/e/eapi.hh4
-rw-r--r--paludis/repositories/e/eapis/0.conf2
-rw-r--r--paludis/repositories/e/eapis/3.conf2
-rw-r--r--paludis/repositories/e/eapis/exheres-0.conf2
-rw-r--r--paludis/repositories/e/eapis/paludis-1.conf2
-rw-r--r--paludis/repositories/e/ebuild.cc4
-rwxr-xr-xpaludis/repositories/e/ebuild/utils/doins4
-rwxr-xr-xpaludis/repositories/e/ebuild/utils/newins2
11 files changed, 36 insertions, 16 deletions
diff --git a/paludis/repositories/e/e_repository_TEST.cc b/paludis/repositories/e/e_repository_TEST.cc
index 9713f0b..28bdf8d 100644
--- a/paludis/repositories/e/e_repository_TEST.cc
+++ b/paludis/repositories/e/e_repository_TEST.cc
@@ -1681,9 +1681,9 @@ namespace test_cases
}
{
- TestMessageSuffix suffix("doins -r symlink", true);
+ TestMessageSuffix suffix("doins symlink", true);
const std::tr1::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
- PackageDepSpec(parse_user_package_dep_spec("=cat/doins-r-symlink-3",
+ PackageDepSpec(parse_user_package_dep_spec("=cat/doins-symlink-3",
&env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->last());
TEST_CHECK(id);
TEST_CHECK_EQUAL(simple_visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->value(), "3");
diff --git a/paludis/repositories/e/e_repository_TEST_setup.sh b/paludis/repositories/e/e_repository_TEST_setup.sh
index fa98322..0d9ae53 100755
--- a/paludis/repositories/e/e_repository_TEST_setup.sh
+++ b/paludis/repositories/e/e_repository_TEST_setup.sh
@@ -1343,8 +1343,8 @@ pkg_preinst() {
[[ -e ${D}/usr/share/doc/${PF}/five/fifth ]] || die five/fifth
}
END
-mkdir -p "cat/doins-r-symlink" || exit 1
-cat << 'END' > cat/doins-r-symlink/doins-r-symlink-3.ebuild || exit 1
+mkdir -p "cat/doins-symlink" || exit 1
+cat << 'END' > cat/doins-symlink/doins-symlink-3.ebuild || exit 1
EAPI="${PV}"
DESCRIPTION="The Description"
HOMEPAGE="http://example.com/"
@@ -1361,16 +1361,36 @@ src_unpack() {
mkdir -p ${WORKDIR}
cd "${WORKDIR}"
+ mkdir a
+ cd a
+ echo qwerty > qwerty
+ ln -s qwerty uiop
+ ln -s qwerty adfs
+
+ cd ..
+
+ mkdir b
+ cd b
echo foo > foo
ln -s foo bar
+
}
src_install() {
insinto /foo
+ doins a/qwerty
+ doins a/uiop
+ newins a/adfs asdf
+ cd b
doins -r .
}
pkg_preinst() {
+ [[ -f ${D}/foo/qwerty ]] || die qwerty
+ [[ -L ${D}/foo/uiop ]] || die uiop
+ [[ $(readlink ${D}/foo/uiop ) == qwerty ]] || die sym
+ [[ -L ${D}/foo/asdf ]] || die asdf
+ [[ $(readlink ${D}/foo/asdf ) == qwerty ]] || die sym
[[ -f ${D}/foo/foo ]] || die foo
[[ -L ${D}/foo/bar ]] || die bar
[[ $(readlink ${D}/foo/bar ) == foo ]] || die sym
diff --git a/paludis/repositories/e/eapi.cc b/paludis/repositories/e/eapi.cc
index eee0500..11631d3 100644
--- a/paludis/repositories/e/eapi.cc
+++ b/paludis/repositories/e/eapi.cc
@@ -220,7 +220,7 @@ namespace
{
return make_shared_ptr(new EAPIToolsOptions(make_named_values<EAPIToolsOptions>(
value_for<n::dodoc_r>(destringify_key<bool>(k, "dodoc_r")),
- value_for<n::doins_r_symlink>(destringify_key<bool>(k, "doins_r_symlink")),
+ value_for<n::doins_symlink>(destringify_key<bool>(k, "doins_symlink")),
value_for<n::doman_lang_filenames>(destringify_key<bool>(k, "doman_lang_filenames")),
value_for<n::dosym_mkdir>(destringify_key<bool>(k, "dosym_mkdir")),
value_for<n::econf_extra_options>(k.get("econf_extra_options")),
diff --git a/paludis/repositories/e/eapi.hh b/paludis/repositories/e/eapi.hh
index cab7d1e..2d7ee58 100644
--- a/paludis/repositories/e/eapi.hh
+++ b/paludis/repositories/e/eapi.hh
@@ -57,7 +57,7 @@ namespace paludis
struct directory_if_exists_variables;
struct directory_variables;
struct dodoc_r;
- struct doins_r_symlink;
+ struct doins_symlink;
struct doman_lang_filenames;
struct dosym_mkdir;
struct eapi;
@@ -408,7 +408,7 @@ namespace paludis
struct EAPIToolsOptions
{
NamedValue<n::dodoc_r, bool> dodoc_r;
- NamedValue<n::doins_r_symlink, bool> doins_r_symlink;
+ NamedValue<n::doins_symlink, bool> doins_symlink;
NamedValue<n::doman_lang_filenames, bool> doman_lang_filenames;
NamedValue<n::dosym_mkdir, bool> dosym_mkdir;
NamedValue<n::econf_extra_options, std::string> econf_extra_options;
diff --git a/paludis/repositories/e/eapis/0.conf b/paludis/repositories/e/eapis/0.conf
index a302c3c..fe259b1 100644
--- a/paludis/repositories/e/eapis/0.conf
+++ b/paludis/repositories/e/eapis/0.conf
@@ -261,7 +261,7 @@ unpack_unrecognised_is_fatal = false
unpack_fix_permissions = true
doman_lang_filenames = false
dodoc_r = false
-doins_r_symlink = false
+doins_symlink = false
dosym_mkdir = true
failure_is_fatal = false
no_s_workdir_fallback = false
diff --git a/paludis/repositories/e/eapis/3.conf b/paludis/repositories/e/eapis/3.conf
index 195c3a4..19e17e1 100644
--- a/paludis/repositories/e/eapis/3.conf
+++ b/paludis/repositories/e/eapis/3.conf
@@ -52,7 +52,7 @@ ebuild_pretend = \
skipname=pretend skipifno=pretend sandbox userpriv : pretend
dodoc_r = true
-doins_r_symlink = true
+doins_symlink = true
failure_is_fatal = true
no_s_workdir_fallback = true
diff --git a/paludis/repositories/e/eapis/exheres-0.conf b/paludis/repositories/e/eapis/exheres-0.conf
index bb98350..95f0d0e 100644
--- a/paludis/repositories/e/eapis/exheres-0.conf
+++ b/paludis/repositories/e/eapis/exheres-0.conf
@@ -327,7 +327,7 @@ unpack_fix_permissions = false
doman_lang_filenames = true
dodoc_r = true
dosym_mkdir = false
-doins_r_symlink = true
+doins_symlink = true
failure_is_fatal = true
no_s_workdir_fallback = true
diff --git a/paludis/repositories/e/eapis/paludis-1.conf b/paludis/repositories/e/eapis/paludis-1.conf
index 6771399..4c2871a 100644
--- a/paludis/repositories/e/eapis/paludis-1.conf
+++ b/paludis/repositories/e/eapis/paludis-1.conf
@@ -263,7 +263,7 @@ unpack_fix_permissions = false
doman_lang_filenames = true
dodoc_r = false
dosym_mkdir = false
-doins_r_symlink = false
+doins_symlink = false
failure_is_fatal = false
unpack_suffixes = tar tar.gz,tgz,tar.Z tar.bz2,tbz2,tbz zip,ZIP,jar gz,Z,z bz2 rar,RAR lha,LHa,LHA,lzh a,deb tar.lzma lzma 7z,7Z tar.xz xz
diff --git a/paludis/repositories/e/ebuild.cc b/paludis/repositories/e/ebuild.cc
index ef6e020..dca5d50 100644
--- a/paludis/repositories/e/ebuild.cc
+++ b/paludis/repositories/e/ebuild.cc
@@ -238,8 +238,8 @@ EbuildCommand::operator() ()
params.package_id()->eapi()->supported()->tools_options()->unpack_suffixes())
.with_setenv("PALUDIS_DODOC_R",
params.package_id()->eapi()->supported()->tools_options()->dodoc_r() ? "yes" : "")
- .with_setenv("PALUDIS_DOINS_R_SYMLINK",
- params.package_id()->eapi()->supported()->tools_options()->doins_r_symlink() ? "yes" : "")
+ .with_setenv("PALUDIS_DOINS_SYMLINK",
+ params.package_id()->eapi()->supported()->tools_options()->doins_symlink() ? "yes" : "")
.with_setenv("PALUDIS_DOMAN_LANG_FILENAMES",
params.package_id()->eapi()->supported()->tools_options()->doman_lang_filenames() ? "yes" : "")
.with_setenv("PALUDIS_DOSYM_NO_MKDIR",
diff --git a/paludis/repositories/e/ebuild/utils/doins b/paludis/repositories/e/ebuild/utils/doins
index 76ffa31..4bda0a3 100755
--- a/paludis/repositories/e/ebuild/utils/doins
+++ b/paludis/repositories/e/ebuild/utils/doins
@@ -62,8 +62,8 @@ ret=0
for x in "$@"; do
if [[ -L ${x} ]]; then
- if [[ -n ${PALUDIS_DOINS_R_SYMLINK} ]] && [[ -n "${DOINSRECUR}" ]] ; then
- ln -s "$(readlink ${x} )" "${!PALUDIS_IMAGE_DIR_VAR}${INSDESTTREE}/${x}"
+ if [[ -n ${PALUDIS_DOINS_SYMLINK} ]] ; then
+ ln -s "$(readlink ${x} )" "${!PALUDIS_IMAGE_DIR_VAR}${INSDESTTREE}/$(basename "${x}")" || ret=2
continue
else
cp "${x}" "${!PALUDIS_TEMP_DIR_VAR}"
diff --git a/paludis/repositories/e/ebuild/utils/newins b/paludis/repositories/e/ebuild/utils/newins
index 6ed5264..cfa3b6c 100755
--- a/paludis/repositories/e/ebuild/utils/newins
+++ b/paludis/repositories/e/ebuild/utils/newins
@@ -32,5 +32,5 @@ if [[ ${#} -ne 2 ]]; then
fi
rm -rf "${!PALUDIS_TEMP_DIR_VAR}/${2}"
-cp "${1}" "${!PALUDIS_TEMP_DIR_VAR}/${2}"
+cp -P "${1}" "${!PALUDIS_TEMP_DIR_VAR}/${2}"
doins "${!PALUDIS_TEMP_DIR_VAR}/${2}"