aboutsummaryrefslogtreecommitdiff
path: root/paludis/repositories
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2008-03-19 09:14:21 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2008-03-19 09:14:21 +0000
commit6a52d0f19f9e35338990411e9374b19cc1be37a9 (patch)
tree3c25e29a78beb9effdc7fd9c6bbd3538606eecca /paludis/repositories
parent84a20c706b382622a26138287a964acc17aeb2fa (diff)
downloadpaludis-6a52d0f19f9e35338990411e9374b19cc1be37a9.tar.gz
paludis-6a52d0f19f9e35338990411e9374b19cc1be37a9.tar.xz
kdebuild-1 support. Fixes: ticket:500, ticket:523, ticket:524, ticket:526, ticket:528, ticket:530, ticket:531, ticket:532, ticket:533, ticket:534, ticket:535, ticket:536, ticket:537, ticket:538, ticket:539
Diffstat (limited to 'paludis/repositories')
-rw-r--r--paludis/repositories/e/Makefile.am3
-rw-r--r--paludis/repositories/e/dep_parser_TEST.cc21
-rw-r--r--paludis/repositories/e/e_installed_repository.cc1
-rw-r--r--paludis/repositories/e/e_repository_TEST.cc162
-rwxr-xr-xpaludis/repositories/e/e_repository_TEST_setup.sh123
-rw-r--r--paludis/repositories/e/e_repository_entries.hh3
-rw-r--r--paludis/repositories/e/eapi.cc2
-rw-r--r--paludis/repositories/e/eapi.sr1
-rw-r--r--paludis/repositories/e/eapis/0.conf1
-rw-r--r--paludis/repositories/e/eapis/Makefile.am1
-rw-r--r--paludis/repositories/e/eapis/exheres-0.conf1
-rw-r--r--paludis/repositories/e/eapis/kdebuild-1.conf58
-rw-r--r--paludis/repositories/e/eapis/paludis-1.conf1
-rw-r--r--paludis/repositories/e/ebuild.cc19
-rw-r--r--paludis/repositories/e/ebuild.hh13
-rw-r--r--paludis/repositories/e/ebuild/Makefile.am2
-rwxr-xr-xpaludis/repositories/e/ebuild/ebuild.bash1
-rw-r--r--paludis/repositories/e/ebuild/kdebuild-1/Makefile.am38
-rw-r--r--paludis/repositories/e/ebuild/kdebuild-1/output_functions.bash31
-rw-r--r--paludis/repositories/e/ebuild/utils/Makefile.am2
-rwxr-xr-xpaludis/repositories/e/ebuild/utils/dosym10
-rw-r--r--paludis/repositories/e/ebuild/utils/exheres-0/Makefile.am1
-rw-r--r--paludis/repositories/e/ebuild/utils/kdebuild-1/Makefile.am64
-rw-r--r--paludis/repositories/e/ebuild/utils/kdebuild-1/banned_in_eapi_kdebuild-129
-rw-r--r--paludis/repositories/e/ebuild_entries.cc118
-rw-r--r--paludis/repositories/e/ebuild_entries.hh6
-rw-r--r--paludis/repositories/e/ebuild_entries_suffixes.conf11
-rw-r--r--paludis/repositories/e/exheres_layout.cc26
-rw-r--r--paludis/repositories/e/exheres_layout.hh6
-rw-r--r--paludis/repositories/e/layout.hh6
-rw-r--r--paludis/repositories/e/qa/Makefile.am14
-rw-r--r--paludis/repositories/e/qa/qa_controller.cc8
-rw-r--r--paludis/repositories/e/qa/test_extras.cc26
-rw-r--r--paludis/repositories/e/traditional_layout.cc26
-rw-r--r--paludis/repositories/e/traditional_layout.hh6
-rw-r--r--paludis/repositories/e/vdb_repository_TEST.cc6
-rwxr-xr-xpaludis/repositories/e/vdb_repository_TEST_setup.sh68
37 files changed, 754 insertions, 161 deletions
diff --git a/paludis/repositories/e/Makefile.am b/paludis/repositories/e/Makefile.am
index d33dbd351..2dfa8087f 100644
--- a/paludis/repositories/e/Makefile.am
+++ b/paludis/repositories/e/Makefile.am
@@ -412,6 +412,7 @@ TESTS_ENVIRONMENT = env \
PALUDIS_EBUILD_DIR_FALLBACK="`$(top_srcdir)/paludis/repositories/e/ebuild/utils/canonicalise $(top_builddir)/paludis/repositories/e/ebuild/`" \
PALUDIS_EXTRA_EBUILD_MODULES_DIRS="`$(top_srcdir)/paludis/repositories/e/ebuild/utils/canonicalise $(top_builddir)/paludis/util/`" \
PALUDIS_EAPIS_DIR="$(top_srcdir)/paludis/repositories/e/eapis/" \
+ PALUDIS_SUFFIXES_FILE="$(top_srcdir)/paludis/repositories/e/ebuild_entries_suffixes.conf" \
PALUDIS_DISTRIBUTIONS_DIR="$(top_srcdir)/paludis/distributions/" \
PALUDIS_DISTRIBUTION="gentoo" \
PALUDIS_FETCHERS_DIR="$(top_srcdir)/paludis/fetchers/" \
@@ -509,7 +510,7 @@ endif
paludis_datadir = $(datadir)/paludis
-dist_paludis_data_DATA = traditional.exclude
+dist_paludis_data_DATA = traditional.exclude ebuild_entries_suffixes.conf
TESTS = \
dep_lexer_TEST \
diff --git a/paludis/repositories/e/dep_parser_TEST.cc b/paludis/repositories/e/dep_parser_TEST.cc
index f46897c19..b6c1fa1ff 100644
--- a/paludis/repositories/e/dep_parser_TEST.cc
+++ b/paludis/repositories/e/dep_parser_TEST.cc
@@ -412,5 +412,26 @@ namespace test_cases
&env, id, *EAPIData::get_instance()->eapi_from_string("0"))->accept(d), DepStringParseError);
}
} test_dep_spec_parser_labels;
+
+ struct DepParserKDEBuildURILabelsTest : TestCase
+ {
+ DepParserKDEBuildURILabelsTest() : TestCase("kdebuild uri label handling") { }
+
+ void run()
+ {
+ StringifyFormatter ff;
+ TestEnvironment env;
+ tr1::shared_ptr<FakeRepository> repo(new FakeRepository(&env, RepositoryName("repo")));
+ env.package_database()->add_repository(1, repo);
+ tr1::shared_ptr<const PackageID> id(repo->add_version("cat", "pkg", "1"));
+
+ DepSpecPrettyPrinter d(0, tr1::shared_ptr<const PackageID>(), ff, 0, false);
+ parse_fetchable_uri("http://foo/bar manual: two",
+ &env, id, *EAPIData::get_instance()->eapi_from_string("kdebuild-1"))->accept(d);
+ TEST_CHECK_EQUAL(stringify(d), "http://foo/bar manual: two");
+ TEST_CHECK_THROWS(parse_fetchable_uri("http://foo/bar monkey: two",
+ &env, id, *EAPIData::get_instance()->eapi_from_string("kdebuild-1"))->accept(d), DepStringParseError);
+ }
+ } test_dep_spec_parser_kdebuild_uri_labels;
}
diff --git a/paludis/repositories/e/e_installed_repository.cc b/paludis/repositories/e/e_installed_repository.cc
index a7cec5cbf..1ce7a1bc3 100644
--- a/paludis/repositories/e/e_installed_repository.cc
+++ b/paludis/repositories/e/e_installed_repository.cc
@@ -457,6 +457,7 @@ EInstalledRepository::perform_info(const tr1::shared_ptr<const ERepositoryID> &
(k::expand_vars(), make_shared_ptr(new Map<std::string, std::string>))
(k::profiles(), make_shared_ptr(new FSEntrySequence))
(k::info_vars(), i)
+ (k::use_ebuild_file(), false)
(k::load_environment(), load_env.get()));
info_cmd();
diff --git a/paludis/repositories/e/e_repository_TEST.cc b/paludis/repositories/e/e_repository_TEST.cc
index 5cde66476..d21520d39 100644
--- a/paludis/repositories/e/e_repository_TEST.cc
+++ b/paludis/repositories/e/e_repository_TEST.cc
@@ -1310,9 +1310,171 @@ namespace test_cases
TEST_CHECK_EQUAL(visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->value(), "1");
id->perform_action(action);
}
+
+ {
+ TestMessageSuffix suffix("dosym success 1", true);
+ const tr1::shared_ptr<const PackageID> id(*env.package_database()->query(query::Matches(
+ PackageDepSpec(parse_user_package_dep_spec("=cat/dosym-success-1",
+ UserPackageDepSpecOptions()))), qo_require_exactly_one)->last());
+ TEST_CHECK(id);
+ TEST_CHECK_EQUAL(visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->value(), "1");
+ id->perform_action(action);
+ }
}
} test_e_repository_install_eapi_1;
+ struct ERepositoryInstallEAPIKdebuild1Test : TestCase
+ {
+ ERepositoryInstallEAPIKdebuild1Test() : TestCase("install_eapi_kdebuild_1") { }
+
+ unsigned max_run_time() const
+ {
+ return 3000;
+ }
+
+ bool repeatable() const
+ {
+ return false;
+ }
+
+ void run()
+ {
+ TestEnvironment env;
+ env.set_paludis_command("/bin/false");
+ tr1::shared_ptr<Map<std::string, std::string> > keys(new Map<std::string, std::string>);
+ keys->insert("format", "ebuild");
+ keys->insert("names_cache", "/var/empty");
+ keys->insert("location", "e_repository_TEST_dir/repo13");
+ keys->insert("profiles", "e_repository_TEST_dir/repo13/profiles/profile");
+ keys->insert("layout", "traditional");
+ keys->insert("eapi_when_unknown", "0");
+ keys->insert("eapi_when_unspecified", "0");
+ keys->insert("profile_eapi", "0");
+ keys->insert("distdir", stringify(FSEntry::cwd() / "e_repository_TEST_dir" / "distdir"));
+ keys->insert("builddir", stringify(FSEntry::cwd() / "e_repository_TEST_dir" / "build"));
+ tr1::shared_ptr<ERepository> repo(make_ebuild_repository(&env, keys));
+ env.package_database()->add_repository(1, repo);
+
+ tr1::shared_ptr<FakeInstalledRepository> installed_repo(new FakeInstalledRepository(&env, RepositoryName("installed")));
+ env.package_database()->add_repository(2, installed_repo);
+
+ InstallAction action(InstallActionOptions::named_create()
+ (k::debug_build(), iado_none)
+ (k::checks(), iaco_default)
+ (k::no_config_protect(), false)
+ (k::destination(), installed_repo)
+ );
+
+ {
+ TestMessageSuffix suffix("econf source kdebuild-1", true);
+ const tr1::shared_ptr<const PackageID> id(*env.package_database()->query(query::Matches(
+ PackageDepSpec(parse_user_package_dep_spec("=cat/econf-source-kdebuild-1",
+ UserPackageDepSpecOptions()))), qo_require_exactly_one)->last());
+ TEST_CHECK(id);
+ TEST_CHECK_EQUAL(visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->value(), "kdebuild-1");
+ id->perform_action(action);
+ }
+
+ {
+ TestMessageSuffix suffix("banned functions kdebuild-1", true);
+ const tr1::shared_ptr<const PackageID> id(*env.package_database()->query(query::Matches(
+ PackageDepSpec(parse_user_package_dep_spec("=cat/banned-functions-kdebuild-1",
+ UserPackageDepSpecOptions()))), qo_require_exactly_one)->last());
+ TEST_CHECK(id);
+ TEST_CHECK_EQUAL(visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->value(), "kdebuild-1");
+ TEST_CHECK_THROWS(id->perform_action(action), InstallActionError);
+ }
+
+ {
+ TestMessageSuffix suffix("banned vars kdebuild-1", true);
+ const tr1::shared_ptr<const PackageID> id(*env.package_database()->query(query::Matches(
+ PackageDepSpec(parse_user_package_dep_spec("=cat/banned-vars-kdebuild-1",
+ UserPackageDepSpecOptions()))), qo_require_exactly_one)->last());
+ TEST_CHECK(id);
+ TEST_CHECK_EQUAL(visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->value(), "UNKNOWN");
+ }
+
+ {
+ TestMessageSuffix suffix("dosym success kdebuild-1", true);
+ const tr1::shared_ptr<const PackageID> id(*env.package_database()->query(query::Matches(
+ PackageDepSpec(parse_user_package_dep_spec("=cat/dosym-success-kdebuild-1",
+ UserPackageDepSpecOptions()))), qo_require_exactly_one)->last());
+ TEST_CHECK(id);
+ TEST_CHECK_EQUAL(visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->value(), "kdebuild-1");
+ id->perform_action(action);
+ }
+
+ {
+ TestMessageSuffix suffix("dosym fail kdebuild-1", true);
+ const tr1::shared_ptr<const PackageID> id(*env.package_database()->query(query::Matches(
+ PackageDepSpec(parse_user_package_dep_spec("=cat/dosym-fail-kdebuild-1",
+ UserPackageDepSpecOptions()))), qo_require_exactly_one)->last());
+ TEST_CHECK(id);
+ TEST_CHECK_EQUAL(visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->value(), "kdebuild-1");
+ TEST_CHECK_THROWS(id->perform_action(action), InstallActionError);
+ }
+ }
+ } test_e_repository_install_eapi_kdebuild_1;
+
+ struct ERepositoryInfoEAPIKdebuild1Test : TestCase
+ {
+ ERepositoryInfoEAPIKdebuild1Test() : TestCase("info_eapi_kdebuild_1") { }
+
+ unsigned max_run_time() const
+ {
+ return 3000;
+ }
+
+ bool repeatable() const
+ {
+ return false;
+ }
+
+ void run()
+ {
+ TestEnvironment env;
+ env.set_paludis_command("/bin/false");
+ tr1::shared_ptr<Map<std::string, std::string> > keys(new Map<std::string, std::string>);
+ keys->insert("format", "ebuild");
+ keys->insert("names_cache", "/var/empty");
+ keys->insert("location", "e_repository_TEST_dir/repo13");
+ keys->insert("profiles", "e_repository_TEST_dir/repo13/profiles/profile");
+ keys->insert("layout", "traditional");
+ keys->insert("eapi_when_unknown", "0");
+ keys->insert("eapi_when_unspecified", "0");
+ keys->insert("profile_eapi", "0");
+ keys->insert("distdir", stringify(FSEntry::cwd() / "e_repository_TEST_dir" / "distdir"));
+ keys->insert("builddir", stringify(FSEntry::cwd() / "e_repository_TEST_dir" / "build"));
+ tr1::shared_ptr<ERepository> repo(make_ebuild_repository(&env, keys));
+ env.package_database()->add_repository(1, repo);
+
+ tr1::shared_ptr<FakeInstalledRepository> installed_repo(new FakeInstalledRepository(&env, RepositoryName("installed")));
+ env.package_database()->add_repository(2, installed_repo);
+
+ InfoAction action;
+
+ {
+ TestMessageSuffix suffix("info success kdebuild-1", true);
+ const tr1::shared_ptr<const PackageID> id(*env.package_database()->query(query::Matches(
+ PackageDepSpec(parse_user_package_dep_spec("=cat/info-success-kdebuild-1",
+ UserPackageDepSpecOptions()))), qo_require_exactly_one)->last());
+ TEST_CHECK(id);
+ TEST_CHECK_EQUAL(visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->value(), "kdebuild-1");
+ id->perform_action(action);
+ }
+
+ {
+ TestMessageSuffix suffix("info fail kdebuild-1", true);
+ const tr1::shared_ptr<const PackageID> id(*env.package_database()->query(query::Matches(
+ PackageDepSpec(parse_user_package_dep_spec("=cat/info-fail-kdebuild-1",
+ UserPackageDepSpecOptions()))), qo_require_exactly_one)->last());
+ TEST_CHECK(id);
+ TEST_CHECK_EQUAL(visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->value(), "kdebuild-1");
+ TEST_CHECK_THROWS(id->perform_action(action), InfoActionError);
+ }
+ }
+ } test_e_repository_info_eapi_kdebuild_1;
+
struct ERepositoryInstallExheres0Test : TestCase
{
ERepositoryInstallExheres0Test() : TestCase("install_exheres_0") { }
diff --git a/paludis/repositories/e/e_repository_TEST_setup.sh b/paludis/repositories/e/e_repository_TEST_setup.sh
index ffdbc1a6a..6eb0caf39 100755
--- a/paludis/repositories/e/e_repository_TEST_setup.sh
+++ b/paludis/repositories/e/e_repository_TEST_setup.sh
@@ -612,6 +612,22 @@ src_install() {
}
END
cp cat/econf-source/econf-source-{0,1}.ebuild || exit 1
+mkdir -p "cat/dosym-success"
+cat <<'END' > cat/dosym-success/dosym-success-1.ebuild || exit 1
+EAPI="${PV}"
+DESCRIPTION="The Description"
+HOMEPAGE="http://example.com/"
+SRC_URI=""
+SLOT="0"
+IUSE="spork"
+LICENSE="GPL-2"
+KEYWORDS="test"
+
+src_install() {
+ dosym foo /usr/bin/bar
+ [[ "$(readlink ${D}/usr/bin/bar )" == "foo" ]] || die
+}
+END
mkdir -p "cat/best-version"
cat <<'END' > cat/best-version/best-version-0.ebuild || exit 1
DESCRIPTION="The Description"
@@ -727,6 +743,113 @@ pkg_preinst() {
[[ -d "${T}" ]] || die "T not a dir"
}
END
+mkdir -p "cat/econf-source-kdebuild"
+cat <<END > cat/econf-source-kdebuild/econf-source-kdebuild-1.kdebuild-1 || exit 1
+DESCRIPTION="The Description"
+HOMEPAGE="http://example.com/"
+SRC_URI=""
+SLOT="0"
+IUSE="spork"
+LICENSE="GPL-2"
+KEYWORDS="test"
+
+src_unpack() {
+ ECONF_SOURCE=subdir
+ mkdir \${S}
+ cd \${S}
+ mkdir subdir
+ echo 'touch monkey' > subdir/configure
+ chmod +x subdir/configure
+}
+
+src_install() {
+ insinto /usr/bin
+ doins monkey || die "no monkey"
+}
+END
+mkdir -p "cat/info-success-kdebuild"
+cat <<END > cat/info-success-kdebuild/info-success-kdebuild-1.kdebuild-1 || exit 1
+DESCRIPTION="The Description"
+HOMEPAGE="http://example.com/"
+SRC_URI=""
+SLOT="0"
+IUSE="spork"
+LICENSE="GPL-2"
+KEYWORDS="test"
+
+pkg_info() {
+ einfo "This is my pkg_info. There are many like it, but this one is mine."
+}
+END
+mkdir -p "cat/info-fail-kdebuild"
+cat <<END > cat/info-fail-kdebuild/info-fail-kdebuild-1.kdebuild-1 || exit 1
+DESCRIPTION="The Description"
+HOMEPAGE="http://example.com/"
+SRC_URI=""
+SLOT="0"
+IUSE="spork"
+LICENSE="GPL-2"
+KEYWORDS="test"
+
+pkg_info() {
+ die "This is my pkg_info. There are many like it, but this one is mine."
+}
+END
+mkdir -p "cat/banned-functions-kdebuild"
+cat <<END > cat/banned-functions-kdebuild/banned-functions-kdebuild-1.kdebuild-1 || exit 1
+DESCRIPTION="The Description"
+HOMEPAGE="http://example.com/"
+SRC_URI=""
+SLOT="0"
+IUSE="spork"
+LICENSE="GPL-2"
+KEYWORDS="test"
+
+pkg_setup() {
+ prepall
+}
+END
+mkdir -p "cat/banned-vars-kdebuild"
+cat <<END > cat/banned-vars-kdebuild/banned-vars-kdebuild-1.kdebuild-1 || exit 1
+DESCRIPTION="The Description"
+HOMEPAGE="http://example.com/"
+SRC_URI=""
+SLOT="0"
+IUSE="spork"
+LICENSE="GPL-2"
+KEYWORDS="test"
+PROVIDE="virtual/monkey"
+END
+mkdir -p "cat/dosym-success-kdebuild"
+cat <<'END' > cat/dosym-success-kdebuild/dosym-success-kdebuild-1.kdebuild-1 || exit 1
+DESCRIPTION="The Description"
+HOMEPAGE="http://example.com/"
+SRC_URI=""
+SLOT="0"
+IUSE="spork"
+LICENSE="GPL-2"
+KEYWORDS="test"
+
+src_install() {
+ dodir /usr/bin
+ dosym foo /usr/bin/bar
+ [[ "$(readlink ${D}/usr/bin/bar )" == "foo" ]] || die
+}
+END
+mkdir -p "cat/dosym-fail-kdebuild"
+cat <<END > cat/dosym-fail-kdebuild/dosym-fail-kdebuild-1.kdebuild-1 || exit 1
+DESCRIPTION="The Description"
+HOMEPAGE="http://example.com/"
+SRC_URI=""
+SLOT="0"
+IUSE="spork"
+LICENSE="GPL-2"
+KEYWORDS="test"
+
+src_install() {
+ dosym foo /usr/bin/bar
+}
+END
cd ..
mkdir -p repo14/{profiles/profile,metadata,eclass} || exit 1
diff --git a/paludis/repositories/e/e_repository_entries.hh b/paludis/repositories/e/e_repository_entries.hh
index d006b27db..1c5e9fba6 100644
--- a/paludis/repositories/e/e_repository_entries.hh
+++ b/paludis/repositories/e/e_repository_entries.hh
@@ -71,8 +71,7 @@ namespace paludis
/**
* Create an ERepositoryID.
*/
- virtual const tr1::shared_ptr<const ERepositoryID> make_id(const QualifiedPackageName &, const VersionSpec &,
- const FSEntry &, const std::string &) const
+ virtual const tr1::shared_ptr<const ERepositoryID> make_id(const QualifiedPackageName &, const FSEntry &) const
PALUDIS_ATTRIBUTE((warn_unused_result)) = 0;
/**
diff --git a/paludis/repositories/e/eapi.cc b/paludis/repositories/e/eapi.cc
index 7383f7669..d001e1b0e 100644
--- a/paludis/repositories/e/eapi.cc
+++ b/paludis/repositories/e/eapi.cc
@@ -252,6 +252,8 @@ namespace paludis
k.get("unpack_unrecognised_is_fatal")))
.unpack_fix_permissions(destringify<bool>(
k.get("unpack_fix_permissions")))
+ .dosym_mkdir(destringify<bool>(
+ k.get("dosym_mkdir")))
))
))));
diff --git a/paludis/repositories/e/eapi.sr b/paludis/repositories/e/eapi.sr
index 2f53b7164..5e13c7d52 100644
--- a/paludis/repositories/e/eapi.sr
+++ b/paludis/repositories/e/eapi.sr
@@ -105,6 +105,7 @@ make_class_EAPIToolsOptions()
key unpack_unrecognised_is_fatal bool
key unpack_fix_permissions bool
+ key dosym_mkdir bool
doxygen_comment << "END"
/**
diff --git a/paludis/repositories/e/eapis/0.conf b/paludis/repositories/e/eapis/0.conf
index 3b8d47a13..0188973d0 100644
--- a/paludis/repositories/e/eapis/0.conf
+++ b/paludis/repositories/e/eapis/0.conf
@@ -197,4 +197,5 @@ pipe_commands_no_slot_or_repo = true
unpack_unrecognised_is_fatal = false
unpack_fix_permissions = true
+dosym_mkdir = true
diff --git a/paludis/repositories/e/eapis/Makefile.am b/paludis/repositories/e/eapis/Makefile.am
index ed2709064..634cf1e5c 100644
--- a/paludis/repositories/e/eapis/Makefile.am
+++ b/paludis/repositories/e/eapis/Makefile.am
@@ -6,6 +6,7 @@ eapis = \
0.conf \
1.conf \
exheres-0.conf \
+ kdebuild-1.conf \
paludis-1.conf \
pbin-1+0.conf \
pbin-1+1.conf \
diff --git a/paludis/repositories/e/eapis/exheres-0.conf b/paludis/repositories/e/eapis/exheres-0.conf
index 76758f706..bf1431774 100644
--- a/paludis/repositories/e/eapis/exheres-0.conf
+++ b/paludis/repositories/e/eapis/exheres-0.conf
@@ -224,4 +224,5 @@ pipe_commands_no_slot_or_repo = false
unpack_unrecognised_is_fatal = true
unpack_fix_permissions = false
+dosym_mkdir = false
diff --git a/paludis/repositories/e/eapis/kdebuild-1.conf b/paludis/repositories/e/eapis/kdebuild-1.conf
new file mode 100644
index 000000000..bc3d24e2c
--- /dev/null
+++ b/paludis/repositories/e/eapis/kdebuild-1.conf
@@ -0,0 +1,58 @@
+# Configuration for EAPI kdebuild-1
+# EAPI kdebuild-1 is used by the Gentoo KDE project. It is specified in PMS,
+# possibly as a hidden extra.
+
+source ${PALUDIS_EAPIS_DIR}/1.conf
+exported_name = kdebuild-1
+can_be_pbin = false
+
+package_dep_spec_parse_options = allow_slot_deps allow_slot_deps allow_slot_equal_deps \
+ allow_slot_star_deps allow_square_bracket_deps
+ebuild_module_suffixes = kdebuild-1 1 0
+utility_path_suffixes = kdebuild-1 1 0
+dependency_spec_tree_parse_options = uri_supports_arrow
+breaks_portage = true
+
+bracket_merged_variables = DEPEND RDEPEND PDEPEND
+source_merged_variables = IUSE KEYWORDS
+
+ebuild_must_not_set_variables = ${ebuild_must_not_set_variables} PROVIDE
+description_provide =
+metadata_provide =
+flat_cache_provide = -1
+
+ebuild_install = \
+ : killold ; \
+ userpriv sandbox : init saveenv ; \
+ : loadenv setup saveenv ; \
+ sandbox userpriv : loadenv unpack compile saveenv ; \
+ sandbox userpriv checkphase checks=default checks=always : loadenv test saveenv ; \
+ sandbox : loadenv install saveenv ; \
+ strip : ; \
+ prepost : loadenv preinst saveenv ; \
+ merge : ; \
+ prepost : loadenv postinst saveenv ; \
+ : tidyup
+
+ebuild_info = \
+ : killoldmisc ; \
+ sandbox userpriv installed=true : initmisc infovars info ; \
+ sandbox userpriv installed=false : initmisc infovars info ; \
+ : tidyupmisc
+
+uri_labels = \
+ default = URIMirrorsThenListedLabel ; \
+ default-restrict-fetch = URIManualOnlyLabel ; \
+ default-restrict-mirror = URIListedOnlyLabel ; \
+ mirrors-first = URIMirrorsThenListedLabel ; \
+ mirrors-only = URIMirrorsOnlyLabel ; \
+ listed-first = URIListedThenMirrorsLabel ; \
+ listed-only = URIListedOnlyLabel ; \
+ manual = URIManualOnlyLabel
+
+dependency_labels = \
+ suggested = DependencySuggestedLabel ; \
+ required = DependencyRequiredLabel ;
+
+dosym_mkdir = false
+
diff --git a/paludis/repositories/e/eapis/paludis-1.conf b/paludis/repositories/e/eapis/paludis-1.conf
index 0d22cc54d..18e00d166 100644
--- a/paludis/repositories/e/eapis/paludis-1.conf
+++ b/paludis/repositories/e/eapis/paludis-1.conf
@@ -216,4 +216,5 @@ pipe_commands_no_slot_or_repo = false
unpack_unrecognised_is_fatal = false
unpack_fix_permissions = false
+dosym_mkdir = false
diff --git a/paludis/repositories/e/ebuild.cc b/paludis/repositories/e/ebuild.cc
index 1b09b740a..f467c592a 100644
--- a/paludis/repositories/e/ebuild.cc
+++ b/paludis/repositories/e/ebuild.cc
@@ -179,6 +179,8 @@ EbuildCommand::operator() ()
(*(*params[k::package_id()]->eapi())[k::supported()])[k::tools_options()].unpack_unrecognised_is_fatal ? "yes" : "")
.with_setenv("PALUDIS_UNPACK_FIX_PERMISSIONS",
(*(*params[k::package_id()]->eapi())[k::supported()])[k::tools_options()].unpack_fix_permissions ? "yes" : "")
+ .with_setenv("PALUDIS_DOSYM_NO_MKDIR",
+ (*(*params[k::package_id()]->eapi())[k::supported()])[k::tools_options()].dosym_mkdir ? "" : "yes")
.with_setenv("PALUDIS_UNPACK_FROM_VAR",
(*(*params[k::package_id()]->eapi())[k::supported()])[k::ebuild_environment_variables()][k::env_distdir()])
.with_setenv("PALUDIS_PIPE_COMMANDS_SUPPORTED", "yes")
@@ -637,6 +639,12 @@ EbuildUninstallCommand::EbuildUninstallCommand(const EbuildCommandParams & p,
}
std::string
+EbuildConfigCommand::ebuild_file() const
+{
+ return "-";
+}
+
+std::string
EbuildConfigCommand::commands() const
{
return params[k::commands()];
@@ -791,6 +799,15 @@ EbuildPretendCommand::EbuildPretendCommand(const EbuildCommandParams & p,
}
std::string
+EbuildInfoCommand::ebuild_file() const
+{
+ if (info_params[k::use_ebuild_file()])
+ return stringify(params[k::ebuild_file()]);
+ else
+ return "-";
+}
+
+std::string
EbuildInfoCommand::commands() const
{
return params[k::commands()];
@@ -799,7 +816,7 @@ EbuildInfoCommand::commands() const
bool
EbuildInfoCommand::failure()
{
- return false;
+ throw InfoActionError("Info command failed");
}
Command
diff --git a/paludis/repositories/e/ebuild.hh b/paludis/repositories/e/ebuild.hh
index d25702b98..52a71c8bb 100644
--- a/paludis/repositories/e/ebuild.hh
+++ b/paludis/repositories/e/ebuild.hh
@@ -166,7 +166,8 @@ namespace paludis
kc::Field<k::profiles, tr1::shared_ptr<const FSEntrySequence> >,
kc::Field<k::expand_vars, tr1::shared_ptr<const Map<std::string, std::string> > >,
kc::Field<k::load_environment, const FSEntry *>,
- kc::Field<k::info_vars, FSEntry>
+ kc::Field<k::info_vars, FSEntry>,
+ kc::Field<k::use_ebuild_file, bool>
> EbuildInfoCommandParams;
/**
@@ -425,6 +426,8 @@ namespace paludis
virtual Command extend_command(const Command &);
+ virtual std::string ebuild_file() const;
+
public:
/**
* Constructor.
@@ -433,7 +436,7 @@ namespace paludis
};
/**
- * An EbuildPretendCommand is used to configure a package in a VDBRepository.
+ * An EbuildPretendCommand is used to pretend a package in ERepository.
*
* \ingroup grpebuildinterface
*/
@@ -458,7 +461,7 @@ namespace paludis
};
/**
- * An EbuildInfoCommand is used to obtain information from a package in a VDBRepository.
+ * An EbuildInfoCommand is used to obtain information from a package.
*
* \ingroup grpebuildinterface
*/
@@ -471,10 +474,12 @@ namespace paludis
virtual std::string commands() const;
- virtual bool failure();
+ virtual bool failure() PALUDIS_ATTRIBUTE((noreturn));
virtual Command extend_command(const Command &);
+ virtual std::string ebuild_file() const;
+
public:
/**
* Constructor.
diff --git a/paludis/repositories/e/ebuild/Makefile.am b/paludis/repositories/e/ebuild/Makefile.am
index 21b6f7090..1c0678b11 100644
--- a/paludis/repositories/e/ebuild/Makefile.am
+++ b/paludis/repositories/e/ebuild/Makefile.am
@@ -1,6 +1,6 @@
MAINTAINERCLEANFILES = Makefile.in
CLEANFILES = *~
-SUBDIRS = . 0 1 exheres-0 paludis-1 pbin-1 utils
+SUBDIRS = . 0 1 exheres-0 kdebuild-1 paludis-1 pbin-1 utils
AM_CXXFLAGS = -I$(top_srcdir) @PALUDIS_CXXFLAGS@
diff --git a/paludis/repositories/e/ebuild/ebuild.bash b/paludis/repositories/e/ebuild/ebuild.bash
index b6777593e..8e6c068cb 100755
--- a/paludis/repositories/e/ebuild/ebuild.bash
+++ b/paludis/repositories/e/ebuild/ebuild.bash
@@ -171,7 +171,6 @@ check_base_vars="${save_base_vars}"
check_unmodifiable_vars="${save_unmodifiable_vars}"
for var in ${save_vars} ${default_save_vars} ${save_base_vars} ${save_unmodifiable_vars} ; do
- ebuild_notice "debug" "Saving ${var}=${!var}"
eval "export save_var_${var}='${!var}'"
done
diff --git a/paludis/repositories/e/ebuild/kdebuild-1/Makefile.am b/paludis/repositories/e/ebuild/kdebuild-1/Makefile.am
new file mode 100644
index 000000000..28f9af7eb
--- /dev/null
+++ b/paludis/repositories/e/ebuild/kdebuild-1/Makefile.am
@@ -0,0 +1,38 @@
+MAINTAINERCLEANFILES = Makefile.in
+CLEANFILES = *~
+SUBDIRS = .
+
+libexecprogkdebuild1dir = $(libexecdir)/paludis/kdebuild-1
+
+libexecprogkdebuild1_SCRIPTS = \
+ output_functions.bash
+
+TESTS_ENVIRONMENT = env \
+ PALUDIS_EBUILD_DIR="$(top_srcdir)/paludis/repositories/e/ebuild/" \
+ PALUDIS_EBUILD_DIR_FALLBACK="`$(top_srcdir)/paludis/repositories/e/ebuild/utils/canonicalise $(top_builddir)/paludis/repositories/e/ebuild/`" \
+ PALUDIS_EBUILD_MODULE_SUFFIXES="1 0" \
+ PALUDIS_EAPIS_DIR="$(top_srcdir)/paludis/eapis/" \
+ PALUDIS_DISTRIBUTIONS_DIR="$(top_srcdir)/paludis/distributions/" \
+ PALUDIS_DISTRIBUTION="gentoo" \
+ PALUDIS_EBUILD_LOG_LEVEL="warning" \
+ TOP_BUILD_DIR="`$(top_srcdir)/paludis/repositories/e/ebuild/utils/canonicalise $(top_builddir)/`" \
+ TEST_SCRIPT_DIR="$(srcdir)/" \
+ bash $(top_srcdir)/test/run_test.sh $(top_srcdir)/paludis/repositories/e/ebuild/run_test.bash
+
+TESTS =
+check_SCRIPTS = $(TESTS)
+
+EXTRA_DIST = $(libexecprog1_SCRIPTS)
+
+built-sources : $(BUILT_SOURCES)
+ for s in `echo $(SUBDIRS) | tr -d .` ; do $(MAKE) -C $$s built-sources || exit 1 ; done
+
+distcheck-deps-local : $(DISTCHECK_DEPS)
+
+distcheck-deps : distcheck-deps-subdirs
+
+distcheck-deps-subdirs :
+ for s in $(SUBDIRS) . ; do if test x$$s = x. ; then $(MAKE) distcheck-deps-local || exit 1 ; \
+ else $(MAKE) -C $$s distcheck-deps || exit 1 ; fi ; done
+
+
diff --git a/paludis/repositories/e/ebuild/kdebuild-1/output_functions.bash b/paludis/repositories/e/ebuild/kdebuild-1/output_functions.bash
new file mode 100644
index 000000000..aca373934
--- /dev/null
+++ b/paludis/repositories/e/ebuild/kdebuild-1/output_functions.bash
@@ -0,0 +1,31 @@
+#!/bin/bash
+# vim: set sw=4 sts=4 et :
+
+# Copyright (c) 2006, 2007, 2008 Ciaran McCreesh
+#
+# This file is part of the Paludis package manager. Paludis is free software;
+# you can redistribute it and/or modify it under the terms of the GNU General
+# Public License, version 2, as published by the Free Software Foundation.
+#
+# Paludis is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+# details.
+#
+# You should have received a copy of the GNU General Public License along with
+# this program; if not, write to the Free Software Foundation, Inc., 59 Temple
+# Place, Suite 330, Boston, MA 02111-1307 USA
+
+ebuild_notice()
+{
+ [[ -z "${PALUDIS_PIPE_COMMANDS_SUPPORTED}" ]] && return
+ paludis_pipe_command LOG "$EAPI" "$@" >/dev/null
+}
+
+ebuild_section()
+{
+ echo -ne "${COLOUR_CYAN}>>>${COLOUR_NORMAL} "
+ echo "$@"
+}
+
+
diff --git a/paludis/repositories/e/ebuild/utils/Makefile.am b/paludis/repositories/e/ebuild/utils/Makefile.am
index df8187368..74ac3fb21 100644
--- a/paludis/repositories/e/ebuild/utils/Makefile.am
+++ b/paludis/repositories/e/ebuild/utils/Makefile.am
@@ -1,5 +1,5 @@
MAINTAINERCLEANFILES = Makefile.in
-SUBDIRS = . exheres-0
+SUBDIRS = . exheres-0 kdebuild-1
libexecprogdir = $(libexecdir)/paludis/utils
diff --git a/paludis/repositories/e/ebuild/utils/dosym b/paludis/repositories/e/ebuild/utils/dosym
index a54b1158e..e1cbceaba 100755
--- a/paludis/repositories/e/ebuild/utils/dosym
+++ b/paludis/repositories/e/ebuild/utils/dosym
@@ -36,8 +36,14 @@ if [[ ${#} -ne 2 ]]; then
fi
if [[ ! -d $(dirname "${D}$2") ]]; then
- ebuild_notice "qa" "$0: target directory $(dirname "${D}$2") does not exist; creating. Please fix the ebuild to create it explicitly."
- dodir $(dirname $2)
+ if [[ -n "${PALUDIS_DOSYM_NO_MKDIR}" ]] ; then
+ echo "dosym: error: target directory $(dirname "${D}$2" ) does not exist" 1>&2
+ kill -s SIGUSR1 "${EBUILD_KILL_PID}"
+ exit 123
+ else
+ ebuild_notice "qa" "$0: target directory $(dirname "${D}$2") does not exist; creating. Please fix the ebuild to create it explicitly."
+ dodir $(dirname $2)
+ fi
fi
ln -snf "${1}" "${D}${2}"
diff --git a/paludis/repositories/e/ebuild/utils/exheres-0/Makefile.am b/paludis/repositories/e/ebuild/utils/exheres-0/Makefile.am
index 50da7bab8..48f4dc658 100644
--- a/paludis/repositories/e/ebuild/utils/exheres-0/Makefile.am
+++ b/paludis/repositories/e/ebuild/utils/exheres-0/Makefile.am
@@ -49,6 +49,7 @@ CLEANFILES = *~ $(bannedscripts)
$(bannedscripts) : banned_in_eapi_exheres-0
cat $? > $@
+ chmod +x $@
check_PROGRAMS =
diff --git a/paludis/repositories/e/ebuild/utils/kdebuild-1/Makefile.am b/paludis/repositories/e/ebuild/utils/kdebuild-1/Makefile.am
new file mode 100644
index 000000000..01527e56a
--- /dev/null
+++ b/paludis/repositories/e/ebuild/utils/kdebuild-1/Makefile.am
@@ -0,0 +1,64 @@
+MAINTAINERCLEANFILES = Makefile.in
+SUBDIRS = .
+
+libexecprogdir = $(libexecdir)/paludis/utils/kdebuild-1
+
+libexecprog_SCRIPTS = \
+ dohard \
+ dohtml \
+ dosed \
+ donewins \
+ prepall \
+ prepallstrip \
+ prepstrip \
+ prepallman \
+ prepman \
+ prepallinfo \
+ prepinfo \
+ prepdocs \
+ prepalldocs \
+ ecompress \
+ ecompressdir \
+ banned_in_eapi_kdebuild-1
+
+AM_CXXFLAGS = -I$(top_srcdir) @PALUDIS_CXXFLAGS@
+
+TESTS_ENVIRONMENT = env \
+ PALUDIS_UTILITY_PATH_SUFFIXES="exheres-0" \
+ PALUDIS_EBUILD_DIR="`$(top_srcdir)/paludis/repositories/e/ebuild/utils/canonicalise \
+ $(top_srcdir)/paludis/repositories/e/ebuild/`" \
+ PALUDIS_EBUILD_DIR_FALLBACK="`$(top_srcdir)/paludis/repositories/e/ebuild/utils/canonicalise $(top_builddir)/paludis/repositories/e/ebuild/`" \
+ TOP_BUILD_DIR="`$(top_srcdir)/paludis/repositories/e/ebuild/utils/canonicalise $(top_builddir)/`" \
+ PALUDIS_EBUILD_LOG_LEVEL="silent" \
+ PALUDIS_DISTRIBUTION="gentoo" \
+ TEST_SCRIPT_DIR="$(srcdir)/" \
+ bash $(top_srcdir)/paludis/repositories/e/ebuild/utils/run_test.bash
+
+TESTS =
+
+EXTRA_DIST = $(libexecprog_SCRIPTS) $(check_SCRIPTS) \
+ banned_in_eapi_kdebuild-1 $(TESTS)
+
+bannedscripts = prepall prepallstrip prepstrip prepallman prepman prepallinfo \
+ prepinfo prepdocs prepalldocs dohard donewins dosed dohtml \
+ ecompress ecompressdir
+
+CLEANFILES = *~ $(bannedscripts)
+
+$(bannedscripts) : banned_in_eapi_kdebuild-1
+ cat $? > $@
+ chmod +x $@
+
+check_PROGRAMS =
+
+built-sources : $(BUILT_SOURCES)
+ for s in `echo $(SUBDIRS) | tr -d .` ; do $(MAKE) -C $$s built-sources || exit 1 ; done
+
+distcheck-deps-local : $(DISTCHECK_DEPS)
+
+distcheck-deps : distcheck-deps-subdirs
+
+distcheck-deps-subdirs :
+ for s in $(SUBDIRS) . ; do if test x$$s = x. ; then $(MAKE) distcheck-deps-local || exit 1 ; \
+ else $(MAKE) -C $$s distcheck-deps || exit 1 ; fi ; done
+
diff --git a/paludis/repositories/e/ebuild/utils/kdebuild-1/banned_in_eapi_kdebuild-1 b/paludis/repositories/e/ebuild/utils/kdebuild-1/banned_in_eapi_kdebuild-1
new file mode 100644
index 000000000..a987d4e18
--- /dev/null
+++ b/paludis/repositories/e/ebuild/utils/kdebuild-1/banned_in_eapi_kdebuild-1
@@ -0,0 +1,29 @@
+#!/bin/bash
+# vim: set sw=4 sts=4 et :
+
+# Copyright (c) 2007, 2008 Ciaran McCreesh
+#
+# This file is part of the Paludis package manager. Paludis is free software;
+# you can redistribute it and/or modify it under the terms of the GNU General
+# Public License as published by the Free Software Foundation; either version
+# 2 of the License, or (at your option) any later version.
+#
+# Paludis is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+# details.
+#
+# You should have received a copy of the GNU General Public License along with
+# this program; if not, write to the Free Software Foundation, Inc., 59 Temple
+# Place, Suite 330, Boston, MA 02111-1307 USA
+
+COLOUR_RED=$'\e[31;01m'
+COLOUR_NORMAL=$'\e[0m'
+
+echo "${COLOUR_RED}!!! Ebuild bug: '$(basename ${0} )' banned in EAPI kdebuild-1${COLOUR_NORMAL}"
+echo "$(basename ${0} ): making ebuild PID ${EBUILD_KILL_PID} exit with error" 1>&2
+kill -s SIGUSR1 "${EBUILD_KILL_PID}"
+
+exit 123
+
+
diff --git a/paludis/repositories/e/ebuild_entries.cc b/paludis/repositories/e/ebuild_entries.cc
index 907e88431..2d8f174d8 100644
--- a/paludis/repositories/e/ebuild_entries.cc
+++ b/paludis/repositories/e/ebuild_entries.cc
@@ -50,6 +50,8 @@
#include <paludis/util/tr1_functional.hh>
#include <paludis/util/indirect_iterator-impl.hh>
#include <paludis/util/kc.hh>
+#include <paludis/util/config_file.hh>
+#include <paludis/util/instantiation_policy-impl.hh>
#include <fstream>
#include <list>
@@ -61,6 +63,44 @@
using namespace paludis;
using namespace paludis::erepository;
+namespace
+{
+ struct Suffixes :
+ InstantiationPolicy<Suffixes, instantiation_method::SingletonTag>
+ {
+ KeyValueConfigFile file;
+
+ Suffixes() :
+ file(FSEntry(getenv_with_default("PALUDIS_SUFFIXES_FILE", DATADIR "/paludis/ebuild_entries_suffixes.conf")),
+ KeyValueConfigFileOptions())
+ {
+ }
+
+ bool is_known_suffix(const std::string & s) const
+ {
+ return ! file.get("suffix_" + s + "_known").empty();
+ }
+
+ std::string guess_eapi(const std::string & s) const
+ {
+ return file.get("guess_eapi_" + s);
+ }
+
+ std::string manifest_key(const std::string & s) const
+ {
+ std::string result(file.get("manifest_key_" + s));
+ if (result.empty())
+ {
+ Log::get_instance()->message(ll_warning, lc_context) << "Don't know what the manifest key for files with "
+ "suffix '" << s << "' is, guessing 'MISC'";
+ return "MISC";
+ }
+ else
+ return result;
+ }
+ };
+}
+
namespace paludis
{
/**
@@ -104,13 +144,12 @@ EbuildEntries::~EbuildEntries()
}
const tr1::shared_ptr<const ERepositoryID>
-EbuildEntries::make_id(const QualifiedPackageName & q, const VersionSpec & v, const FSEntry & f,
- const std::string & guessed_eapi) const
+EbuildEntries::make_id(const QualifiedPackageName & q, const FSEntry & f) const
{
- Context context("When creating ID for '" + stringify(q) + "-" + stringify(v) + "' from '" + stringify(f) + "':");
+ Context context("When creating ID for '" + stringify(q) + "' from '" + stringify(f) + "':");
- tr1::shared_ptr<EbuildID> result(new EbuildID(q, v, _imp->params.environment,
- _imp->e_repository->shared_from_this(), f, guessed_eapi,
+ tr1::shared_ptr<EbuildID> result(new EbuildID(q, extract_package_file_version(q, f), _imp->params.environment,
+ _imp->e_repository->shared_from_this(), f, _guess_eapi(q, f),
_imp->master_mtime, _imp->eclass_mtimes));
return result;
}
@@ -397,7 +436,7 @@ EbuildEntries::fetch(const tr1::shared_ptr<const ERepositoryID> & id,
(k::environment(), _imp->params.environment)
(k::package_id(), id)
(k::ebuild_dir(), _imp->e_repository->layout()->package_directory(id->name()))
- (k::ebuild_file(), _imp->e_repository->layout()->package_file(*id))
+ (k::ebuild_file(), id->fs_location_key()->value())
(k::files_dir(), _imp->e_repository->layout()->package_directory(id->name()) / "files")
(k::eclassdirs(), _imp->params.eclassdirs)
(k::exlibsdirs(), exlibsdirs)
@@ -608,7 +647,7 @@ EbuildEntries::install(const tr1::shared_ptr<const ERepositoryID> & id,
(k::environment(), _imp->params.environment)
(k::package_id(), id)
(k::ebuild_dir(), _imp->e_repository->layout()->package_directory(id->name()))
- (k::ebuild_file(), _imp->e_repository->layout()->package_file(*id))
+ (k::ebuild_file(), id->fs_location_key()->value())
(k::files_dir(), _imp->e_repository->layout()->package_directory(id->name()) / "files")
(k::eclassdirs(), _imp->params.eclassdirs)
(k::exlibsdirs(), exlibsdirs)
@@ -673,7 +712,7 @@ EbuildEntries::info(const tr1::shared_ptr<const ERepositoryID> & id,
(k::environment(), _imp->params.environment)
(k::package_id(), id)
(k::ebuild_dir(), _imp->e_repository->layout()->package_directory(id->name()))
- (k::ebuild_file(), _imp->e_repository->layout()->package_file(*id))
+ (k::ebuild_file(), id->fs_location_key()->value())
(k::files_dir(), _imp->e_repository->layout()->package_directory(id->name()) / "files")
(k::eclassdirs(), _imp->params.eclassdirs)
(k::exlibsdirs(), exlibsdirs)
@@ -701,6 +740,7 @@ EbuildEntries::info(const tr1::shared_ptr<const ERepositoryID> & id,
(k::profiles(), _imp->params.profiles)
(k::load_environment(), static_cast<const FSEntry *>(0))
(k::info_vars(), i)
+ (k::use_ebuild_file(), true)
);
EbuildInfoCommand cmd(command_params, info_params);
@@ -725,7 +765,7 @@ EbuildEntries::get_environment_variable(const tr1::shared_ptr<const ERepositoryI
(k::environment(), _imp->params.environment)
(k::package_id(), id)
(k::ebuild_dir(), _imp->e_repository->layout()->package_directory(id->name()))
- (k::ebuild_file(), _imp->e_repository->layout()->package_file(*id))
+ (k::ebuild_file(), id->fs_location_key()->value())
(k::files_dir(), _imp->e_repository->layout()->package_directory(id->name()) / "files")
(k::eclassdirs(), _imp->params.eclassdirs)
(k::exlibsdirs(), exlibsdirs)
@@ -788,26 +828,27 @@ EbuildEntries::merge(const MergeParams & m)
bool
EbuildEntries::is_package_file(const QualifiedPackageName & n, const FSEntry & e) const
{
- if (_imp->e_repository->layout()->eapi_ebuild_suffix())
- return (0 == e.basename().compare(0, stringify(n.package).length() + 1, stringify(n.package) + "-")) &&
- std::string::npos != e.basename().rfind('.') &&
- e.basename().at(e.basename().length() - 1) != '~' &&
- e.is_regular_file_or_symlink_to_regular_file();
- else
- return is_file_with_prefix_extension(e, stringify(n.package) + "-", ".ebuild", IsFileWithOptions());
+ Context context("When working out whether '" + stringify(e) + "' is a package file for '" + stringify(n) + "':");
+
+ if (0 != e.basename().compare(0, stringify(n.package).length() + 1, stringify(n.package) + "-"))
+ return false;
+
+ std::string::size_type p(e.basename().rfind('.'));
+ if (std::string::npos == p)
+ return false;
+
+ std::string suffix(e.basename().substr(p + 1));
+ return Suffixes::get_instance()->is_known_suffix(suffix);
}
VersionSpec
EbuildEntries::extract_package_file_version(const QualifiedPackageName & n, const FSEntry & e) const
{
Context context("When extracting version from '" + stringify(e) + "':");
- if (_imp->e_repository->layout()->eapi_ebuild_suffix())
- {
- std::string::size_type p(e.basename().rfind('.'));
- return VersionSpec(strip_leading_string(e.basename().substr(0, p), stringify(n.package) + "-"));
- }
- else
- return VersionSpec(strip_leading_string(strip_trailing_string(e.basename(), ".ebuild"), stringify(n.package) + "-"));
+ std::string::size_type p(e.basename().rfind('.'));
+ if (std::string::npos == p)
+ throw InternalError(PALUDIS_HERE, "got npos");
+ return VersionSpec(strip_leading_string(e.basename().substr(0, p), stringify(n.package) + "-"));
}
bool
@@ -838,7 +879,7 @@ EbuildEntries::pretend(const tr1::shared_ptr<const ERepositoryID> & id,
(k::environment(), _imp->params.environment)
(k::package_id(), id)
(k::ebuild_dir(), _imp->e_repository->layout()->package_directory(id->name()))
- (k::ebuild_file(), _imp->e_repository->layout()->package_file(*id))
+ (k::ebuild_file(), id->fs_location_key()->value())
(k::files_dir(), _imp->e_repository->layout()->package_directory(id->name()) / "files")
(k::eclassdirs(), _imp->params.eclassdirs)
(k::exlibsdirs(), exlibsdirs)
@@ -866,22 +907,33 @@ EbuildEntries::pretend(const tr1::shared_ptr<const ERepositoryID> & id,
}
std::string
-EbuildEntries::get_package_file_manifest_key(const FSEntry & f, const QualifiedPackageName & q) const
+EbuildEntries::get_package_file_manifest_key(const FSEntry & e, const QualifiedPackageName & q) const
{
- if (! is_package_file(q, f))
+ if (! is_package_file(q, e))
return "";
- if (is_file_with_prefix_extension(f, stringify(q.package) + "-", ".ebuild", IsFileWithOptions()))
+
+ std::string::size_type p(e.basename().rfind('.'));
+ if (std::string::npos == p)
return "EBUILD";
- else
- return "EXHERES";
+
+ std::string suffix(e.basename().substr(p + 1));
+ return Suffixes::get_instance()->manifest_key(suffix);
}
std::string
EbuildEntries::binary_ebuild_name(const QualifiedPackageName & q, const VersionSpec & v, const std::string & e) const
{
- if (_imp->e_repository->layout()->eapi_ebuild_suffix())
- return stringify(q.package) + "-" + stringify(v) + "." + e;
- else
- return stringify(q.package) + "-" + stringify(v) + ".ebuild";
+ return stringify(q.package) + "-" + stringify(v) + "." + e;
+}
+
+std::string
+EbuildEntries::_guess_eapi(const QualifiedPackageName &, const FSEntry & e) const
+{
+ std::string::size_type p(e.basename().rfind('.'));
+ if (std::string::npos == p)
+ return "";
+
+ std::string suffix(e.basename().substr(p + 1));
+ return Suffixes::get_instance()->guess_eapi(suffix);
}
diff --git a/paludis/repositories/e/ebuild_entries.hh b/paludis/repositories/e/ebuild_entries.hh
index 34f56db43..db36fd7d4 100644
--- a/paludis/repositories/e/ebuild_entries.hh
+++ b/paludis/repositories/e/ebuild_entries.hh
@@ -46,6 +46,9 @@ namespace paludis
public ERepositoryEntries,
private PrivateImplementationPattern<EbuildEntries>
{
+ private:
+ std::string _guess_eapi(const QualifiedPackageName &, const FSEntry &) const;
+
public:
/**
* Create an EbuildEntries instance.
@@ -72,8 +75,7 @@ namespace paludis
virtual VersionSpec extract_package_file_version(const QualifiedPackageName &, const FSEntry &) const
PALUDIS_ATTRIBUTE((warn_unused_result));
- virtual const tr1::shared_ptr<const ERepositoryID> make_id(const QualifiedPackageName &, const VersionSpec &,
- const FSEntry &, const std::string &) const
+ virtual const tr1::shared_ptr<const ERepositoryID> make_id(const QualifiedPackageName &, const FSEntry &) const
PALUDIS_ATTRIBUTE((warn_unused_result));
virtual std::string get_environment_variable(const tr1::shared_ptr<const ERepositoryID> &, const std::string & var,
diff --git a/paludis/repositories/e/ebuild_entries_suffixes.conf b/paludis/repositories/e/ebuild_entries_suffixes.conf
new file mode 100644
index 000000000..dde38040e
--- /dev/null
+++ b/paludis/repositories/e/ebuild_entries_suffixes.conf
@@ -0,0 +1,11 @@
+suffix_ebuild_known = yes
+guess_eapi_ebuild =
+manifest_key_ebuild = EBUILD
+
+suffix_exheres-0_known = yes
+guess_eapi_exheres-0 = exheres-0
+manifest_key_exheres-0 = EXHERES
+
+suffix_kdebuild-1_known = yes
+guess_eapi_kdebuild-1 = kdebuild-1
+manifest_key_kdebuild-1 = EBUILD
diff --git a/paludis/repositories/e/exheres_layout.cc b/paludis/repositories/e/exheres_layout.cc
index 546ba0af0..51d8e4c6d 100644
--- a/paludis/repositories/e/exheres_layout.cc
+++ b/paludis/repositories/e/exheres_layout.cc
@@ -202,7 +202,7 @@ ExheresLayout::need_package_ids(const QualifiedPackageName & n) const
try
{
- tr1::shared_ptr<const PackageID> id(_imp->entries->make_id(n, _imp->entries->extract_package_file_version(n, *e), *e, ""));
+ tr1::shared_ptr<const PackageID> id(_imp->entries->make_id(n, *e));
if (indirect_iterator(v->end()) != std::find_if(indirect_iterator(v->begin()), indirect_iterator(v->end()),
tr1::bind(std::equal_to<VersionSpec>(), id->version(), tr1::bind(tr1::mem_fn(&PackageID::version), _1))))
Log::get_instance()->message(ll_warning, lc_context, "Ignoring entry '" + stringify(*e)
@@ -421,30 +421,6 @@ ExheresLayout::use_desc_dirs() const
return _imp->use_desc_dirs;
}
-bool
-ExheresLayout::eapi_ebuild_suffix() const
-{
- return true;
-}
-
-FSEntry
-ExheresLayout::package_file(const PackageID & id) const
-{
- for (DirIterator d(package_directory(id.name())), d_end ; d != d_end ; ++d)
- {
- std::string::size_type p(d->basename().rfind('.'));
- if (std::string::npos == p)
- continue;
-
- std::string prefix(stringify(id.name().package) + "-" + stringify(id.version()));
- if (0 == d->basename().compare(0, p, prefix))
- if (_imp->entries->is_package_file(id.name(), *d))
- return *d;
- }
-
- throw NoSuchPackageError(stringify(id));
-}
-
FSEntry
ExheresLayout::profiles_base_dir() const
{
diff --git a/paludis/repositories/e/exheres_layout.hh b/paludis/repositories/e/exheres_layout.hh
index 0fad604c1..6f91c256d 100644
--- a/paludis/repositories/e/exheres_layout.hh
+++ b/paludis/repositories/e/exheres_layout.hh
@@ -88,9 +88,6 @@ namespace paludis
virtual FSEntry category_directory(const CategoryNamePart &) const
PALUDIS_ATTRIBUTE((warn_unused_result));
- virtual FSEntry package_file(const PackageID &) const
- PALUDIS_ATTRIBUTE((warn_unused_result));
-
virtual FSEntry binary_ebuild_location(const QualifiedPackageName &, const VersionSpec &,
const std::string & eapi) const
PALUDIS_ATTRIBUTE((warn_unused_result));
@@ -110,9 +107,6 @@ namespace paludis
virtual tr1::shared_ptr<const FSEntrySequence> use_desc_dirs() const
PALUDIS_ATTRIBUTE((warn_unused_result));
- virtual bool eapi_ebuild_suffix() const
- PALUDIS_ATTRIBUTE((warn_unused_result));
-
virtual FSEntry profiles_base_dir() const
PALUDIS_ATTRIBUTE((warn_unused_result));
diff --git a/paludis/repositories/e/layout.hh b/paludis/repositories/e/layout.hh
index 83d782790..1f1d95703 100644
--- a/paludis/repositories/e/layout.hh
+++ b/paludis/repositories/e/layout.hh
@@ -108,9 +108,6 @@ namespace paludis
virtual FSEntry category_directory(const CategoryNamePart &) const
PALUDIS_ATTRIBUTE((warn_unused_result)) = 0;
- virtual FSEntry package_file(const PackageID &) const
- PALUDIS_ATTRIBUTE((warn_unused_result)) = 0;
-
virtual FSEntry binary_ebuild_location(const QualifiedPackageName &, const VersionSpec &,
const std::string & eapi) const
PALUDIS_ATTRIBUTE((warn_unused_result)) = 0;
@@ -130,9 +127,6 @@ namespace paludis
virtual tr1::shared_ptr<const FSEntrySequence> use_desc_dirs() const
PALUDIS_ATTRIBUTE((warn_unused_result)) = 0;
- virtual bool eapi_ebuild_suffix() const
- PALUDIS_ATTRIBUTE((warn_unused_result)) = 0;
-
virtual FSEntry profiles_base_dir() const
PALUDIS_ATTRIBUTE((warn_unused_result)) = 0;
diff --git a/paludis/repositories/e/qa/Makefile.am b/paludis/repositories/e/qa/Makefile.am
index 1f2a05ecb..5244d8998 100644
--- a/paludis/repositories/e/qa/Makefile.am
+++ b/paludis/repositories/e/qa/Makefile.am
@@ -122,7 +122,7 @@ dist_check_SCRIPTS = \
endif
-EXTRA_DIST = test_extras.cc $(check_SCRIPTS)
+EXTRA_DIST = $(check_SCRIPTS)
BUILT_SOURCES =
TESTS_ENVIRONMENT = env \
@@ -132,6 +132,7 @@ TESTS_ENVIRONMENT = env \
PALUDIS_EBUILD_DIR_FALLBACK="`$(top_srcdir)/paludis/repositories/e/ebuild/utils/canonicalise $(top_builddir)/paludis/repositories/e/ebuild/`" \
PALUDIS_EXTRA_EBUILD_MODULES_DIRS="`$(top_srcdir)/paludis/repositories/e/ebuild/utils/canonicalise $(top_builddir)/paludis/util/`" \
PALUDIS_EAPIS_DIR="$(top_srcdir)/paludis/repositories/e/eapis/" \
+ PALUDIS_SUFFIXES_FILE="$(top_srcdir)/paludis/repositories/e/ebuild_entries_suffixes.conf" \
PALUDIS_QA_DATA_DIR="$(top_srcdir)/paludis/repositories/e/qa/" \
PALUDIS_DISTRIBUTIONS_DIR="$(top_srcdir)/paludis/distributions/" \
PALUDIS_DISTRIBUTION="gentoo" \
@@ -163,7 +164,6 @@ check_PROGRAMS = $(TESTS)
spec_keys_TEST_SOURCES = spec_keys_TEST.cc
spec_keys_TEST_LDADD = \
libpaludiserepositoryqa.la \
- test_extras.o \
$(top_builddir)/paludis/repositories/e/libpaludiserepository.la \
$(top_builddir)/paludis/repositories/fake/libpaludisfakerepository.la \
$(top_builddir)/paludis/util/libpaludisutil.la \
@@ -175,7 +175,6 @@ spec_keys_TEST_LDADD = \
stray_files_TEST_SOURCES = stray_files_TEST.cc
stray_files_TEST_LDADD = \
libpaludiserepositoryqa.la \
- test_extras.o \
$(top_builddir)/paludis/repositories/e/libpaludiserepository.la \
$(top_builddir)/paludis/repositories/fake/libpaludisfakerepository.la \
$(top_builddir)/paludis/util/libpaludisutil.la \
@@ -187,7 +186,6 @@ stray_files_TEST_LDADD = \
extractors_TEST_SOURCES = extractors_TEST.cc
extractors_TEST_LDADD = \
libpaludiserepositoryqa.la \
- test_extras.o \
$(top_builddir)/paludis/repositories/e/libpaludiserepository.la \
$(top_builddir)/paludis/repositories/fake/libpaludisfakerepository.la \
$(top_builddir)/paludis/util/libpaludisutil.la \
@@ -199,7 +197,6 @@ extractors_TEST_LDADD = \
homepage_key_TEST_SOURCES = homepage_key_TEST.cc
homepage_key_TEST_LDADD = \
libpaludiserepositoryqa.la \
- test_extras.o \
$(top_builddir)/paludis/repositories/e/libpaludiserepository.la \
$(top_builddir)/paludis/repositories/fake/libpaludisfakerepository.la \
$(top_builddir)/paludis/util/libpaludisutil.la \
@@ -211,7 +208,6 @@ homepage_key_TEST_LDADD = \
visibility_TEST_SOURCES = visibility_TEST.cc
visibility_TEST_LDADD = \
libpaludiserepositoryqa.la \
- test_extras.o \
$(top_builddir)/paludis/repositories/e/libpaludiserepository.la \
$(top_builddir)/paludis/repositories/fake/libpaludisfakerepository.la \
$(top_builddir)/paludis/util/libpaludisutil.la \
@@ -223,7 +219,6 @@ visibility_TEST_LDADD = \
default_functions_TEST_SOURCES = default_functions_TEST.cc
default_functions_TEST_LDADD = \
libpaludiserepositoryqa.la \
- test_extras.o \
$(top_builddir)/paludis/repositories/e/libpaludiserepository.la \
$(top_builddir)/paludis/repositories/fake/libpaludisfakerepository.la \
$(top_builddir)/paludis/util/libpaludisutil.la \
@@ -235,7 +230,6 @@ default_functions_TEST_LDADD = \
kv_variables_TEST_SOURCES = kv_variables_TEST.cc
kv_variables_TEST_LDADD = \
libpaludiserepositoryqa.la \
- test_extras.o \
$(top_builddir)/paludis/repositories/e/libpaludiserepository.la \
$(top_builddir)/paludis/repositories/fake/libpaludisfakerepository.la \
$(top_builddir)/paludis/util/libpaludisutil.la \
@@ -247,7 +241,6 @@ kv_variables_TEST_LDADD = \
misc_files_TEST_SOURCES = misc_files_TEST.cc
misc_files_TEST_LDADD = \
libpaludiserepositoryqa.la \
- test_extras.o \
$(top_builddir)/paludis/repositories/e/libpaludiserepository.la \
$(top_builddir)/paludis/repositories/fake/libpaludisfakerepository.la \
$(top_builddir)/paludis/util/libpaludisutil.la \
@@ -259,7 +252,6 @@ misc_files_TEST_LDADD = \
manifest_TEST_SOURCES = manifest_TEST.cc
manifest_TEST_LDADD = \
libpaludiserepositoryqa.la \
- test_extras.o \
$(top_builddir)/paludis/repositories/e/libpaludiserepository.la \
$(top_builddir)/paludis/repositories/fake/libpaludisfakerepository.la \
$(top_builddir)/paludis/util/libpaludisutil.la \
@@ -271,7 +263,6 @@ manifest_TEST_LDADD = \
subshell_die_TEST_SOURCES = subshell_die_TEST.cc
subshell_die_TEST_LDADD = \
libpaludiserepositoryqa.la \
- test_extras.o \
$(top_builddir)/paludis/repositories/e/libpaludiserepository.la \
$(top_builddir)/paludis/repositories/fake/libpaludisfakerepository.la \
$(top_builddir)/paludis/util/libpaludisutil.la \
@@ -283,7 +274,6 @@ subshell_die_TEST_LDADD = \
function_keyword_TEST_SOURCES = function_keyword_TEST.cc
function_keyword_TEST_LDADD = \
libpaludiserepositoryqa.la \
- test_extras.o \
$(top_builddir)/paludis/repositories/e/libpaludiserepository.la \
$(top_builddir)/paludis/repositories/fake/libpaludisfakerepository.la \
$(top_builddir)/paludis/util/libpaludisutil.la \
diff --git a/paludis/repositories/e/qa/qa_controller.cc b/paludis/repositories/e/qa/qa_controller.cc
index 70b296776..60a8f4bdb 100644
--- a/paludis/repositories/e/qa/qa_controller.cc
+++ b/paludis/repositories/e/qa/qa_controller.cc
@@ -350,14 +350,14 @@ QAController::_check_id(const tr1::shared_ptr<const PackageID> & i)
QAChecks::get_instance()->package_id_checks_group()->end(),
tr1::bind(std::equal_to<bool>(), false,
tr1::bind<bool>(tr1::mem_fn(&PackageIDCheckFunction::operator() ),
- _1, _imp->repo->layout()->package_file(*i), tr1::ref(_imp->reporter),
+ _1, i->fs_location_key()->value(), tr1::ref(_imp->reporter),
_imp->env, _imp->repo, tr1::static_pointer_cast<const ERepositoryID>(i))));
std::ifstream f(stringify(i->fs_location_key()->value()).c_str());
std::string content((std::istreambuf_iterator<char>(f)), std::istreambuf_iterator<char>());
if (! f)
_imp->reporter.message(
- QAMessage(_imp->repo->layout()->package_file(*i), qaml_severe, "check_id",
+ QAMessage(i->fs_location_key()->value(), qaml_severe, "check_id",
"Couldn't get file contents for ID '" + stringify(*i) + ")")
.with_associated_id(i)
.with_associated_key(i, i->fs_location_key()));
@@ -367,14 +367,14 @@ QAController::_check_id(const tr1::shared_ptr<const PackageID> & i)
QAChecks::get_instance()->package_id_file_contents_checks_group()->end(),
tr1::bind(std::equal_to<bool>(), false,
tr1::bind<bool>(tr1::mem_fn(&PackageIDFileContentsCheckFunction::operator() ),
- _1, _imp->repo->layout()->package_file(*i), tr1::ref(_imp->reporter),
+ _1, i->fs_location_key()->value(), tr1::ref(_imp->reporter),
_imp->env, _imp->repo, tr1::static_pointer_cast<const ERepositoryID>(i), content)));
}
}
catch (const Exception & e)
{
_imp->reporter.message(
- QAMessage(_imp->repo->layout()->package_file(*i), qaml_severe, "check_id",
+ QAMessage(i->fs_location_key()->value(), qaml_severe, "check_id",
"Caught exception '" + e.message() + "' (" + e.what() + ")")
.with_associated_id(i));
}
diff --git a/paludis/repositories/e/qa/test_extras.cc b/paludis/repositories/e/qa/test_extras.cc
deleted file mode 100644
index 08da203c5..000000000
--- a/paludis/repositories/e/qa/test_extras.cc
+++ /dev/null
@@ -1,26 +0,0 @@
-/* vim: set sw=4 sts=4 et foldmethod=syntax : */
-
-/*
- * Copyright (c) 2007 Ciaran McCreesh
- *
- * This file is part of the Paludis package manager. Paludis is free software;
- * you can redistribute it and/or modify it under the terms of the GNU General
- * Public License version 2, as published by the Free Software Foundation.
- *
- * Paludis is distributed in the hope that it will be useful, but WITHOUT ANY
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
- * details.
- *
- * You should have received a copy of the GNU General Public License along with
- * this program; if not, write to the Free Software Foundation, Inc., 59 Temple
- * Place, Suite 330, Boston, MA 02111-1307 USA
- */
-
-#include <paludis/repositories/e/e_repository.hh>
-
-void work_around_annoying_linker_bug(const paludis::ERepository & repo)
-{
- bool PALUDIS_ATTRIBUTE((unused)) b(repo.layout()->eapi_ebuild_suffix());
-}
-
diff --git a/paludis/repositories/e/traditional_layout.cc b/paludis/repositories/e/traditional_layout.cc
index 35859237d..8ab6a46e6 100644
--- a/paludis/repositories/e/traditional_layout.cc
+++ b/paludis/repositories/e/traditional_layout.cc
@@ -220,7 +220,7 @@ TraditionalLayout::need_package_ids(const QualifiedPackageName & n) const
try
{
- tr1::shared_ptr<const PackageID> id(_imp->entries->make_id(n, _imp->entries->extract_package_file_version(n, *e), *e, ""));
+ tr1::shared_ptr<const PackageID> id(_imp->entries->make_id(n, *e));
if (indirect_iterator(v->end()) != std::find_if(indirect_iterator(v->begin()), indirect_iterator(v->end()),
tr1::bind(std::equal_to<VersionSpec>(), id->version(), tr1::bind(tr1::mem_fn(&PackageID::version), _1))))
Log::get_instance()->message(ll_warning, lc_context, "Ignoring entry '" + stringify(*e)
@@ -438,30 +438,6 @@ TraditionalLayout::use_desc_dirs() const
return _imp->use_desc_dirs;
}
-bool
-TraditionalLayout::eapi_ebuild_suffix() const
-{
- return false;
-}
-
-FSEntry
-TraditionalLayout::package_file(const PackageID & id) const
-{
- for (DirIterator d(package_directory(id.name()), DirIteratorOptions() + dio_inode_sort), d_end ; d != d_end ; ++d)
- {
- std::string::size_type p(d->basename().rfind('.'));
- if (std::string::npos == p)
- continue;
-
- std::string prefix(stringify(id.name().package) + "-" + stringify(id.version()));
- if (0 == d->basename().compare(0, p, prefix))
- if (_imp->entries->is_package_file(id.name(), *d))
- return *d;
- }
-
- throw NoSuchPackageError(stringify(id));
-}
-
FSEntry
TraditionalLayout::profiles_base_dir() const
{
diff --git a/paludis/repositories/e/traditional_layout.hh b/paludis/repositories/e/traditional_layout.hh
index 41060a668..6233afbb5 100644
--- a/paludis/repositories/e/traditional_layout.hh
+++ b/paludis/repositories/e/traditional_layout.hh
@@ -89,9 +89,6 @@ namespace paludis
virtual FSEntry category_directory(const CategoryNamePart &) const
PALUDIS_ATTRIBUTE((warn_unused_result));
- virtual FSEntry package_file(const PackageID &) const
- PALUDIS_ATTRIBUTE((warn_unused_result));
-
virtual FSEntry binary_ebuild_location(const QualifiedPackageName &, const VersionSpec &,
const std::string & eapi) const
PALUDIS_ATTRIBUTE((warn_unused_result));
@@ -111,9 +108,6 @@ namespace paludis
virtual tr1::shared_ptr<const FSEntrySequence> use_desc_dirs() const
PALUDIS_ATTRIBUTE((warn_unused_result));
- virtual bool eapi_ebuild_suffix() const
- PALUDIS_ATTRIBUTE((warn_unused_result));
-
virtual FSEntry profiles_base_dir() const
PALUDIS_ATTRIBUTE((warn_unused_result));
diff --git a/paludis/repositories/e/vdb_repository_TEST.cc b/paludis/repositories/e/vdb_repository_TEST.cc
index bb2a4c017..95c172e2e 100644
--- a/paludis/repositories/e/vdb_repository_TEST.cc
+++ b/paludis/repositories/e/vdb_repository_TEST.cc
@@ -393,7 +393,8 @@ namespace test_cases
id->perform_action(uninstall_action);
}
}
- } test_phases_eapi_0("0"), test_phases_eapi_1("1"), test_phases_eapi_exheres_0("exheres-0");
+ } test_phases_eapi_0("0"), test_phases_eapi_1("1"), test_phases_eapi_exheres_0("exheres-0"),
+ test_phases_eapi_kdebuild_1("kdebuild-1");
struct VarsTest : TestCase
{
@@ -507,6 +508,7 @@ namespace test_cases
id->perform_action(uninstall_action);
}
}
- } test_vdb_vars_eapi_0("0"), test_vdb_vars_eapi_1("1"), test_vdb_vars_eapi_exheres_0("exheres-0");
+ } test_vdb_vars_eapi_0("0"), test_vdb_vars_eapi_1("1"), test_vdb_vars_eapi_exheres_0("exheres-0"),
+ test_vdb_vars_eapi_kdebuild_1("kdebuild-1");
}
diff --git a/paludis/repositories/e/vdb_repository_TEST_setup.sh b/paludis/repositories/e/vdb_repository_TEST_setup.sh
index 17d99d542..943573b69 100755
--- a/paludis/repositories/e/vdb_repository_TEST_setup.sh
+++ b/paludis/repositories/e/vdb_repository_TEST_setup.sh
@@ -82,7 +82,7 @@ echo "cat/pkg1 build: cat/pkg2 build,run: cat/pkg3 suggested: cat/pkg4 post: cat
mkdir -p repo3
-mkdir -p srcrepo/{profiles/profile,cat/{target,vars}{,-exheres},eclass}
+mkdir -p srcrepo/{profiles/profile,cat/{target,vars}{,-exheres,-kdebuild},eclass}
cat <<END > srcrepo/profiles/profile/make.defaults
ARCH=test
USERLAND="GNU"
@@ -163,6 +163,30 @@ pkg_config() {
}
END
+cat <<'END' > srcrepo/cat/target-kdebuild/target-kdebuild-1.ebuild
+EAPI="exheres-0"
+DESCRIPTION="The Description"
+HOMEPAGE="http://example.com/"
+SRC_URI=""
+SLOT="0"
+MYOPTIONS=""
+LICENSE="GPL-2"
+PLATFORMS="test"
+DEPENDENCIES=""
+
+src_install() {
+ echo MONKEY > ${D}/monkey
+}
+
+pkg_info() {
+ echo "This is pkg_info"
+}
+
+pkg_config() {
+ echo "This is pkg_config"
+}
+END
+
cat <<'END' > srcrepo/cat/vars/vars-0.ebuild
EAPI="0"
DESCRIPTION="The Description"
@@ -289,3 +313,45 @@ pkg_config() {
}
END
+cat <<'END' > srcrepo/cat/vars-kdebuild/vars-kdebuild-1.ebuild
+EAPI="exheres-0"
+DESCRIPTION="The Description"
+HOMEPAGE="http://example.com/"
+SRC_URI=""
+SLOT="0"
+MYOPTIONS=""
+LICENSE="GPL-2"
+PLATFORMS="test"
+DEPENDENCIES="foo/bar"
+
+pkg_setup() {
+ einfo "${EBUILD_PHASE}: T=${T}"
+ [[ -d "${T}" ]] || die "T not a dir"
+}
+
+src_compile() {
+ einfo "${EBUILD_PHASE}: T=${T}"
+ [[ -d "${T}" ]] || die "T not a dir"
+}
+
+pkg_preinst() {
+ einfo "${EBUILD_PHASE}: T=${T}"
+ [[ -d "${T}" ]] || die "T not a dir"
+}
+
+pkg_prerm() {
+ einfo "${EBUILD_PHASE}: T=${T}"
+ [[ -d "${T}" ]] || die "T not a dir"
+}
+
+pkg_info() {
+ einfo "${EBUILD_PHASE}: T=${T}"
+ [[ -d "${T}" ]] || die "T not a dir"
+}
+
+pkg_config() {
+ einfo "${EBUILD_PHASE}: T=${T}"
+ [[ -d "${T}" ]] || die "T not a dir"
+}
+END
+