aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2010-07-02 09:19:55 +0100
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2010-07-02 09:34:59 +0100
commit6d3b0227c4c11718823439589fac0830fb07fce7 (patch)
treef68cb32a03d064613b7e7cf6f2f49fa25b399bb0
parentd38106ef9e3b2951d75623eb7103fffd3d3a2426 (diff)
downloadpaludis-6d3b0227c4c11718823439589fac0830fb07fce7.tar.gz
paludis-6d3b0227c4c11718823439589fac0830fb07fce7.tar.xz
Don't enable pbins by default
-rw-r--r--configure.ac17
-rw-r--r--paludis/repositories/e/Makefile.am32
-rw-r--r--paludis/repositories/e/e_repository.cc13
-rw-r--r--src/clients/cave/cmd_resolve_cmdline.cc3
-rw-r--r--src/clients/cave/cmd_resolve_cmdline.hh8
-rw-r--r--src/clients/cave/resolve_common.cc9
6 files changed, 61 insertions, 21 deletions
diff --git a/configure.ac b/configure.ac
index f5f1965..8276eb5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1453,6 +1453,23 @@ if echo $clients | tr ' ' '\n' | grep '^cave$' >/dev/null ; then
fi
dnl }}}
+dnl {{{
+
+AC_ARG_ENABLE([pbins],
+ AS_HELP_STRING([--enable-pbins], [Enable pbins (nonfunctional, for development only)]),
+ [ENABLE_PBINS=$enableval
+ enable_pbins=$enableval],
+ [ENABLE_PBINS=no
+ enable_pbins=no])
+AC_MSG_RESULT([$ENABLE_PBINS])
+AC_SUBST([ENABLE_VISIBILITY])
+AM_CONDITIONAL([ENABLE_PBINS], test "x$enable_pbins" = "xyes")
+if test x"$ENABLE_PBINS" = "xyes" ; then
+ AC_DEFINE([ENABLE_PBINS], [1], [Build pbin support])
+fi
+
+dnl }}}
+
dnl {{{ new resolver
if test "x$need_resolver" = "xyes" ; then
diff --git a/paludis/repositories/e/Makefile.am b/paludis/repositories/e/Makefile.am
index effa360..fd90c8f 100644
--- a/paludis/repositories/e/Makefile.am
+++ b/paludis/repositories/e/Makefile.am
@@ -251,17 +251,6 @@ 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 = \
@@ -597,6 +586,23 @@ xml_things_TEST_CXXFLAGS = $(AM_CXXFLAGS) @PALUDIS_CXXFLAGS_NO_DEBUGGING@
endif
+if ENABLE_PBINS
+
+PBINS_TESTS = e_repository_TEST_pbin
+
+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@
+
+endif
+
paludis_datadir = $(datadir)/paludis
dist_paludis_data_DATA = traditional.exclude ebuild_entries_suffixes.conf
@@ -613,7 +619,6 @@ 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 \
@@ -629,7 +634,8 @@ TESTS = \
source_uri_finder_TEST \
vdb_merger_TEST \
vdb_unmerger_TEST \
- $(GLSA_TESTS)
+ $(GLSA_TESTS) \
+ $(PBINS_TESTS)
check_PROGRAMS = $(TESTS)
diff --git a/paludis/repositories/e/e_repository.cc b/paludis/repositories/e/e_repository.cc
index f0e90ff..625065a 100644
--- a/paludis/repositories/e/e_repository.cc
+++ b/paludis/repositories/e/e_repository.cc
@@ -18,8 +18,6 @@
* Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#include "config.h"
-
#include <paludis/repositories/e/aa_visitor.hh>
#include <paludis/repositories/e/e_key.hh>
#include <paludis/repositories/e/e_repository.hh>
@@ -115,6 +113,8 @@
#include <dlfcn.h>
#include <stdint.h>
+#include "config.h"
+
#define STUPID_CAST(type, val) reinterpret_cast<type>(reinterpret_cast<uintptr_t>(val))
/** \file
@@ -248,9 +248,11 @@ namespace paludis
std::tr1::shared_ptr<const MetadataValueKey<std::string> > use_manifest_key;
std::tr1::shared_ptr<const MetadataSectionKey> info_pkgs_key;
std::tr1::shared_ptr<const MetadataCollectionKey<Set<std::string> > > info_vars_key;
+#ifdef ENABLE_PBINS
std::tr1::shared_ptr<const MetadataValueKey<std::string> > binary_destination_key;
std::tr1::shared_ptr<const MetadataValueKey<std::string> > binary_src_uri_prefix_key;
std::tr1::shared_ptr<const MetadataValueKey<std::string> > binary_keywords;
+#endif
std::tr1::shared_ptr<const MetadataValueKey<FSEntry> > accounts_repository_data_location_key;
std::tr1::shared_ptr<const MetadataValueKey<FSEntry> > e_updates_location_key;
std::tr1::shared_ptr<const MetadataValueKey<std::string> > accept_keywords_key;
@@ -336,6 +338,7 @@ namespace paludis
make_shared_ptr(new InfoVarsMetadataKey(layout->info_variables_files())) :
std::tr1::shared_ptr<InfoVarsMetadataKey>()
),
+#ifdef ENABLE_PBINS
binary_destination_key(new LiteralMetadataValueKey<std::string> (
"binary_destination", "binary_destination", params.binary_destination() ? mkt_normal : mkt_internal,
stringify(params.binary_destination()))),
@@ -345,6 +348,7 @@ namespace paludis
binary_keywords(new LiteralMetadataValueKey<std::string> (
"binary_keywords", "binary_keywords", params.binary_destination() ? mkt_normal : mkt_internal,
params.binary_keywords())),
+#endif
accounts_repository_data_location_key(layout->accounts_repository_data_location_key()),
e_updates_location_key(layout->e_updates_location_key()),
sync_host_key(new LiteralMetadataValueKey<std::string> ("sync_host", "sync_host", mkt_internal, extract_host_from_url(params.sync()))),
@@ -545,9 +549,11 @@ ERepository::_add_metadata_keys() const
add_metadata_key(_imp->info_pkgs_key);
if (_imp->info_vars_key)
add_metadata_key(_imp->info_vars_key);
+#ifdef ENABLE_PBINS
add_metadata_key(_imp->binary_destination_key);
add_metadata_key(_imp->binary_src_uri_prefix_key);
add_metadata_key(_imp->binary_keywords);
+#endif
if (_imp->accounts_repository_data_location_key)
add_metadata_key(_imp->accounts_repository_data_location_key);
if (_imp->e_updates_location_key)
@@ -1480,11 +1486,14 @@ ERepository::repository_factory_create(
}
bool binary_destination(false);
+
+#ifdef ENABLE_PBINS
if (! f("binary_destination").empty())
{
Context item_context("When handling binary_destination key:");
binary_destination = destringify<bool>(f("binary_destination"));
}
+#endif
std::string binary_uri_prefix(f("binary_uri_prefix"));
diff --git a/src/clients/cave/cmd_resolve_cmdline.cc b/src/clients/cave/cmd_resolve_cmdline.cc
index b1641bb..d833bfa 100644
--- a/src/clients/cave/cmd_resolve_cmdline.cc
+++ b/src/clients/cave/cmd_resolve_cmdline.cc
@@ -221,6 +221,7 @@ ResolveCommandLineResolutionOptions::ResolveCommandLineResolutionOptions(args::A
"does not satisfy other constraints. Also note that specifying a preset will not force a package to be "
"considered if it would otherwise not be part of the resolution set."),
+#ifdef ENABLE_PBINS
g_destination_options(this, "Destination Options", "Control to which destinations targets are installed. Dependencies "
"will always be installed to / as necessary."),
a_make(&g_destination_options, "make", 'm', "Specify what to do with targets.",
@@ -241,7 +242,7 @@ ResolveCommandLineResolutionOptions::ResolveCommandLineResolutionOptions(args::A
// a_via_binary(&g_destination_options, "via-binary", 'b', "When building a package matching the supplied spec, "
// "create a binary package and use that for the install. May be specified multiple times. If this option "
// "is not specified, a package will be built multiple times for multiple destinations"),
-
+#endif
// g_query_options(this, "Query Options", "Query the user interactively when making decisions. "
// "If only --query is specified, prompt for everything. Otherwise, prompt only for the specified decisions."),
diff --git a/src/clients/cave/cmd_resolve_cmdline.hh b/src/clients/cave/cmd_resolve_cmdline.hh
index 45a55ba..c79d03c 100644
--- a/src/clients/cave/cmd_resolve_cmdline.hh
+++ b/src/clients/cave/cmd_resolve_cmdline.hh
@@ -23,6 +23,7 @@
#include "command_command_line.hh"
#include <paludis/environment-fwd.hh>
#include <tr1/memory>
+#include "config.h"
namespace paludis
{
@@ -90,17 +91,14 @@ namespace paludis
args::ArgsGroup g_preset_options;
args::StringSetArg a_preset;
+#ifdef ENABLE_PBINS
args::ArgsGroup g_destination_options;
args::EnumArg a_make;
args::EnumArg a_make_dependencies;
// args::StringSetArg a_via_binary;
-
// args::SwitchArg a_fetch;
-// args::SwitchArg a_create_binaries_for_targets;
-// args::StringSetArg a_install_via_binary;
-// args::StringSetArg a_no_binaries_for;
+#endif
-//
// args::ArgsGroup g_query_options;
// args::SwitchArg a_query;
// args::SwitchArg a_query_slots;
diff --git a/src/clients/cave/resolve_common.cc b/src/clients/cave/resolve_common.cc
index 5e4e40a..969f828 100644
--- a/src/clients/cave/resolve_common.cc
+++ b/src/clients/cave/resolve_common.cc
@@ -78,6 +78,8 @@
#include <list>
#include <map>
+#include "config.h"
+
using namespace paludis;
using namespace paludis::resolver;
using namespace cave;
@@ -108,6 +110,7 @@ namespace
DestinationTypes visit(const TargetReason &) const
{
+#ifdef ENABLE_PBINS
if (resolution_options.a_make.argument() == "binaries")
return DestinationTypes() + dt_create_binary;
else if (resolution_options.a_make.argument() == "install")
@@ -115,6 +118,9 @@ namespace
else
throw args::DoHelp("Don't understand argument '" + resolution_options.a_make.argument() + "' to '--"
+ resolution_options.a_make.long_name() + "'");
+#else
+ return DestinationTypes() + dt_install_to_slash;
+#endif
}
DestinationTypes visit(const DependentReason &) const
@@ -130,6 +136,8 @@ namespace
DestinationTypes visit(const DependencyReason &) const
{
DestinationTypes extras;
+
+#ifdef ENABLE_PBINS
if (resolution_options.a_make.argument() == "binaries")
{
if (resolution_options.a_make_dependencies.argument() == "auto" ||
@@ -137,6 +145,7 @@ namespace
resolution_options.a_make_dependencies.argument() == "all")
extras += dt_create_binary;
}
+#endif
return (DestinationTypes() + dt_install_to_slash) | extras;
}