aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2008-12-06 00:23:00 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2008-12-06 00:23:00 +0000
commitcb96ea0a3a27d02c5a5331ac3e443b0aea35ddee (patch)
tree61758ebbc06e94ccea834539b358f9195f86ff1c
parentbe75725ef69df695ff8f29a276e3d31d9b9637fd (diff)
downloadpaludis-cb96ea0a3a27d02c5a5331ac3e443b0aea35ddee.tar.gz
paludis-cb96ea0a3a27d02c5a5331ac3e443b0aea35ddee.tar.xz
Don't use these any more
-rw-r--r--paludis/files.m42
-rw-r--r--paludis/stage_builder_task.cc129
-rw-r--r--paludis/stage_builder_task.hh151
-rw-r--r--paludis/stage_options.sr21
4 files changed, 0 insertions, 303 deletions
diff --git a/paludis/files.m4 b/paludis/files.m4
index fafb8cb..b386449 100644
--- a/paludis/files.m4
+++ b/paludis/files.m4
@@ -71,8 +71,6 @@ add(`selection_handler', `hh', `cc', `fwd')
add(`set_file', `hh', `cc', `se', `sr', `test', `testscript')
add(`show_suggest_visitor', `hh', `cc')
add(`slot_requirement', `hh', `fwd', `cc')
-add(`stage_builder_task', `hh', `cc')
-add(`stage_options', `sr')
add(`stringify_formatter', `hh', `cc', `fwd', `impl', `test')
add(`stripper', `hh', `cc', `fwd', `test', `testscript')
add(`syncer', `hh', `cc')
diff --git a/paludis/stage_builder_task.cc b/paludis/stage_builder_task.cc
deleted file mode 100644
index cd174e2..0000000
--- a/paludis/stage_builder_task.cc
+++ /dev/null
@@ -1,129 +0,0 @@
-/* vim: set sw=4 sts=4 et foldmethod=syntax : */
-
-/*
- * Copyright (c) 2006 Danny van Dyk
- *
- * 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 "stage_builder_task.hh"
-
-#include <paludis/environment.hh>
-#include <paludis/util/private_implementation_pattern-impl.hh>
-#include <paludis/util/wrapped_forward_iterator-impl.hh>
-#include <list>
-
-using namespace paludis;
-
-template class WrappedForwardIterator<StageBuilderTask::StageConstIteratorTag,
- const std::tr1::shared_ptr<const StageBase> >;
-
-namespace paludis
-{
- template<>
- struct Implementation<StageBuilderTask>
- {
- std::list<std::tr1::shared_ptr<const StageBase> > stages;
-
- const StageOptions options;
-
- Implementation(const StageOptions & o) :
- options(o)
- {
- }
- };
-}
-
-#include <paludis/stage_options-sr.cc>
-
-StageBuildError::StageBuildError(const std::string & m) throw () :
- Exception(m)
-{
-}
-
-StageBase::~StageBase()
-{
-}
-
-StageBuilderTask::StageBuilderTask(const StageOptions & o) :
- PrivateImplementationPattern<StageBuilderTask>(new Implementation<StageBuilderTask>(o))
-{
-}
-
-StageBuilderTask::~StageBuilderTask()
-{
-}
-
-void
-StageBuilderTask::queue_stage(const std::tr1::shared_ptr<const StageBase> & p)
-{
- Context context("When queuing stage in build list:");
- _imp->stages.push_back(p);
-}
-
-StageBuilderTask::StageConstIterator
-StageBuilderTask::begin_stages() const
-{
- return StageConstIterator(_imp->stages.begin());
-}
-
-StageBuilderTask::StageConstIterator
-StageBuilderTask::end_stages() const
-{
- return StageConstIterator(_imp->stages.end());
-}
-
-void
-StageBuilderTask::execute()
-{
- Context context("When executing stage builder task:");
-
- on_build_all_pre();
-
- for (std::list<std::tr1::shared_ptr<const StageBase> >::const_iterator
- s(_imp->stages.begin()), s_end(_imp->stages.end()) ;
- s != s_end ; ++s)
- {
- Context context_local("When building stage '" + (*s)->short_name() + "':");
-
- on_build_pre(*s);
-
- try
- {
- if (((*s)->is_rebuild()) && (! _imp->options.always_rebuild))
- {
- on_build_skipped(*s);
- continue;
- }
-
- if (! (*s)->build(_imp->options))
- throw StageBuildError("Failed building stage '" + (*s)->short_name() + "'");
-
- if (_imp->options.pretend)
- continue;
-
- on_build_succeed(*s);
- }
- catch (const StageBuildError & e)
- {
- on_build_fail(*s, e);
- }
-
-
- on_build_post(*s);
- }
-
- on_build_all_post();
-}
-
diff --git a/paludis/stage_builder_task.hh b/paludis/stage_builder_task.hh
deleted file mode 100644
index 54fcc47..0000000
--- a/paludis/stage_builder_task.hh
+++ /dev/null
@@ -1,151 +0,0 @@
-/* vim: set sw=4 sts=4 et foldmethod=syntax : */
-
-/*
- * Copyright (c) 2006 Danny van Dyk
- *
- * 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_STAGE_BUILDER_TASK_HH
-#define PALUDIS_GUARD_PALUDIS_STAGE_BUILDER_TASK_HH 1
-
-#include <paludis/util/instantiation_policy.hh>
-#include <paludis/util/private_implementation_pattern.hh>
-#include <paludis/util/exception.hh>
-#include <paludis/util/wrapped_forward_iterator-fwd.hh>
-#include <tr1/memory>
-
-/** \file
- * Declarations for StageBuilderTask.
- *
- * \ingroup g_tasks
- *
- * \section Examples
- *
- * - None at this time.
- */
-
-namespace paludis
-{
- /**
- * Thrown if a stage build fails.
- *
- * \ingroup g_tasks
- * \ingroup g_exceptions
- * \nosubgrouping
- */
- class PALUDIS_VISIBLE StageBuildError :
- public Exception
- {
- public:
- /**
- * Constructor
- *
- * \param message Message associated with the build error.
- */
- StageBuildError(const std::string & message) throw ();
- };
-
-#include <paludis/stage_options-sr.hh>
-
- /**
- * Represents the base class for all stages which can be build by
- * StageBuilderTask.
- *
- * \ingroup g_tasks
- * \nosubgrouping
- */
- class PALUDIS_VISIBLE StageBase
- {
- public:
- virtual ~StageBase();
-
- /// Build the stage.
- virtual int build(const StageOptions &) const = 0;
-
- /// Verbose description for this stage.
- virtual std::string description() const = 0;
-
- /// Has this stage ever been built before?
- virtual bool is_rebuild() const = 0;
-
- /// Short name for this stage.
- virtual std::string short_name() const = 0;
- };
-
- /**
- * Task to handle building for of one or more descendants of StageBase.
- *
- * \ingroup g_tasks
- * \nosubgrouping
- */
- class PALUDIS_VISIBLE StageBuilderTask :
- PrivateImplementationPattern<StageBuilderTask>,
- InstantiationPolicy<StageBuilderTask, instantiation_method::NonCopyableTag>
- {
- protected:
- ///\name Basic operations
- ///\{
-
- StageBuilderTask(const StageOptions &);
-
- ///\}
-
- public:
- ///\name Basic operations
- ///\{
-
- virtual ~StageBuilderTask();
-
- ///\}
-
- ///\name Queue stage in build list
- ///\{
-
- void queue_stage(const std::tr1::shared_ptr<const StageBase> &);
-
- ///\}
-
- ///\name Iterate over our stages
- ///\{
-
- struct StageConstIteratorTag;
- typedef WrappedForwardIterator<StageConstIteratorTag, const std::tr1::shared_ptr<const StageBase> > StageConstIterator;
- StageConstIterator begin_stages() const;
- StageConstIterator end_stages() const;
-
- ///\}
-
- ///\name Event callbacks
- ///\{
-
- virtual void on_build_all_pre() = 0;
- virtual void on_build_pre(const std::tr1::shared_ptr<const StageBase> &) = 0;
- virtual void on_build_post(const std::tr1::shared_ptr<const StageBase> &) = 0;
- virtual void on_build_fail(const std::tr1::shared_ptr<const StageBase> &, const StageBuildError &) = 0;
- virtual void on_build_skipped(const std::tr1::shared_ptr<const StageBase> &) = 0;
- virtual void on_build_succeed(const std::tr1::shared_ptr<const StageBase> &) = 0;
- virtual void on_build_all_post() = 0;
-
- ///\}
-
- /**
- * Run the task
- */
-
- void execute();
- };
-}
-
-#endif
diff --git a/paludis/stage_options.sr b/paludis/stage_options.sr
deleted file mode 100644
index 22d0f75..0000000
--- a/paludis/stage_options.sr
+++ /dev/null
@@ -1,21 +0,0 @@
-#!/usr/bin/env bash
-# vim: set sw=4 sts=4 et :
-
-make_class_StageOptions()
-{
- visible
-
- key pretend bool
- key fetch_only bool
- key always_rebuild bool
-
- doxygen_comment << "END"
- /**
- * Represents the options passed to a descendant of StageBase on execution.
- *
- * \see StageBase
- * \ingroup g_tasks
- * \nosubgrouping
- */
-END
-}