aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2007-02-10 19:35:50 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2007-02-10 19:35:50 +0000
commit49fafdd0d12239aac4b99640db336f31be677dfb (patch)
tree115c78a04586a4dc1ae61c46fe7add290f875955
parent1a49a0058ee71228269b999a37651168d5a4ce83 (diff)
downloadpaludis-49fafdd0d12239aac4b99640db336f31be677dfb.tar.gz
paludis-49fafdd0d12239aac4b99640db336f31be677dfb.tar.xz
Kill NothingRepository.
-rw-r--r--configure.ac8
-rw-r--r--paludis/repositories/nothing/Makefile.am61
-rw-r--r--paludis/repositories/nothing/nothing_repository.cc258
-rw-r--r--paludis/repositories/nothing/nothing_repository.hh112
-rw-r--r--paludis/repositories/nothing/nothing_repository.sr25
-rw-r--r--paludis/repositories/nothing/registration.cc40
6 files changed, 3 insertions, 501 deletions
diff --git a/configure.ac b/configure.ac
index 80d005b..9c677b1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -695,18 +695,17 @@ AM_CONDITIONAL([ENABLE_RUBY], test "x$enable_ruby" = "xyes")
dnl }}}
dnl {{{ repositories
-ALL_REPOSITORIES="cran fake nothing gentoo gems virtuals"
-DEFAULT_REPOSITORIES="fake nothing gentoo virtuals"
+ALL_REPOSITORIES="cran fake gentoo gems virtuals"
+DEFAULT_REPOSITORIES="fake gentoo virtuals"
AC_MSG_CHECKING([which repositories to build...])
AC_ARG_WITH([repositories],
[ --with-repositories=foo,bar,...
Build the specified repositories:
- default Equivalent to fake,nothing,gentoo,virtuals
+ default Equivalent to fake,gentoo,virtuals
cran The Comprehensive R Archive Network
fake A fake repository for test cases and adjutrix
gems Ruby Gems (requires libyaml) (UNUSABLE)
- nothing A repository with no content
gentoo Gentoo packages (ebuilds, vdb)
virtuals Old style Gentoo virtuals],
[repositories="`echo $with_repositories | tr ',' ' '`"],
@@ -905,7 +904,6 @@ AC_OUTPUT(
paludis/repositories/cran/Makefile
paludis/repositories/fake/Makefile
paludis/repositories/gems/Makefile
- paludis/repositories/nothing/Makefile
paludis/repositories/gentoo/Makefile
paludis/repositories/gentoo/ebuild/Makefile
paludis/repositories/gentoo/ebuild/digests/Makefile
diff --git a/paludis/repositories/nothing/Makefile.am b/paludis/repositories/nothing/Makefile.am
deleted file mode 100644
index 6dd9b24..0000000
--- a/paludis/repositories/nothing/Makefile.am
+++ /dev/null
@@ -1,61 +0,0 @@
-CLEANFILES = *~ gmon.out *.gcov *.gcno *.gcda
-DISTCLEANFILES = nothing_repository-sr.hh nothing_repository-sr.cc
-MAINTAINERCLEANFILES = Makefile.in
-
-AM_CXXFLAGS = -I$(top_srcdir) @PALUDIS_CXXFLAGS@ @PALUDIS_CXXFLAGS_VISIBILITY@
-DEFS= \
- -DSYSCONFDIR=\"$(sysconfdir)\" \
- -DLIBEXECDIR=\"$(libexecdir)\" \
- -DDATADIR=\"$(datadir)\"
-
-paludis_repositories_libdir = $(libdir)/paludis/repositories
-
-if MONOLITHIC
-
-noinst_LTLIBRARIES = libpaludisnothingrepository.la
-
-else
-
-paludis_repositories_lib_LTLIBRARIES = libpaludisnothingrepository.la
-
-endif
-
-libpaludisnothingrepository_la_SOURCES = \
- nothing_repository.cc \
- nothing_repository.hh \
- registration.cc
-
-libpaludisnothingrepository_la_LDFLAGS = -version-info @VERSION_LIB_CURRENT@:@VERSION_LIB_REVISION@:0
-paludis_repositories_nothing_includedir = $(includedir)/paludis/repositories/nothing/
-
-if ! MONOLITHIC
-
-libpaludisnothingrepository_la_LIBADD = \
- $(top_builddir)/paludis/libpaludis.la \
- $(top_builddir)/paludis/util/libpaludisutil.la \
- $(DYNAMIC_LD_LIBS)
-
-endif
-
-paludis_repositories_nothing_include_HEADERS = \
- nothing_repository.hh \
- nothing_repository-sr.hh
-
-EXTRA_DIST = \
- nothing_repository-sr.hh \
- nothing_repository-sr.cc \
- nothing_repository.sr
-
-BUILT_SOURCES = \
- nothing_repository-sr.hh \
- nothing_repository-sr.cc
-
-nothing_repository-sr.hh : nothing_repository.sr $(top_srcdir)/misc/make_sr.bash
- $(top_srcdir)/misc/make_sr.bash --header $(srcdir)/nothing_repository.sr > $@
-
-nothing_repository-sr.cc : nothing_repository.sr $(top_srcdir)/misc/make_sr.bash
- $(top_srcdir)/misc/make_sr.bash --source $(srcdir)/nothing_repository.sr > $@
-
-built-sources : $(BUILT_SOURCES)
- for s in `echo $(SUBDIRS) | tr -d .` ; do $(MAKE) -C $$s built-sources || exit 1 ; done
-
diff --git a/paludis/repositories/nothing/nothing_repository.cc b/paludis/repositories/nothing/nothing_repository.cc
deleted file mode 100644
index 13db408..0000000
--- a/paludis/repositories/nothing/nothing_repository.cc
+++ /dev/null
@@ -1,258 +0,0 @@
-/* vim: set sw=4 sts=4 et foldmethod=syntax : */
-
-/*
- * Copyright (c) 2006, 2007 Ciaran McCreesh <ciaranm@ciaranm.org>
- *
- * 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 "config.h"
-
-#include <paludis/repositories/nothing/nothing_repository.hh>
-#include <paludis/package_database.hh>
-#include <paludis/util/collection_concrete.hh>
-#include <paludis/portage_dep_parser.hh>
-#include <paludis/syncer.hh>
-#include <paludis/util/dir_iterator.hh>
-#include <paludis/util/log.hh>
-#include <paludis/util/stringify.hh>
-#include <paludis/util/system.hh>
-#include <paludis/util/tokeniser.hh>
-
-/** \file
- * Implementation of NothingRepository.
- *
- * \ingroup grpnothingrepository
- */
-
-using namespace paludis;
-
-#include <paludis/repositories/nothing/nothing_repository-sr.cc>
-
-namespace paludis
-{
- /**
- * Implementation data for a NothingRepository.
- *
- * \ingroup grpnothingrepository
- */
- template <>
- struct Implementation<NothingRepository>
- {
- /// Our name
- std::string name;
-
- /// Our location
- FSEntry location;
-
- /// Sync URL
- std::string sync;
-
- /// Sync options
- std::string sync_options;
-
- /// (Empty) provides map.
- const std::map<QualifiedPackageName, QualifiedPackageName> provide_map;
-
- /// Environment (for syncing)
- const Environment * environment;
-
- /// Constructor.
- Implementation(const NothingRepositoryParams &);
-
- /// Destructor.
- ~Implementation();
- };
-
- Implementation<NothingRepository>::Implementation(const NothingRepositoryParams & p) :
- name(p.name),
- location(p.location),
- sync(p.sync),
- sync_options(p.sync_options),
- environment(p.environment)
- {
- }
-
- Implementation<NothingRepository>::~Implementation()
- {
- }
-}
-
-NothingRepository::NothingRepository(const NothingRepositoryParams & p) try :
- Repository(RepositoryName(p.name),
- RepositoryCapabilities::create()
- .mask_interface(0)
- .installable_interface(0)
- .installed_interface(0)
- .contents_interface(0)
- .news_interface(0)
- .sets_interface(0)
- .syncable_interface(this)
- .uninstallable_interface(0)
- .use_interface(0)
- .world_interface(0)
- .environment_variable_interface(0)
- .mirrors_interface(0)
- .virtuals_interface(0)
- .provides_interface(0)
- .config_interface(0)
- .destination_interface(0),
- "nothing"),
- PrivateImplementationPattern<NothingRepository>(new Implementation<NothingRepository>(p))
-{
- std::tr1::shared_ptr<RepositoryInfoSection> config_info(new RepositoryInfoSection("Configuration information"));
- config_info->add_kv("sync", _imp->sync);
- config_info->add_kv("sync_options", _imp->sync_options);
- config_info->add_kv("location", stringify(_imp->location));
-
- _info->add_section(config_info);
-}
-catch (const NameError & e)
-{
- Context context("When making Nothing repository '" + p.name + "':");
- throw NothingRepositoryConfigurationError("Caught NameError: " + e.message());
-}
-
-NothingRepository::~NothingRepository()
-{
-}
-
-bool
-NothingRepository::do_has_category_named(const CategoryNamePart &) const
-{
- return false;
-}
-
-bool
-NothingRepository::do_has_package_named(const QualifiedPackageName &) const
-{
- return false;
-}
-
-std::tr1::shared_ptr<const CategoryNamePartCollection>
-NothingRepository::do_category_names() const
-{
- std::tr1::shared_ptr<CategoryNamePartCollection> result(new CategoryNamePartCollection::Concrete);
- return result;
-}
-
-std::tr1::shared_ptr<const QualifiedPackageNameCollection>
-NothingRepository::do_package_names(const CategoryNamePart &) const
-{
- std::tr1::shared_ptr<QualifiedPackageNameCollection> result(new QualifiedPackageNameCollection::Concrete);
- return result;
-}
-
-std::tr1::shared_ptr<const VersionSpecCollection>
-NothingRepository::do_version_specs(const QualifiedPackageName &) const
-{
- return std::tr1::shared_ptr<VersionSpecCollection>(new VersionSpecCollection::Concrete);
-}
-
-bool
-NothingRepository::do_has_version(const QualifiedPackageName &,
- const VersionSpec &) const
-{
- return false;
-}
-
-std::tr1::shared_ptr<const VersionMetadata>
-NothingRepository::do_version_metadata(
- const QualifiedPackageName & q, const VersionSpec & v) const
-{
- throw NoSuchPackageError(stringify(PackageDatabaseEntry(q, v, name())));
-}
-
-std::tr1::shared_ptr<Repository>
-NothingRepository::make_nothing_repository(
- Environment * const env,
- std::tr1::shared_ptr<const AssociativeCollection<std::string, std::string> > m)
-{
- std::string repo_file(m->end() == m->find("repo_file") ? std::string("?") :
- m->find("repo_file")->second);
-
- Context context("When making Nothing repository from repo_file '" + repo_file + "':");
-
- Log::get_instance()->message(ll_warning, lc_context, "Format 'nothing' is "
- "deprecated, use 'ebuild' or hook scripts instead");
-
- std::string location;
- if (m->end() == m->find("location") || ((location = m->find("location")->second)).empty())
- throw NothingRepositoryConfigurationError("Key 'location' not specified or empty");
-
- std::string sync;
- if (m->end() != m->find("sync"))
- sync = m->find("sync")->second;
-
- std::string name;
- if (m->end() == m->find("name") || ((name = m->find("name")->second)).empty())
- throw NothingRepositoryConfigurationError("Key 'name' not specified or empty in '"
- + repo_file + "'");
-
- std::string sync_options;
- if (m->end() != m->find("sync_options"))
- sync_options = m->find("sync_options")->second;
-
- if (m->end() != m->find("sync_exclude"))
- {
- Log::get_instance()->message(ll_warning, lc_no_context, "The sync_exclude key in '"
- + repo_file + "' is deprecated in favour of sync_options = --exclude-from=");
- if (! sync_options.empty())
- sync_options += " ";
- sync_options += "--exclude-from='" + m->find("sync_exclude")->second + "'";
- }
-
- return std::tr1::shared_ptr<Repository>(new NothingRepository(NothingRepositoryParams::create()
- .name(name)
- .location(location)
- .sync(sync)
- .sync_options(sync_options)
- .environment(env)));
-}
-
-NothingRepositoryConfigurationError::NothingRepositoryConfigurationError(
- const std::string & msg) throw () :
- ConfigurationError("Nothing repository configuration error: " + msg)
-{
-}
-
-bool
-NothingRepository::do_is_licence(const std::string &) const
-{
- return false;
-}
-
-bool
-NothingRepository::do_sync() const
-{
- Context context("When syncing repository '" + stringify(name()) + "':");
-
- if (_imp->sync.empty())
- return false;
-
- DefaultSyncer syncer(SyncerParams::create()
- .environment(_imp->environment)
- .local(stringify(_imp->location))
- .remote(_imp->sync));
- SyncOptions opts(_imp->sync_options);
- syncer.sync(opts);
-
- return true;
-}
-
-void
-NothingRepository::invalidate()
-{
-}
-
diff --git a/paludis/repositories/nothing/nothing_repository.hh b/paludis/repositories/nothing/nothing_repository.hh
deleted file mode 100644
index 970227b..0000000
--- a/paludis/repositories/nothing/nothing_repository.hh
+++ /dev/null
@@ -1,112 +0,0 @@
-/* vim: set sw=4 sts=4 et foldmethod=syntax : */
-
-/*
- * Copyright (c) 2006, 2007 Ciaran McCreesh <ciaranm@ciaranm.org>
- *
- * 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
- */
-
-#ifndef PALUDIS_GUARD_PALUDIS_NOTHING_REPOSITORY_HH
-#define PALUDIS_GUARD_PALUDIS_NOTHING_REPOSITORY_HH 1
-
-#include <paludis/repository.hh>
-#include <paludis/util/private_implementation_pattern.hh>
-#include <paludis/util/fs_entry.hh>
-
-/** \file
- * Declarations for the NothingRepository class.
- *
- * \ingroup grpnothingrepository
- */
-
-namespace paludis
-{
- class PackageDatabase;
-
-#include <paludis/repositories/nothing/nothing_repository-sr.hh>
-
- /**
- * A NothingRepository is a Repository that has no content, but can be
- * synced along with other repositories.
- *
- * \ingroup grpnothingrepository
- */
- class PALUDIS_VISIBLE NothingRepository :
- public Repository,
- public RepositorySyncableInterface,
- private PrivateImplementationPattern<NothingRepository>
- {
- protected:
- virtual bool do_has_category_named(const CategoryNamePart &) const;
-
- virtual bool do_has_package_named(const QualifiedPackageName &) const;
-
- virtual std::tr1::shared_ptr<const CategoryNamePartCollection> do_category_names() const;
-
- virtual std::tr1::shared_ptr<const QualifiedPackageNameCollection> do_package_names(
- const CategoryNamePart &) const;
-
- virtual std::tr1::shared_ptr<const VersionSpecCollection> do_version_specs(
- const QualifiedPackageName &) const;
-
- virtual bool do_has_version(const QualifiedPackageName &, const VersionSpec &) const;
-
- virtual std::tr1::shared_ptr<const VersionMetadata> do_version_metadata(
- const QualifiedPackageName &,
- const VersionSpec &) const PALUDIS_ATTRIBUTE((noreturn));
-
- virtual bool do_is_licence(const std::string &) const;
-
- virtual bool do_sync() const;
-
- public:
- /**
- * Constructor.
- */
- NothingRepository(const NothingRepositoryParams &);
-
- /**
- * Virtual constructor.
- */
- static std::tr1::shared_ptr<Repository> make_nothing_repository(
- Environment * const env,
- std::tr1::shared_ptr<const AssociativeCollection<std::string, std::string> >);
-
- /**
- * Destructor.
- */
- ~NothingRepository();
-
- virtual void invalidate();
- };
-
- /**
- * Thrown if invalid parameters are provided for
- * NothingRepository::make_nothing_repository.
- *
- * \ingroup grpexceptions
- * \ingroup grpnothingrepository
- */
- class NothingRepositoryConfigurationError : public ConfigurationError
- {
- public:
- /**
- * Constructor.
- */
- NothingRepositoryConfigurationError(const std::string & msg) throw ();
- };
-}
-
-
-#endif
diff --git a/paludis/repositories/nothing/nothing_repository.sr b/paludis/repositories/nothing/nothing_repository.sr
deleted file mode 100644
index c8d1e2d..0000000
--- a/paludis/repositories/nothing/nothing_repository.sr
+++ /dev/null
@@ -1,25 +0,0 @@
-#!/bin/bash
-# vim: set sw=4 sts=4 et :
-
-make_class_NothingRepositoryParams()
-{
- key location FSEntry
- key name std::string
- key sync std::string
- key sync_options std::string
-
- key environment "const Environment *"
-
- allow_named_args
-
- doxygen_comment << "END"
- /**
- * Parameters for a NothingRepository.
- *
- * \see NothingRepository
- * \ingroup grpnothingrepository
- */
-END
-}
-
-
diff --git a/paludis/repositories/nothing/registration.cc b/paludis/repositories/nothing/registration.cc
deleted file mode 100644
index a675504..0000000
--- a/paludis/repositories/nothing/registration.cc
+++ /dev/null
@@ -1,40 +0,0 @@
-/* vim: set sw=4 sts=4 et foldmethod=syntax : */
-
-/*
- * Copyright (c) 2006 Ciaran McCreesh <ciaranm@ciaranm.org>
- *
- * 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/repository_maker.hh>
-#include <paludis/repositories/nothing/nothing_repository.hh>
-#include "config.h"
-
-using namespace paludis;
-
-#ifndef MONOLITHIC
-
-extern "C"
-{
- void register_repositories(RepositoryMaker * maker);
-}
-
-void register_repositories(RepositoryMaker * maker)
-{
- maker->register_maker("nothing", &NothingRepository::make_nothing_repository);
-}
-
-#endif
-
-