aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2010-05-26 10:40:42 +0100
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2010-05-26 10:40:42 +0100
commit45d06ba65582f098eec0b1f15d07930c181aeff0 (patch)
tree5892df8f32c0c010ade137e125e417299e20e276
parent9b78ec9c706f98f827581626b1b6d3646dbaedeb (diff)
downloadpaludis-45d06ba65582f098eec0b1f15d07930c181aeff0.tar.gz
paludis-45d06ba65582f098eec0b1f15d07930c181aeff0.tar.xz
Bring pbins up to date, and crude tests
-rw-r--r--.gitignore1
-rw-r--r--paludis/repositories/e/Makefile.am16
-rw-r--r--paludis/repositories/e/e_repository_TEST_pbin.cc208
-rwxr-xr-xpaludis/repositories/e/e_repository_TEST_pbin_cleanup.sh9
-rwxr-xr-xpaludis/repositories/e/e_repository_TEST_pbin_setup.sh155
-rw-r--r--paludis/repositories/e/eapis/Makefile.am5
-rw-r--r--paludis/repositories/e/eapis/pbin-1+0.conf3
-rw-r--r--paludis/repositories/e/eapis/pbin-1+1.conf3
-rw-r--r--paludis/repositories/e/eapis/pbin-1+2.conf52
-rw-r--r--paludis/repositories/e/eapis/pbin-1+3.conf52
-rw-r--r--paludis/repositories/e/eapis/pbin-1+4.conf52
-rwxr-xr-x[-rw-r--r--]paludis/repositories/e/ebuild/write_binary_ebuild.bash32
-rw-r--r--paludis/repositories/e/ebuild_entries_suffixes.conf12
13 files changed, 594 insertions, 6 deletions
diff --git a/.gitignore b/.gitignore
index 2cb1187..f186745 100644
--- a/.gitignore
+++ b/.gitignore
@@ -236,6 +236,7 @@ paludis-*.*.*.tar.bz2
/paludis/repositories/e/e_repository_TEST_ever
/paludis/repositories/e/e_repository_TEST_exheres_0
/paludis/repositories/e/e_repository_TEST_exlibs
+/paludis/repositories/e/e_repository_TEST_pbin
/paludis/repositories/e/e_repository_TEST_phases
/paludis/repositories/e/e_repository_TEST_replacing
/paludis/repositories/e/e_repository_TEST_symlink_rewriting
diff --git a/paludis/repositories/e/Makefile.am b/paludis/repositories/e/Makefile.am
index 4862b8d..effa360 100644
--- a/paludis/repositories/e/Makefile.am
+++ b/paludis/repositories/e/Makefile.am
@@ -251,6 +251,17 @@ e_repository_TEST_0_LDADD = \
e_repository_TEST_0_CXXFLAGS = $(AM_CXXFLAGS) -I$(top_srcdir) @PALUDIS_CXXFLAGS_NO_DEBUGGING@
+e_repository_TEST_pbin_SOURCES = e_repository_TEST_pbin.cc
+
+e_repository_TEST_pbin_LDADD = \
+ $(top_builddir)/paludis/util/libpaludisutil_@PALUDIS_PC_SLOT@.la \
+ $(top_builddir)/paludis/util/test_extras.o \
+ $(top_builddir)/paludis/libpaludis_@PALUDIS_PC_SLOT@.la \
+ $(top_builddir)/test/libtest.a \
+ $(DYNAMIC_LD_LIBS)
+
+e_repository_TEST_pbin_CXXFLAGS = $(AM_CXXFLAGS) -I$(top_srcdir) @PALUDIS_CXXFLAGS_NO_DEBUGGING@
+
e_repository_TEST_phases_SOURCES = e_repository_TEST_phases.cc
e_repository_TEST_phases_LDADD = \
@@ -464,6 +475,9 @@ EXTRA_DIST = \
e_repository_TEST_4.cc \
e_repository_TEST_4_setup.sh \
e_repository_TEST_4_cleanup.sh \
+ e_repository_TEST_pbin.cc \
+ e_repository_TEST_pbin_setup.sh \
+ e_repository_TEST_pbin_cleanup.sh \
e_repository_TEST_phases.cc \
e_repository_TEST_phases_setup.sh \
e_repository_TEST_phases_cleanup.sh \
@@ -528,6 +542,7 @@ check_SCRIPTS = \
e_repository_TEST_2_setup.sh e_repository_TEST_2_cleanup.sh \
e_repository_TEST_3_setup.sh e_repository_TEST_3_cleanup.sh \
e_repository_TEST_4_setup.sh e_repository_TEST_4_cleanup.sh \
+ e_repository_TEST_pbin_setup.sh e_repository_TEST_pbin_cleanup.sh \
e_repository_TEST_phases_setup.sh e_repository_TEST_phases_cleanup.sh \
e_repository_TEST_exlibs_setup.sh e_repository_TEST_exlibs_cleanup.sh \
e_repository_TEST_replacing_setup.sh e_repository_TEST_replacing_cleanup.sh \
@@ -598,6 +613,7 @@ TESTS = \
e_repository_TEST_ever \
e_repository_TEST_exheres_0 \
e_repository_TEST_exlibs \
+ e_repository_TEST_pbin \
e_repository_TEST_phases \
e_repository_TEST_replacing \
e_repository_TEST_symlink_rewriting \
diff --git a/paludis/repositories/e/e_repository_TEST_pbin.cc b/paludis/repositories/e/e_repository_TEST_pbin.cc
new file mode 100644
index 0000000..27228dd
--- /dev/null
+++ b/paludis/repositories/e/e_repository_TEST_pbin.cc
@@ -0,0 +1,208 @@
+/* vim: set sw=4 sts=4 et foldmethod=syntax : */
+
+/*
+ * Copyright (c) 2006, 2007, 2008, 2009, 2010 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>
+#include <paludis/repositories/e/e_repository_exceptions.hh>
+#include <paludis/repositories/e/e_repository_id.hh>
+#include <paludis/repositories/e/vdb_repository.hh>
+#include <paludis/repositories/e/eapi.hh>
+#include <paludis/repositories/e/dep_spec_pretty_printer.hh>
+#include <paludis/repositories/fake/fake_installed_repository.hh>
+#include <paludis/repositories/fake/fake_package_id.hh>
+#include <paludis/environments/test/test_environment.hh>
+#include <paludis/util/system.hh>
+#include <paludis/util/simple_visitor_cast.hh>
+#include <paludis/util/map.hh>
+#include <paludis/util/make_shared_ptr.hh>
+#include <paludis/util/make_named_values.hh>
+#include <paludis/util/set.hh>
+#include <paludis/standard_output_manager.hh>
+#include <paludis/util/safe_ifstream.hh>
+#include <paludis/package_id.hh>
+#include <paludis/metadata_key.hh>
+#include <paludis/action.hh>
+#include <paludis/stringify_formatter.hh>
+#include <paludis/user_dep_spec.hh>
+#include <paludis/generator.hh>
+#include <paludis/filter.hh>
+#include <paludis/filtered_generator.hh>
+#include <paludis/selection.hh>
+#include <paludis/repository_factory.hh>
+#include <paludis/choice.hh>
+#include <test/test_framework.hh>
+#include <test/test_runner.hh>
+#include <tr1/functional>
+#include <set>
+#include <string>
+
+#include "config.h"
+
+using namespace test;
+using namespace paludis;
+
+namespace
+{
+ void cannot_uninstall(const std::tr1::shared_ptr<const PackageID> & id, const UninstallActionOptions &)
+ {
+ if (id)
+ throw InternalError(PALUDIS_HERE, "cannot uninstall");
+ }
+
+ std::tr1::shared_ptr<OutputManager> make_standard_output_manager(const Action &)
+ {
+ return make_shared_ptr(new StandardOutputManager);
+ }
+
+ std::string from_keys(const std::tr1::shared_ptr<const Map<std::string, std::string> > & m,
+ const std::string & k)
+ {
+ Map<std::string, std::string>::ConstIterator mm(m->find(k));
+ if (m->end() == mm)
+ return "";
+ else
+ return mm->second;
+ }
+
+ WantPhase want_all_phases(const std::string &)
+ {
+ return wp_yes;
+ }
+}
+
+namespace test_cases
+{
+ struct ERepositoryInstallEAPIPBinTest : TestCase
+ {
+ const std::string base_eapi;
+
+ ERepositoryInstallEAPIPBinTest(const std::string & b) :
+ TestCase("install_eapi_pbin_1+" + b),
+ base_eapi(b)
+ {
+ }
+
+ unsigned max_run_time() const
+ {
+ return 3000;
+ }
+
+ bool repeatable() const
+ {
+ return false;
+ }
+
+ void run()
+ {
+ TestEnvironment env;
+ env.set_paludis_command("/bin/false");
+ FSEntry root(FSEntry::cwd() / "e_repository_TEST_pbin_dir" / "root");
+
+ std::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", stringify(FSEntry::cwd() / "e_repository_TEST_pbin_dir" / ("repo" + base_eapi)));
+ keys->insert("profiles", stringify(FSEntry::cwd() / "e_repository_TEST_pbin_dir" / ("repo" + base_eapi + "/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_pbin_dir" / "distdir"));
+ keys->insert("builddir", stringify(FSEntry::cwd() / "e_repository_TEST_pbin_dir" / "build"));
+ keys->insert("root", stringify(root));
+ std::tr1::shared_ptr<Repository> repo(ERepository::repository_factory_create(&env,
+ std::tr1::bind(from_keys, keys, std::tr1::placeholders::_1)));
+ env.package_database()->add_repository(1, repo);
+
+ std::tr1::shared_ptr<Map<std::string, std::string> > b_keys(new Map<std::string, std::string>);
+ b_keys->insert("format", "ebuild");
+ b_keys->insert("names_cache", "/var/empty");
+ b_keys->insert("location", stringify(FSEntry::cwd() / "e_repository_TEST_pbin_dir" / ("binrepo" + base_eapi)));
+ b_keys->insert("profiles", stringify(FSEntry::cwd() / "e_repository_TEST_pbin_dir" / ("binrepo" + base_eapi + "/profiles/profile")));
+ b_keys->insert("layout", "traditional");
+ b_keys->insert("eapi_when_unknown", "0");
+ b_keys->insert("eapi_when_unspecified", "0");
+ b_keys->insert("profile_eapi", "0");
+ b_keys->insert("distdir", stringify(FSEntry::cwd() / "e_repository_TEST_pbin_dir" / "distdir"));
+ b_keys->insert("binary_distdir", stringify(FSEntry::cwd() / "e_repository_TEST_pbin_dir" / "distdir"));
+ b_keys->insert("binary_keywords", "test");
+ b_keys->insert("binary_destination", "true");
+ b_keys->insert("master_repository", "repo" + base_eapi);
+ b_keys->insert("builddir", stringify(FSEntry::cwd() / "e_repository_TEST_pbin_dir" / "build"));
+ b_keys->insert("root", stringify(root));
+ std::tr1::shared_ptr<Repository> b_repo(ERepository::repository_factory_create(&env,
+ std::tr1::bind(from_keys, b_keys, std::tr1::placeholders::_1)));
+ env.package_database()->add_repository(2, b_repo);
+
+ std::tr1::shared_ptr<Map<std::string, std::string> > v_keys(new Map<std::string, std::string>);
+ v_keys->insert("format", "vdb");
+ v_keys->insert("names_cache", "/var/empty");
+ v_keys->insert("provides_cache", "/var/empty");
+ v_keys->insert("location", stringify(FSEntry::cwd() / "e_repository_TEST_pbin_dir" / "vdb"));
+ v_keys->insert("root", stringify(root));
+ std::tr1::shared_ptr<Repository> v_repo(VDBRepository::repository_factory_create(&env,
+ std::tr1::bind(from_keys, keys, std::tr1::placeholders::_1)));
+ env.package_database()->add_repository(1, v_repo);
+
+ {
+ InstallAction bin_action(make_named_values<InstallActionOptions>(
+ n::destination() = b_repo,
+ n::make_output_manager() = &make_standard_output_manager,
+ n::perform_uninstall() = &cannot_uninstall,
+ n::replacing() = make_shared_ptr(new PackageIDSequence),
+ n::want_phase() = &want_all_phases
+ ));
+
+ TestMessageSuffix suffix("prefix", true);
+ const std::tr1::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
+ PackageDepSpec(parse_user_package_dep_spec("=cat/simple-1",
+ &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->last());
+ TEST_CHECK(id);
+ TEST_CHECK_EQUAL(simple_visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->value(), base_eapi);
+ id->perform_action(bin_action);
+ }
+
+ TEST_CHECK(! (root / ("installed-" + base_eapi)).exists());
+ b_repo->invalidate();
+
+ {
+ InstallAction install_action(make_named_values<InstallActionOptions>(
+ n::destination() = v_repo,
+ n::make_output_manager() = &make_standard_output_manager,
+ n::perform_uninstall() = &cannot_uninstall,
+ n::replacing() = make_shared_ptr(new PackageIDSequence),
+ n::want_phase() = &want_all_phases
+ ));
+
+ TestMessageSuffix suffix("prefix", true);
+ const std::tr1::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
+ PackageDepSpec(parse_user_package_dep_spec("=cat/simple-1::binrepo" + base_eapi,
+ &env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->last());
+ TEST_CHECK(id);
+ TEST_CHECK_EQUAL(simple_visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->value(),
+ "pbin-1+" + base_eapi);
+ id->perform_action(install_action);
+ }
+
+ TEST_CHECK((root / ("installed-" + base_eapi)).exists());
+ }
+ } test_e_repository_install_eapi_pbin_0("0"), test_e_repository_install_eapi_pbin_1("1"),
+ test_e_repository_install_eapi_pbin_2("2"), test_e_repository_install_eapi_pbin_3("3"),
+ test_e_repository_install_eapi_pbin_4("4"), test_e_repository_install_eapi_pbin_exheres_0("exheres-0");
+}
+
diff --git a/paludis/repositories/e/e_repository_TEST_pbin_cleanup.sh b/paludis/repositories/e/e_repository_TEST_pbin_cleanup.sh
new file mode 100755
index 0000000..012ba7e
--- /dev/null
+++ b/paludis/repositories/e/e_repository_TEST_pbin_cleanup.sh
@@ -0,0 +1,9 @@
+#!/usr/bin/env bash
+# vim: set ft=sh sw=4 sts=4 et :
+
+if [ -d e_repository_TEST_pbin_dir ] ; then
+ rm -fr e_repository_TEST_pbin_dir
+else
+ true
+fi
+
diff --git a/paludis/repositories/e/e_repository_TEST_pbin_setup.sh b/paludis/repositories/e/e_repository_TEST_pbin_setup.sh
new file mode 100755
index 0000000..1e0614b
--- /dev/null
+++ b/paludis/repositories/e/e_repository_TEST_pbin_setup.sh
@@ -0,0 +1,155 @@
+#!/usr/bin/env bash
+# vim: set ft=sh sw=4 sts=4 et :
+
+mkdir e_repository_TEST_pbin_dir || exit 1
+cd e_repository_TEST_pbin_dir || exit 1
+
+mkdir -p root/etc
+
+mkdir -p vdb
+touch vdb/THISISTHEVDB
+
+mkdir -p build
+ln -s build symlinked_build
+
+mkdir -p distdir
+
+for e in 0 1 2 3 4 ; do
+ mkdir -p repo${e}/{profiles/profile,metadata,eclass} || exit 1
+ cd repo${e} || exit 1
+ echo "repo${e}" >> profiles/repo_name || exit 1
+ echo "cat" >> profiles/categories || exit 1
+ cat <<END > profiles/profile/virtuals
+END
+ cat <<END > profiles/profile/make.defaults
+ARCH="cheese"
+USERLAND="GNU"
+KERNEL="linux"
+LIBC="glibc"
+CHOST="i286-badger-linux-gnu"
+LINGUAS="enabled_en enabled_en_GB enabled_en_GB@UTF-8"
+USE_EXPAND="LINGUAS USERLAND"
+USE_EXPAND_UNPREFIXED="ARCH"
+USE_EXPAND_IMPLICIT="USERLAND ARCH"
+USE_EXPAND_VALUES_USERLAND="GNU"
+USE_EXPAND_VALUES_ARCH="cheese otherarch"
+IUSE_IMPLICIT="build"
+END
+ mkdir -p "cat/simple"
+ cat <<END > cat/simple/simple-1.ebuild || exit 1
+DESCRIPTION="The Description"
+HOMEPAGE="http://example.com/"
+SRC_URI=""
+SLOT="0"
+IUSE=""
+LICENSE="GPL-2"
+KEYWORDS="test"
+EAPI="${e}"
+S="\${WORKDIR}"
+
+src_unpack() {
+ touch installed-${e}
+}
+
+src_install() {
+ insinto /
+ doins installed-${e}
+}
+END
+
+ cd ..
+
+ mkdir -p binrepo${e}/{profiles/profile,metadata,eclass} || exit 1
+ cd binrepo${e} || exit 1
+ echo "binrepo${e}" >> profiles/repo_name || exit 1
+ echo > profiles/categories || exit 1
+ cat <<END > profiles/profile/virtuals
+END
+ cat <<END > profiles/profile/make.defaults
+ARCH="cheese"
+USERLAND="GNU"
+KERNEL="linux"
+LIBC="glibc"
+CHOST="i286-badger-linux-gnu"
+LINGUAS="enabled_en enabled_en_GB enabled_en_GB@UTF-8"
+USE_EXPAND="LINGUAS USERLAND"
+USE_EXPAND_UNPREFIXED="ARCH"
+USE_EXPAND_IMPLICIT="USERLAND ARCH"
+USE_EXPAND_VALUES_USERLAND="GNU"
+USE_EXPAND_VALUES_ARCH="cheese otherarch"
+IUSE_IMPLICIT="build"
+END
+
+ cd ..
+done
+
+for e in exheres-0 ; do
+ mkdir -p repo${e}/{profiles/profile,metadata,eclass} || exit 1
+ cd repo${e} || exit 1
+ echo "repo${e}" >> profiles/repo_name || exit 1
+ echo "cat" >> profiles/categories || exit 1
+ cat <<END > profiles/profile/virtuals
+END
+ cat <<END > profiles/profile/make.defaults
+ARCH="cheese"
+USERLAND="GNU"
+KERNEL="linux"
+LIBC="glibc"
+CHOST="i286-badger-linux-gnu"
+LINGUAS="enabled_en enabled_en_GB enabled_en_GB@UTF-8"
+USE_EXPAND="LINGUAS USERLAND"
+USE_EXPAND_UNPREFIXED="ARCH"
+USE_EXPAND_IMPLICIT="USERLAND ARCH"
+USE_EXPAND_VALUES_USERLAND="GNU"
+USE_EXPAND_VALUES_ARCH="cheese otherarch"
+IUSE_IMPLICIT="build"
+END
+ mkdir -p "cat/simple"
+ cat <<END > cat/simple/simple-1.ebuild || exit 1
+DESCRIPTION="The Description"
+HOMEPAGE="http://example.com/"
+DOWNLOADS=""
+SLOT="0"
+MYOPTIONS=""
+LICENCES="GPL-2"
+PLATFORMS="test"
+EAPI="${e}"
+WORK="\${WORKBASE}"
+
+src_unpack() {
+ touch installed-${e}
+}
+
+src_install() {
+ insinto /
+ doins installed-${e}
+}
+END
+ cd ..
+
+ mkdir -p binrepo${e}/{profiles/profile,metadata,eclass} || exit 1
+ cd binrepo${e} || exit 1
+ echo "binrepo${e}" >> profiles/repo_name || exit 1
+ echo > profiles/categories || exit 1
+ cat <<END > profiles/profile/virtuals
+END
+ cat <<END > profiles/profile/make.defaults
+ARCH="cheese"
+USERLAND="GNU"
+KERNEL="linux"
+LIBC="glibc"
+CHOST="i286-badger-linux-gnu"
+LINGUAS="enabled_en enabled_en_GB enabled_en_GB@UTF-8"
+USE_EXPAND="LINGUAS USERLAND"
+USE_EXPAND_UNPREFIXED="ARCH"
+USE_EXPAND_IMPLICIT="USERLAND ARCH"
+USE_EXPAND_VALUES_USERLAND="GNU"
+USE_EXPAND_VALUES_ARCH="cheese otherarch"
+IUSE_IMPLICIT="build"
+END
+
+ cd ..
+done
+
+cd ..
+
diff --git a/paludis/repositories/e/eapis/Makefile.am b/paludis/repositories/e/eapis/Makefile.am
index 03b111e..eb8b5d5 100644
--- a/paludis/repositories/e/eapis/Makefile.am
+++ b/paludis/repositories/e/eapis/Makefile.am
@@ -13,11 +13,14 @@ eapis = \
paludis-1.conf \
pbin-1+0.conf \
pbin-1+1.conf \
+ pbin-1+2.conf \
+ pbin-1+3.conf \
pbin-1+paludis-1.conf \
pbin-1+exheres-0.conf
future_eapis = \
- 4.conf
+ 4.conf \
+ pbin-1+4.conf
eapidir = $(datadir)/paludis/eapis/
diff --git a/paludis/repositories/e/eapis/pbin-1+0.conf b/paludis/repositories/e/eapis/pbin-1+0.conf
index a4b46a4..e4760bb 100644
--- a/paludis/repositories/e/eapis/pbin-1+0.conf
+++ b/paludis/repositories/e/eapis/pbin-1+0.conf
@@ -14,6 +14,9 @@ non_empty_variables = \
build:DISTDIR PALUDIS_TMPDIR PALUDIS_EBUILD_LOG_LEVEL PALUDIS_EBUILD_DIR \
build:USERLAND build:KERNEL build:ARCH PALUDIS_COMMAND ROOT
+directory_variables = \
+ build:PORTDIR build:DISTDIR
+
ignore_pivot_env_variables = \
A S D WORKDIR IMAGE
diff --git a/paludis/repositories/e/eapis/pbin-1+1.conf b/paludis/repositories/e/eapis/pbin-1+1.conf
index 8cd1a59..5485f96 100644
--- a/paludis/repositories/e/eapis/pbin-1+1.conf
+++ b/paludis/repositories/e/eapis/pbin-1+1.conf
@@ -14,6 +14,9 @@ non_empty_variables = \
build:DISTDIR PALUDIS_TMPDIR PALUDIS_EBUILD_LOG_LEVEL PALUDIS_EBUILD_DIR \
build:USERLAND build:KERNEL build:ARCH PALUDIS_COMMAND ROOT
+directory_variables = \
+ build:PORTDIR build:DISTDIR
+
ignore_pivot_env_variables = \
A S D WORKDIR IMAGE
diff --git a/paludis/repositories/e/eapis/pbin-1+2.conf b/paludis/repositories/e/eapis/pbin-1+2.conf
new file mode 100644
index 0000000..93b8d71
--- /dev/null
+++ b/paludis/repositories/e/eapis/pbin-1+2.conf
@@ -0,0 +1,52 @@
+# Configuration for EAPI 2, used by Paludis binary format 1.
+# EAPI 2 is specified in PMS.
+
+source ${PALUDIS_EAPIS_DIR}/2.conf
+can_be_pbin = false
+
+ebuild_module_suffixes = pbin-1 ${ebuild_module_suffixes}
+support_eclasses = false
+has_optional_tests = false
+has_recommended_tests = false
+
+non_empty_variables = \
+ P PV PR PN PVR PF CATEGORY build:FILESDIR build:PORTDIR \
+ build:DISTDIR PALUDIS_TMPDIR PALUDIS_EBUILD_LOG_LEVEL PALUDIS_EBUILD_DIR \
+ build:USERLAND build:KERNEL build:ARCH PALUDIS_COMMAND ROOT
+
+directory_variables = \
+ build:PORTDIR build:DISTDIR
+
+ignore_pivot_env_variables = \
+ A S D WORKDIR IMAGE
+
+ignore_pivot_env_functions = \
+ src_unpack src_prepare src_configure src_compile src_test src_install
+
+ebuild_functions = ${ebuild_functions} builtin_pivotbin builtin_installbin
+
+ebuild_install = \
+ skipname=killold : killold ; \
+ skipname=init userpriv sandbox : init saveenv ; \
+ skipname=setup clearenv : loadenv pivotbin setup saveenv ; \
+ skipname=installbin sandbox clearenv : loadenv installbin saveenv ; \
+ skipname=strip strip : ; \
+ skipname=preinst clearenv prepost : loadenv preinst saveenv ; \
+ skipname=merge merge : ; \
+ skipname=postinst clearenv prepost : loadenv postinst saveenv ; \
+ skipname=tidyup tidyup clearenv : loadenv tidyup
+
+description_generated_using = Generated using
+description_generated_time = Generated time
+description_keywords = Binary keywords
+description_src_uri = Binary URI
+description_use = Selected USE flags
+
+metadata_generated_using = GENERATED_USING
+metadata_generated_time = GENERATED_TIME
+metadata_keywords = BINARY_KEYWORDS
+metadata_src_uri = BINARY_URI
+metadata_use = USE
+
+flat_list_minimum_size = -1
+
diff --git a/paludis/repositories/e/eapis/pbin-1+3.conf b/paludis/repositories/e/eapis/pbin-1+3.conf
new file mode 100644
index 0000000..4206823
--- /dev/null
+++ b/paludis/repositories/e/eapis/pbin-1+3.conf
@@ -0,0 +1,52 @@
+# Configuration for EAPI 3, used by Paludis binary format 1.
+# EAPI 3 is specified in PMS.
+
+source ${PALUDIS_EAPIS_DIR}/3.conf
+can_be_pbin = false
+
+ebuild_module_suffixes = pbin-1 ${ebuild_module_suffixes}
+support_eclasses = false
+has_optional_tests = false
+has_recommended_tests = false
+
+non_empty_variables = \
+ P PV PR PN PVR PF CATEGORY build:FILESDIR build:PORTDIR \
+ build:DISTDIR PALUDIS_TMPDIR PALUDIS_EBUILD_LOG_LEVEL PALUDIS_EBUILD_DIR \
+ build:USERLAND build:KERNEL build:ARCH PALUDIS_COMMAND ROOT
+
+directory_variables = \
+ build:PORTDIR build:DISTDIR
+
+ignore_pivot_env_variables = \
+ A S D WORKDIR IMAGE
+
+ignore_pivot_env_functions = \
+ src_unpack src_prepare src_configure src_compile src_test src_install
+
+ebuild_functions = ${ebuild_functions} builtin_pivotbin builtin_installbin
+
+ebuild_install = \
+ skipname=killold : killold ; \
+ skipname=init userpriv sandbox : init saveenv ; \
+ skipname=setup clearenv : loadenv pivotbin setup saveenv ; \
+ skipname=installbin sandbox clearenv : loadenv installbin saveenv ; \
+ skipname=strip strip : ; \
+ skipname=preinst clearenv prepost : loadenv preinst saveenv ; \
+ skipname=merge merge : ; \
+ skipname=postinst clearenv prepost : loadenv postinst saveenv ; \
+ skipname=tidyup tidyup clearenv : loadenv tidyup
+
+description_generated_using = Generated using
+description_generated_time = Generated time
+description_keywords = Binary keywords
+description_src_uri = Binary URI
+description_use = Selected USE flags
+
+metadata_generated_using = GENERATED_USING
+metadata_generated_time = GENERATED_TIME
+metadata_keywords = BINARY_KEYWORDS
+metadata_src_uri = BINARY_URI
+metadata_use = USE
+
+flat_list_minimum_size = -1
+
diff --git a/paludis/repositories/e/eapis/pbin-1+4.conf b/paludis/repositories/e/eapis/pbin-1+4.conf
new file mode 100644
index 0000000..d502ad3
--- /dev/null
+++ b/paludis/repositories/e/eapis/pbin-1+4.conf
@@ -0,0 +1,52 @@
+# Configuration for EAPI 4, used by Paludis binary format 1.
+# EAPI 4 is specified in PMS.
+
+source ${PALUDIS_EAPIS_DIR}/4.conf
+can_be_pbin = false
+
+ebuild_module_suffixes = pbin-1 ${ebuild_module_suffixes}
+support_eclasses = false
+has_optional_tests = false
+has_recommended_tests = false
+
+non_empty_variables = \
+ P PV PR PN PVR PF CATEGORY build:FILESDIR build:PORTDIR \
+ build:DISTDIR PALUDIS_TMPDIR PALUDIS_EBUILD_LOG_LEVEL PALUDIS_EBUILD_DIR \
+ build:USERLAND build:KERNEL build:ARCH PALUDIS_COMMAND ROOT
+
+directory_variables = \
+ build:PORTDIR build:DISTDIR
+
+ignore_pivot_env_variables = \
+ A S D WORKDIR IMAGE
+
+ignore_pivot_env_functions = \
+ src_unpack src_prepare src_configure src_compile src_test src_install
+
+ebuild_functions = ${ebuild_functions} builtin_pivotbin builtin_installbin
+
+ebuild_install = \
+ skipname=killold : killold ; \
+ skipname=init userpriv sandbox : init saveenv ; \
+ skipname=setup clearenv : loadenv pivotbin setup saveenv ; \
+ skipname=installbin sandbox clearenv : loadenv installbin saveenv ; \
+ skipname=strip strip : ; \
+ skipname=preinst clearenv prepost : loadenv preinst saveenv ; \
+ skipname=merge merge : ; \
+ skipname=postinst clearenv prepost : loadenv postinst saveenv ; \
+ skipname=tidyup tidyup clearenv : loadenv tidyup
+
+description_generated_using = Generated using
+description_generated_time = Generated time
+description_keywords = Binary keywords
+description_src_uri = Binary URI
+description_use = Selected USE flags
+
+metadata_generated_using = GENERATED_USING
+metadata_generated_time = GENERATED_TIME
+metadata_keywords = BINARY_KEYWORDS
+metadata_src_uri = BINARY_URI
+metadata_use = USE
+
+flat_list_minimum_size = -1
+
diff --git a/paludis/repositories/e/ebuild/write_binary_ebuild.bash b/paludis/repositories/e/ebuild/write_binary_ebuild.bash
index 7447c44..220a264 100644..100755
--- a/paludis/repositories/e/ebuild/write_binary_ebuild.bash
+++ b/paludis/repositories/e/ebuild/write_binary_ebuild.bash
@@ -1,7 +1,7 @@
#!/usr/bin/env bash
# vim: set sw=4 sts=4 et :
-# Copyright (c) 2006, 2007, 2008 Ciaran McCreesh
+# Copyright (c) 2006, 2007, 2008, 2010 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
@@ -58,19 +58,41 @@ declare -r EBUILD_KILL_PID
ebuild_load_module()
{
+ local older= t= d= save_excl= excl_v=
+ if [[ "${1}" == "--older" ]] ; then
+ shift
+ older=true
+ excl_v="EBUILD_MODULES_DIRS_EXCLUDE_${1}"
+ save_excl="${!excl_v}"
+ fi
+
for d in ${EBUILD_MODULES_DIRS}; do
+ local dx= x=
+ if [[ -n "${older}" ]] ; then
+ for dx in ${!excl_v} ; do
+ [[ "${dx}" == "${d}" ]] && x=true
+ done
+ fi
+ [[ -n "${x}" ]] && continue
+
+ [[ -n "${older}" ]] && export "${excl_v}"="${!excl_v} ${d}"
if [[ -f "${d}/${1}.bash" ]]; then
if ! source "${d}/${1}.bash"; then
type die &>/dev/null && eval die "\"Error loading module \${1}\""
echo "Error loading module ${1}" 1>&2
- exit 123
+ exit 124
fi
return
+ else
+ t="${t:+${t}, }${d}"
fi
done
- type die &>/dev/null && eval die "\"Couldn't find module \${1}\""
- echo "Couldn't find module ${1}" 1>&2
- exit 123
+
+ [[ -n "${older}" ]] && export "${excl_v}"="${save_excl}"
+
+ type die &>/dev/null && eval die "\"Couldn't find module \${1} (looked in \${t})\""
+ echo "Couldn't find module ${1} (looked in ${t})" 1>&2
+ exit 125
}
ebuild_load_module die_functions
diff --git a/paludis/repositories/e/ebuild_entries_suffixes.conf b/paludis/repositories/e/ebuild_entries_suffixes.conf
index 91e1cc7..a8de325 100644
--- a/paludis/repositories/e/ebuild_entries_suffixes.conf
+++ b/paludis/repositories/e/ebuild_entries_suffixes.conf
@@ -14,6 +14,18 @@ suffix_pbin-1+1_known = yes
guess_eapi_pbin-1+1 = pbin-1+1
manifest_key_pbin-1+1 = PBIN
+suffix_pbin-1+2_known = yes
+guess_eapi_pbin-1+1 = pbin-1+2
+manifest_key_pbin-1+1 = PBIN
+
+suffix_pbin-1+3_known = yes
+guess_eapi_pbin-1+1 = pbin-1+3
+manifest_key_pbin-1+1 = PBIN
+
+suffix_pbin-1+4_known = yes
+guess_eapi_pbin-1+1 = pbin-1+4
+manifest_key_pbin-1+1 = PBIN
+
suffix_pbin-1+exheres-0_known = yes
guess_eapi_pbin-1+exheres-0 = pbin-1+exheres-0
manifest_key_pbin-1+exheres-0 = PBIN