diff options
author | 2011-02-06 15:17:14 +0000 | |
---|---|---|
committer | 2011-02-06 15:17:14 +0000 | |
commit | 7c929c87597f4e6fcfe8638e03e7b60c22090415 (patch) | |
tree | 625ad4cc2261b7f76d098022db32499845c3fc3e /paludis | |
parent | 05b3a52ec5ab06937bc9038c370db9b347dbe9af (diff) | |
download | paludis-7c929c87597f4e6fcfe8638e03e7b60c22090415.tar.gz paludis-7c929c87597f4e6fcfe8638e03e7b60c22090415.tar.xz |
Dep tags are no longer needed
Diffstat (limited to 'paludis')
-rw-r--r-- | paludis/dep_spec.cc | 22 | ||||
-rw-r--r-- | paludis/dep_spec.hh | 12 | ||||
-rw-r--r-- | paludis/dep_tag-fwd.hh | 54 | ||||
-rw-r--r-- | paludis/dep_tag.cc | 362 | ||||
-rw-r--r-- | paludis/dep_tag.hh | 365 | ||||
-rw-r--r-- | paludis/environments/paludis/paludis_environment.cc | 4 | ||||
-rw-r--r-- | paludis/environments/paludis/world.cc | 6 | ||||
-rw-r--r-- | paludis/environments/portage/portage_environment.cc | 5 | ||||
-rw-r--r-- | paludis/files.m4 | 1 | ||||
-rw-r--r-- | paludis/package_dep_spec_properties.cc | 3 | ||||
-rw-r--r-- | paludis/repositories/accounts/accounts_repository.cc | 1 | ||||
-rw-r--r-- | paludis/repositories/cran/cran_installed_repository.cc | 1 | ||||
-rw-r--r-- | paludis/repositories/e/e_installed_repository.cc | 1 | ||||
-rw-r--r-- | paludis/repositories/e/e_repository_sets.cc | 12 | ||||
-rw-r--r-- | paludis/repositories/e/exheres_profile.cc | 8 | ||||
-rw-r--r-- | paludis/repositories/e/traditional_profile.cc | 4 | ||||
-rw-r--r-- | paludis/repositories/e/vdb_repository.cc | 1 | ||||
-rw-r--r-- | paludis/repositories/unpackaged/installed_repository.cc | 1 | ||||
-rw-r--r-- | paludis/set_file.cc | 10 | ||||
-rw-r--r-- | paludis/set_file.hh | 2 | ||||
-rw-r--r-- | paludis/set_file_TEST.cc | 6 |
21 files changed, 8 insertions, 873 deletions
diff --git a/paludis/dep_spec.cc b/paludis/dep_spec.cc index 5696a0ba8..f4bcf1c59 100644 --- a/paludis/dep_spec.cc +++ b/paludis/dep_spec.cc @@ -530,11 +530,9 @@ namespace paludis struct Imp<PackageDepSpec> { const std::shared_ptr<const PackageDepSpecData> data; - std::shared_ptr<const DepTag> tag; - Imp(const std::shared_ptr<const PackageDepSpecData> & d, const std::shared_ptr<const DepTag> & t) : - data(d), - tag(t) + Imp(const std::shared_ptr<const PackageDepSpecData> & d) : + data(d) { } }; @@ -543,7 +541,7 @@ namespace paludis PackageDepSpec::PackageDepSpec(const std::shared_ptr<const PackageDepSpecData> & d) : Cloneable<DepSpec>(), StringDepSpec(d->as_string()), - _imp(d, std::shared_ptr<const DepTag>()) + _imp(d) { } @@ -555,7 +553,7 @@ PackageDepSpec::PackageDepSpec(const PackageDepSpec & d) : Cloneable<DepSpec>(d), StringDepSpec(d._imp->data->as_string()), CloneUsingThis<DepSpec, PackageDepSpec>(d), - _imp(d._imp->data, d._imp->tag) + _imp(d._imp->data) { set_annotations(d.maybe_annotations()); } @@ -632,18 +630,6 @@ PackageDepSpec::additional_requirements_ptr() const return _imp->data->additional_requirements_ptr(); } -std::shared_ptr<const DepTag> -PackageDepSpec::tag() const -{ - return _imp->tag; -} - -void -PackageDepSpec::set_tag(const std::shared_ptr<const DepTag> & s) -{ - _imp->tag = s; -} - std::string PackageDepSpec::_as_string() const { diff --git a/paludis/dep_spec.hh b/paludis/dep_spec.hh index ba2388e94..3ea80302a 100644 --- a/paludis/dep_spec.hh +++ b/paludis/dep_spec.hh @@ -30,7 +30,6 @@ #include <paludis/changed_choices-fwd.hh> #include <paludis/dep_label.hh> #include <paludis/dep_spec-fwd.hh> -#include <paludis/dep_tag-fwd.hh> #include <paludis/name.hh> #include <paludis/version_operator-fwd.hh> #include <paludis/version_requirements-fwd.hh> @@ -54,7 +53,6 @@ * * - \ref example_dep_spec.cc "example_dep_spec.cc" (for specifications) * - \ref example_dep_label.cc "example_dep_label.cc" (for labels) - * - \ref example_dep_tag.cc "example_dep_tag.cc" (for tags) */ namespace paludis @@ -415,16 +413,6 @@ namespace paludis std::shared_ptr<const AdditionalPackageDepSpecRequirements> additional_requirements_ptr() const; /** - * Fetch our tag. - */ - std::shared_ptr<const DepTag> tag() const; - - /** - * Set our tag. - */ - void set_tag(const std::shared_ptr<const DepTag> & s); - - /** * Access to our data. */ std::shared_ptr<const PackageDepSpecData> data() const; diff --git a/paludis/dep_tag-fwd.hh b/paludis/dep_tag-fwd.hh deleted file mode 100644 index a505a58f1..000000000 --- a/paludis/dep_tag-fwd.hh +++ /dev/null @@ -1,54 +0,0 @@ -/* vim: set sw=4 sts=4 et foldmethod=syntax : */ - -/* - * 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 - */ - -#ifndef PALUDIS_GUARD_PALUDIS_DEP_TAG_FWD_HH -#define PALUDIS_GUARD_PALUDIS_DEP_TAG_FWD_HH 1 - -#include <paludis/util/set-fwd.hh> -#include <paludis/util/attributes.hh> - -/** \file - * Forward declarations for paludis/dep_tag.hh . - * - * \ingroup g_dep_spec - */ - -namespace paludis -{ - class DepTagCategory; - class DepTagCategoryFactory; - - class DepTag; - class GLSADepTag; - class GeneralSetDepTag; - class DependencyDepTag; - class TargetDepTag; - - class DepTagEntry; - class DepTagEntryComparator; - - /** - * Tags attached to a DepListEntry. - * - * \ingroup g_dep_spec - */ - typedef Set<DepTagEntry, DepTagEntryComparator> DepListEntryTags; -} - -#endif diff --git a/paludis/dep_tag.cc b/paludis/dep_tag.cc deleted file mode 100644 index 62525d657..000000000 --- a/paludis/dep_tag.cc +++ /dev/null @@ -1,362 +0,0 @@ -/* vim: set sw=4 sts=4 et foldmethod=syntax : */ - -/* - * Copyright (c) 2006, 2007, 2008, 2010, 2011 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/dep_tag.hh> -#include <paludis/dep_spec.hh> -#include <paludis/dep_label.hh> -#include <paludis/spec_tree.hh> -#include <paludis/util/pimp-impl.hh> -#include <paludis/util/singleton-impl.hh> -#include <paludis/util/set-impl.hh> -#include <paludis/util/mutex.hh> -#include <paludis/util/indirect_iterator-impl.hh> -#include <paludis/util/accept_visitor.hh> -#include <algorithm> -#include <sstream> - -using namespace paludis; - -namespace -{ - std::shared_ptr<DepTagCategory> - make_glsa_dep_tag() - { - return std::make_shared<DepTagCategory>( - true, - "glsa", - "Security advisories", - "Your system is potentially affected by these security issues:", - "Please read the advisories carefully and take appropriate action."); - } - - std::shared_ptr<DepTagCategory> - make_general_set_dep_tag() - { - return std::make_shared<DepTagCategory>( - true, - "general", - "General sets", - "", - ""); - } - - std::shared_ptr<DepTagCategory> - make_dependency_set_dep_tag() - { - return std::make_shared<DepTagCategory>( - false, - "dependency", - "Dependencies", - "", - ""); - } - - std::shared_ptr<DepTagCategory> - make_target_dep_tag() - { - return std::make_shared<DepTagCategory>( - false, - "target", - "Targets", - "", - ""); - } -} - -DepTagCategory::DepTagCategory( - bool vis, - const std::string & our_id, - const std::string & t, const std::string & pre, - const std::string & post) : - _visible(vis), - _id(our_id), - _title(t), - _pre_text(pre), - _post_text(post) -{ -} - -bool -DepTagCategory::visible() const -{ - return _visible; -} - -std::string -DepTagCategory::id() const -{ - return _id; -} - -std::string -DepTagCategory::title() const -{ - return _title; -} - -std::string -DepTagCategory::pre_text() const -{ - return _pre_text; -} - -std::string -DepTagCategory::post_text() const -{ - return _post_text; -} - -DepTag::DepTag() -{ -} - -DepTag::~DepTag() -{ -} - -namespace -{ - struct DepTagComparator - { - std::string value; - - void visit(const GLSADepTag & t) - { - value = t.short_text(); - } - - void visit(const GeneralSetDepTag & t) - { - value = t.short_text(); - } - - void visit(const DependencyDepTag & t) - { - value = stringify(*t.package_id()) + "," + stringify(*t.dependency()) + ","; - } - - void visit(const TargetDepTag & t) - { - value = t.short_text(); - } - }; -} - -bool -DepTag::operator== (const DepTag & other) const -{ - DepTagComparator c1, c2; - accept(c1); - other.accept(c2); - return c1.value == c2.value; -} - -bool -DepTag::operator< (const DepTag & other) const -{ - DepTagComparator c1, c2; - accept(c1); - other.accept(c2); - return c1.value < c2.value; -} - -GLSADepTag::GLSADepTag(const std::string & id, const std::string & our_glsa_title, const FSPath & our_glsa_file) : - _id(id), - _glsa_title(our_glsa_title), - _glsa_file(our_glsa_file) -{ -} - -GLSADepTag::~GLSADepTag() -{ -} - -std::string -GLSADepTag::short_text() const -{ - return "GLSA-" + _id; -} - -std::string -GLSADepTag::category() const -{ - return "glsa"; -} - -const FSPath -GLSADepTag::glsa_file() const -{ - return _glsa_file; -} - -std::string -GLSADepTag::glsa_title() const -{ - return _glsa_title; -} - -namespace paludis -{ - template <> - struct Imp<GeneralSetDepTag> - { - const SetName id; - const std::string source; - - Imp(const SetName & n, const std::string s) : - id(n), - source(s) - { - } - }; -} - -GeneralSetDepTag::GeneralSetDepTag(const SetName & id, const std::string & r) : - _imp(id, r) -{ -} - -GeneralSetDepTag::~GeneralSetDepTag() -{ -} - -std::string -GeneralSetDepTag::short_text() const -{ - return stringify(_imp->id); -} - -std::string -GeneralSetDepTag::category() const -{ - return "general"; -} - -std::string -GeneralSetDepTag::source() const -{ - return _imp->source; -} - -namespace paludis -{ - template <> - struct Imp<DependencyDepTag> - { - mutable Mutex mutex; - mutable std::string str; - - std::shared_ptr<const PackageID> id; - const std::shared_ptr<PackageDepSpec> spec; - - Imp(const std::shared_ptr<const PackageID> & i, const PackageDepSpec & d) : - id(i), - spec(std::static_pointer_cast<PackageDepSpec>(d.clone())) - { - spec->set_tag(std::shared_ptr<const DepTag>()); - } - }; -} - -DependencyDepTag::DependencyDepTag(const std::shared_ptr<const PackageID> & i, const PackageDepSpec & d) : - _imp(i, d) -{ -} - -DependencyDepTag::~DependencyDepTag() -{ -} - -std::string -DependencyDepTag::short_text() const -{ - return stringify(*_imp->id); -} - -std::string -DependencyDepTag::category() const -{ - return "dependency"; -} - -const std::shared_ptr<const PackageID> -DependencyDepTag::package_id() const -{ - return _imp->id; -} - -const std::shared_ptr<const PackageDepSpec> -DependencyDepTag::dependency() const -{ - return _imp->spec; -} - -TargetDepTag::TargetDepTag() -{ -} - -TargetDepTag::~TargetDepTag() -{ -} - -std::string -TargetDepTag::short_text() const -{ - return "target"; -} - -std::string -TargetDepTag::category() const -{ - return "target"; -} - -DepTagCategoryFactory::DepTagCategoryFactory() -{ -} - -const std::shared_ptr<DepTagCategory> -DepTagCategoryFactory::create(const std::string & s) const -{ - if (s == "glsa") - return make_glsa_dep_tag(); - if (s == "general") - return make_general_set_dep_tag(); - if (s == "dependency") - return make_dependency_set_dep_tag(); - if (s == "target") - return make_target_dep_tag(); - throw ConfigurationError("No dep tag category named '" + s + "'"); -} - -bool -DepTagEntryComparator::operator() (const DepTagEntry & l, const DepTagEntry & r) const -{ - return *l.tag() < *r.tag(); -} - -template class Singleton<DepTagCategoryFactory>; - -template class Set<DepTagEntry, DepTagEntryComparator>; -template class WrappedForwardIterator<Set<DepTagEntry, DepTagEntryComparator>::ConstIteratorTag, const DepTagEntry>; -template class WrappedOutputIterator<Set<DepTagEntry, DepTagEntryComparator>::InserterTag, DepTagEntry>; - -template class Pimp<GeneralSetDepTag>; -template class Pimp<DependencyDepTag>; - diff --git a/paludis/dep_tag.hh b/paludis/dep_tag.hh deleted file mode 100644 index ad1513317..000000000 --- a/paludis/dep_tag.hh +++ /dev/null @@ -1,365 +0,0 @@ -/* vim: set sw=4 sts=4 et foldmethod=syntax : */ - -/* - * Copyright (c) 2006, 2007, 2008, 2010, 2011 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 - */ - -#ifndef PALUDIS_GUARD_PALUDIS_DEP_TAG_HH -#define PALUDIS_GUARD_PALUDIS_DEP_TAG_HH 1 - -/** \file - * Declarations for dependency tags. - * - * \ingroup g_dep_spec - * - * \section Examples - * - * - \ref example_dep_tag.cc "example_dep_tag.cc" (for tags) - * - \ref example_dep_spec.cc "example_dep_spec.cc" (for specifications) - * - \ref example_dep_label.cc "example_dep_label.cc" (for labels) - */ - -#include <paludis/dep_tag-fwd.hh> -#include <paludis/dep_spec-fwd.hh> -#include <paludis/name-fwd.hh> -#include <paludis/package_id-fwd.hh> -#include <paludis/spec_tree-fwd.hh> -#include <paludis/util/simple_visitor.hh> -#include <paludis/util/exception.hh> -#include <paludis/util/named_value.hh> -#include <paludis/util/fs_path.hh> -#include <paludis/util/operators.hh> -#include <paludis/util/type_list.hh> -#include <paludis/util/singleton.hh> - -#include <string> -#include <memory> - -namespace paludis -{ - namespace n - { - typedef Name<struct name_generation> generation; - typedef Name<struct name_tag> tag; - } - - /** - * A DepTagCategory is identified by its name and has associated display - * information for a DepTag's category. - * - * It is usually accessed via DepTagCategoryMaker. - * - * \see DepTagCategoryMaker - * \see DepTag - * - * \ingroup g_dep_spec - * \nosubgrouping - */ - class PALUDIS_VISIBLE DepTagCategory - { - private: - bool _visible; - const std::string _id; - const std::string _title; - const std::string _pre_text; - const std::string _post_text; - - public: - ///\name Basic operations - ///\{ - - DepTagCategory( - bool visible, - const std::string & id, - const std::string & t, - const std::string & pre, - const std::string & post); - - DepTagCategory(const DepTagCategory &) = delete; - DepTagCategory & operator= (const DepTagCategory &) = delete; - - ///\} - - /** - * Should we be displayed in a tag category summary? - */ - bool visible() const; - - /** - * Fetch our short ID (for example, 'GLSA'). - */ - std::string id() const; - - /** - * Fetch our title (for example, 'Security advisories'), or an - * empty string if we're untitled. - */ - std::string title() const; - - /** - * Fetch our pre list text, or an empty string. - */ - std::string pre_text() const; - - /** - * Fetch our post list text, or an empty string. - */ - std::string post_text() const; - }; - - /** - * Factory for accessing DepTagCategory instances. - * - * \ingroup g_dep_spec - * \since 0.30 - */ - class PALUDIS_VISIBLE DepTagCategoryFactory : - public Singleton<DepTagCategoryFactory> - { - friend class Singleton<DepTagCategoryFactory>; - - private: - DepTagCategoryFactory(); - - public: - const std::shared_ptr<DepTagCategory> create(const std::string &) const - PALUDIS_ATTRIBUTE((warn_unused_result)); - }; - - /** - * A DepTag can be associated with a PackageDepSpec, and is transferred - * onto any associated DepListEntry instances. - * - * It is used for tagging dep list entries visually, for example to - * indicate an associated GLSA. - * - * \ingroup g_dep_spec - * \nosubgrouping - */ - class PALUDIS_VISIBLE DepTag : - public relational_operators::HasRelationalOperators, - public virtual DeclareAbstractAcceptMethods<DepTag, MakeTypeList< - GLSADepTag, GeneralSetDepTag, DependencyDepTag, TargetDepTag>::Type> - { - protected: - ///\name Basic operations - ///\{ - - DepTag(); - - public: - virtual ~DepTag(); - - DepTag(const DepTag &) = delete; - DepTag & operator= (const DepTag &) = delete; - - ///\} - - /** - * Fetch our short text (for example, 'GLSA-1234') that is - * displayed with the dep list entry. - */ - virtual std::string short_text() const = 0; - - /** - * Fetch our DepTagCategory's tag. - */ - virtual std::string category() const = 0; - - ///\name Comparison operators - ///\{ - - bool operator< (const DepTag &) const; - bool operator== (const DepTag &) const; - - ///\} - }; - - /** - * DepTag subclass for GLSAs. - * - * \ingroup g_dep_spec - * \nosubgrouping - */ - class PALUDIS_VISIBLE GLSADepTag : - public DepTag, - public ImplementAcceptMethods<DepTag, GLSADepTag> - { - private: - const std::string _id; - const std::string _glsa_title; - const FSPath _glsa_file; - - public: - ///\name Basic operations - ///\{ - - GLSADepTag(const std::string & id, const std::string & glsa_title, const FSPath &); - ~GLSADepTag(); - - ///\} - - ///\name Content information - ///\{ - - virtual std::string short_text() const; - - virtual std::string category() const; - - /** - * The full path to the glsa announcement file. - */ - const FSPath glsa_file() const; - - /** - * Fetch our GLSA title (for example, 'Yet another PHP remote access - * hole'). - */ - std::string glsa_title() const; - - ///\} - }; - - /** - * DepTag subclass for general sets. - * - * \ingroup g_dep_spec - * \nosubgrouping - */ - class PALUDIS_VISIBLE GeneralSetDepTag : - public DepTag, - public ImplementAcceptMethods<DepTag, GeneralSetDepTag> - { - private: - Pimp<GeneralSetDepTag> _imp; - - public: - ///\name Basic operations - ///\{ - - GeneralSetDepTag(const SetName & id, const std::string & source); - ~GeneralSetDepTag(); - - ///\} - - virtual std::string short_text() const; - - virtual std::string category() const; - - /** - * From which repository or environment did we originate? - */ - std::string source() const; - }; - - /** - * DepTag subclass for dependencies. - * - * \ingroup g_dep_spec - * \nosubgrouping - */ - class PALUDIS_VISIBLE DependencyDepTag : - public DepTag, - public ImplementAcceptMethods<DepTag, DependencyDepTag> - { - private: - Pimp<DependencyDepTag> _imp; - - void _make_str() const; - - public: - ///\name Basic operations - ///\{ - - DependencyDepTag(const std::shared_ptr<const PackageID> &, const PackageDepSpec &); - - ~DependencyDepTag(); - - ///\} - - virtual std::string short_text() const; - - virtual std::string category() const; - - /** - * The PackageID that contains our dependency. - */ - const std::shared_ptr<const PackageID> package_id() const; - - /** - * The PackageDepSpec that pulled us in. - */ - const std::shared_ptr<const PackageDepSpec> dependency() const; - }; - - /** - * DepTag subclass for explicit targets. - * - * \ingroup g_dep_spec - * \nosubgrouping - */ - class PALUDIS_VISIBLE TargetDepTag : - public DepTag, - public ImplementAcceptMethods<DepTag, TargetDepTag> - { - public: - ///\name Basic operations - ///\{ - - TargetDepTag(); - ~TargetDepTag(); - - ///\} - - virtual std::string short_text() const; - virtual std::string category() const; - }; - - /** - * Tags associated with a DepListEntry. - * - * The generation key is used internally by DepList. Its value is of no interest - * to outside clients. - * - * \see DepListEntry - * \ingroup g_dep_list - * \nosubgrouping - */ - struct DepTagEntry - { - NamedValue<n::generation, long> generation; - NamedValue<n::tag, std::shared_ptr<const DepTag> > tag; - }; - - /** - * Compare two DepListEntry structs by tag only. - * - * \see DepTagEntry - * \ingroup g_dep_list - * \since 0.34 - */ - struct PALUDIS_VISIBLE DepTagEntryComparator - { - bool operator() (const DepTagEntry &, const DepTagEntry &) const PALUDIS_ATTRIBUTE((warn_unused_result)); - }; - - extern template class Singleton<DepTagCategoryFactory>; - extern template class Pimp<DependencyDepTag>; - extern template class Pimp<GeneralSetDepTag>; - -} - -#endif diff --git a/paludis/environments/paludis/paludis_environment.cc b/paludis/environments/paludis/paludis_environment.cc index ce30f7b33..c44499245 100644 --- a/paludis/environments/paludis/paludis_environment.cc +++ b/paludis/environments/paludis/paludis_environment.cc @@ -33,7 +33,6 @@ #include <paludis/hook.hh> #include <paludis/set_file.hh> #include <paludis/distribution.hh> -#include <paludis/dep_tag.hh> #include <paludis/package_id.hh> #include <paludis/mask.hh> #include <paludis/user_dep_spec.hh> @@ -526,15 +525,12 @@ namespace { Context context("When making set '" + stringify(f) + "':"); - const std::shared_ptr<GeneralSetDepTag> tag(std::make_shared<GeneralSetDepTag>(n, stringify(f.basename()))); - SetFile s(make_named_values<SetFileParams>( n::environment() = env, n::file_name() = f, n::parser() = std::bind(&parse_user_package_dep_spec, std::placeholders::_1, env, UserPackageDepSpecOptions() + updso_allow_wildcards, filter::All()), n::set_operator_mode() = mode, - n::tag() = tag, n::type() = type )); return s.contents(); diff --git a/paludis/environments/paludis/world.cc b/paludis/environments/paludis/world.cc index ea3b90074..b546d4f5d 100644 --- a/paludis/environments/paludis/world.cc +++ b/paludis/environments/paludis/world.cc @@ -27,7 +27,6 @@ #include <paludis/util/fs_stat.hh> #include <paludis/set_file.hh> #include <paludis/user_dep_spec.hh> -#include <paludis/dep_tag.hh> #include <paludis/partially_made_package_dep_spec.hh> #include <functional> @@ -121,7 +120,6 @@ World::_add_string_to_world(const std::string & n) const n::file_name() = *_imp->maybe_world_file, n::parser() = std::bind(&parse_user_package_dep_spec, _1, _imp->env, UserPackageDepSpecOptions() + updso_no_disambiguation + updso_throw_if_set, filter::All()), n::set_operator_mode() = sfsmo_natural, - n::tag() = std::shared_ptr<DepTag>(), n::type() = sft_simple )); bool result(world.add(n)); @@ -154,7 +152,6 @@ World::_remove_string_from_world(const std::string & n) const n::file_name() = *_imp->maybe_world_file, n::parser() = std::bind(&parse_user_package_dep_spec, _1, _imp->env, UserPackageDepSpecOptions() + updso_no_disambiguation + updso_throw_if_set, filter::All()), n::set_operator_mode() = sfsmo_natural, - n::tag() = std::shared_ptr<DepTag>(), n::type() = sft_simple )); @@ -177,8 +174,6 @@ World::world_set() const { using namespace std::placeholders; - std::shared_ptr<GeneralSetDepTag> tag(std::make_shared<GeneralSetDepTag>(SetName("world"), "Environment")); - if (_imp->maybe_world_file) { if (_imp->maybe_world_file->stat().exists()) @@ -188,7 +183,6 @@ World::world_set() const n::file_name() = *_imp->maybe_world_file, n::parser() = std::bind(&parse_user_package_dep_spec, _1, _imp->env, UserPackageDepSpecOptions() + updso_no_disambiguation + updso_throw_if_set, filter::All()), n::set_operator_mode() = sfsmo_natural, - n::tag() = tag, n::type() = sft_simple )); return world.contents(); diff --git a/paludis/environments/portage/portage_environment.cc b/paludis/environments/portage/portage_environment.cc index 9d64dbba2..adc2ffde3 100644 --- a/paludis/environments/portage/portage_environment.cc +++ b/paludis/environments/portage/portage_environment.cc @@ -51,7 +51,6 @@ #include <paludis/package_id.hh> #include <paludis/user_dep_spec.hh> #include <paludis/set_file.hh> -#include <paludis/dep_tag.hh> #include <paludis/util/mutex.hh> #include <paludis/literal_metadata_key.hh> #include <paludis/repository_factory.hh> @@ -932,7 +931,6 @@ PortageEnvironment::_add_string_to_world(const std::string & s) const n::file_name() = _imp->world_file, n::parser() = std::bind(&parse_user_package_dep_spec, _1, this, UserPackageDepSpecOptions() + updso_no_disambiguation, filter::All()), n::set_operator_mode() = sfsmo_natural, - n::tag() = std::shared_ptr<DepTag>(), n::type() = sft_simple )); bool result(world.add(s)); @@ -959,7 +957,6 @@ PortageEnvironment::_remove_string_from_world(const std::string & s) const n::parser() = std::bind(&parse_user_package_dep_spec, _1, this, UserPackageDepSpecOptions() + updso_no_disambiguation, filter::All()), n::set_operator_mode() = sfsmo_natural, - n::tag() = std::shared_ptr<DepTag>(), n::type() = sft_simple )); @@ -1027,14 +1024,12 @@ namespace return std::make_shared<SetSpecTree>(std::make_shared<AllDepSpec>()); } - const std::shared_ptr<GeneralSetDepTag> tag(std::make_shared<GeneralSetDepTag>(SetName("world::environment"), "Environment")); SetFile world(make_named_values<SetFileParams>( n::environment() = env, n::file_name() = f, n::parser() = std::bind(&parse_user_package_dep_spec, std::placeholders::_1, env, UserPackageDepSpecOptions() + updso_no_disambiguation, filter::All()), n::set_operator_mode() = sfsmo_natural, - n::tag() = tag, n::type() = sft_simple )); return world.contents(); diff --git a/paludis/files.m4 b/paludis/files.m4 index d6c897c7a..0fae3f739 100644 --- a/paludis/files.m4 +++ b/paludis/files.m4 @@ -31,7 +31,6 @@ add(`dep_spec', `hh', `cc', `test', `fwd', `s add(`dep_spec_annotations', `hh', `cc', `fwd', `se') add(`dep_spec_data', `hh', `cc', `fwd') add(`dep_spec_flattener', `hh', `cc') -add(`dep_tag', `hh', `cc', `fwd') add(`distribution', `hh', `cc', `impl', `fwd') add(`elf_linkage_checker', `hh', `cc') add(`elike_choices', `hh', `cc', `fwd', `se') diff --git a/paludis/package_dep_spec_properties.cc b/paludis/package_dep_spec_properties.cc index 667fdc27d..75a1efc96 100644 --- a/paludis/package_dep_spec_properties.cc +++ b/paludis/package_dep_spec_properties.cc @@ -1,7 +1,7 @@ /* vim: set sw=4 sts=4 et foldmethod=syntax : */ /* - * Copyright (c) 2009, 2010 Ciaran McCreesh + * Copyright (c) 2009, 2010, 2011 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 @@ -51,7 +51,6 @@ paludis::package_dep_spec_has_properties(const PackageDepSpec & spec, const Pack result = result && check(bool(spec.package_ptr()), properties.has_package()); result = result && check(bool(spec.package_name_part_ptr()), properties.has_package_name_part()); result = result && check(bool(spec.slot_requirement_ptr()), properties.has_slot_requirement()); - result = result && check(bool(spec.tag()), properties.has_tag()); result = result && check(spec.version_requirements_ptr() && ! spec.version_requirements_ptr()->empty(), properties.has_version_requirements()); return result; diff --git a/paludis/repositories/accounts/accounts_repository.cc b/paludis/repositories/accounts/accounts_repository.cc index 483c84cfb..1ca62acb4 100644 --- a/paludis/repositories/accounts/accounts_repository.cc +++ b/paludis/repositories/accounts/accounts_repository.cc @@ -30,7 +30,6 @@ #include <paludis/util/stringify.hh> #include <paludis/util/log.hh> #include <paludis/util/make_null_shared_ptr.hh> -#include <paludis/dep_tag.hh> #include <paludis/literal_metadata_key.hh> #include <paludis/action.hh> #include <paludis/package_id.hh> diff --git a/paludis/repositories/cran/cran_installed_repository.cc b/paludis/repositories/cran/cran_installed_repository.cc index 77f6459fe..02d46a2c8 100644 --- a/paludis/repositories/cran/cran_installed_repository.cc +++ b/paludis/repositories/cran/cran_installed_repository.cc @@ -21,7 +21,6 @@ #include <paludis/environment.hh> #include <paludis/util/pimp-impl.hh> #include <paludis/dep_spec.hh> -#include <paludis/dep_tag.hh> #include <paludis/util/config_file.hh> #include <paludis/set_file.hh> #include <paludis/action.hh> diff --git a/paludis/repositories/e/e_installed_repository.cc b/paludis/repositories/e/e_installed_repository.cc index fda8d2247..e437114ee 100644 --- a/paludis/repositories/e/e_installed_repository.cc +++ b/paludis/repositories/e/e_installed_repository.cc @@ -45,7 +45,6 @@ #include <paludis/environment.hh> #include <paludis/set_file.hh> #include <paludis/hook.hh> -#include <paludis/dep_tag.hh> #include <paludis/user_dep_spec.hh> #include <paludis/generator.hh> #include <paludis/filter.hh> diff --git a/paludis/repositories/e/e_repository_sets.cc b/paludis/repositories/e/e_repository_sets.cc index c2331df37..186b28b61 100644 --- a/paludis/repositories/e/e_repository_sets.cc +++ b/paludis/repositories/e/e_repository_sets.cc @@ -26,7 +26,6 @@ #include <paludis/action-fwd.hh> #include <paludis/dep_spec.hh> -#include <paludis/dep_tag.hh> #include <paludis/elike_slot_requirement.hh> #include <paludis/environment.hh> #include <paludis/filter.hh> @@ -116,8 +115,6 @@ ERepositorySets::package_set(const SetName & ss) const if ((_imp->params.setsdir() / (stringify(s.first) + ".conf")).stat().exists()) { - std::shared_ptr<GeneralSetDepTag> tag(std::make_shared<GeneralSetDepTag>(ss, stringify(_imp->e_repository->name()))); - FSPath ff(_imp->params.setsdir() / (stringify(s.first) + ".conf")); Context context("When loading package set '" + stringify(s.first) + "' from '" + stringify(ff) + "':"); @@ -126,7 +123,6 @@ ERepositorySets::package_set(const SetName & ss) const n::file_name() = ff, n::parser() = std::bind(&parse_user_package_dep_spec, _1, _imp->environment, UserPackageDepSpecOptions() + updso_no_disambiguation + updso_throw_if_set, filter::All()), n::set_operator_mode() = s.second, - n::tag() = tag, n::type() = sft_paludis_conf )); @@ -258,8 +254,6 @@ ERepositorySets::security_set(bool insecurity) const if (!_imp->params.securitydir().stat().is_directory_or_symlink_to_directory()) return security_packages; - std::map<std::string, std::shared_ptr<GLSADepTag> > glsa_tags; - for (FSIterator f(_imp->params.securitydir(), { }), f_end ; f != f_end; ++f) { if (! is_file_with_prefix_extension(*f, "glsa-", ".xml", { })) @@ -298,10 +292,6 @@ ERepositorySets::security_set(bool insecurity) const if (! is_vulnerable(*glsa_pkg, **c, ver_options, pds_options)) continue; - if (glsa_tags.end() == glsa_tags.find(glsa->id())) - glsa_tags.insert(std::make_pair(glsa->id(), std::shared_ptr<GLSADepTag>( - std::make_shared<GLSADepTag>(glsa->id(), glsa->title(), *f)))); - if (insecurity) { std::shared_ptr<PackageDepSpec> spec(std::make_shared<PackageDepSpec>( @@ -311,7 +301,6 @@ ERepositorySets::security_set(bool insecurity) const n::version_operator() = vo_equal, n::version_spec() = (*c)->version())) .in_repository((*c)->repository_name()))); - spec->set_tag(glsa_tags.find(glsa->id())->second); security_packages->top()->append(spec); } else @@ -344,7 +333,6 @@ ERepositorySets::security_set(bool insecurity) const n::version_operator() = vo_equal, n::version_spec() = (*r)->version())) .in_repository((*r)->repository_name()))); - spec->set_tag(glsa_tags.find(glsa->id())->second); security_packages->top()->append(spec); ok = true; break; diff --git a/paludis/repositories/e/exheres_profile.cc b/paludis/repositories/e/exheres_profile.cc index 166fd1633..07154dfd3 100644 --- a/paludis/repositories/e/exheres_profile.cc +++ b/paludis/repositories/e/exheres_profile.cc @@ -40,7 +40,6 @@ #include <paludis/util/fs_stat.hh> #include <paludis/choice.hh> -#include <paludis/dep_tag.hh> #include <paludis/environment.hh> #include <paludis/match_package.hh> #include <paludis/distribution.hh> @@ -93,10 +92,9 @@ namespace paludis const std::shared_ptr<Set<std::string> > use_expand_values; const std::shared_ptr<SetSpecTree> system_packages; - const std::shared_ptr<GeneralSetDepTag> system_tag; Imp(const Environment * const e, const ERepository * const p, - const RepositoryName & name, const FSPathSequence &, + const RepositoryName &, const FSPathSequence &, const std::string &, const bool) : env(e), repository(p), @@ -114,8 +112,7 @@ namespace paludis use_expand_implicit(std::make_shared<Set<std::string>>()), iuse_implicit(std::make_shared<Set<std::string>>()), use_expand_values(std::make_shared<Set<std::string>>()), - system_packages(std::make_shared<SetSpecTree>(std::make_shared<AllDepSpec>())), - system_tag(std::make_shared<GeneralSetDepTag>(SetName("system"), stringify(name))) + system_packages(std::make_shared<SetSpecTree>(std::make_shared<AllDepSpec>())) { environment_variables["CONFIG_PROTECT"] = getenv_with_default("CONFIG_PROTECT", "/etc"); environment_variables["CONFIG_PROTECT_MASK"] = getenv_with_default("CONFIG_PROTECT_MASK", ""); @@ -162,7 +159,6 @@ ExheresProfile::ExheresProfile( i->first->supported()->package_dep_spec_parse_options(), i->first->supported()->version_spec_options()))); - spec->set_tag(_imp->system_tag); _imp->system_packages->top()->append(spec); } diff --git a/paludis/repositories/e/traditional_profile.cc b/paludis/repositories/e/traditional_profile.cc index b3e51b6f7..6255b1522 100644 --- a/paludis/repositories/e/traditional_profile.cc +++ b/paludis/repositories/e/traditional_profile.cc @@ -46,7 +46,6 @@ #include <paludis/util/make_null_shared_ptr.hh> #include <paludis/choice.hh> -#include <paludis/dep_tag.hh> #include <paludis/environment.hh> #include <paludis/match_package.hh> #include <paludis/distribution.hh> @@ -151,7 +150,6 @@ namespace paludis ///\{ std::shared_ptr<SetSpecTree> system_packages; - std::shared_ptr<GeneralSetDepTag> system_tag; ///\} @@ -199,7 +197,6 @@ namespace paludis repository(p), profiles_with_parents(std::make_shared<FSPathSequence>()), system_packages(std::make_shared<SetSpecTree>(std::make_shared<AllDepSpec>())), - system_tag(std::make_shared<GeneralSetDepTag>(SetName("system"), stringify(name))), virtuals(std::make_shared<Map<QualifiedPackageName, PackageDepSpec>>()), use_expand(std::make_shared<Set<std::string>>()), use_expand_hidden(std::make_shared<Set<std::string>>()), @@ -583,7 +580,6 @@ Imp<TraditionalProfile>::make_vars_from_file_vars() i->first->supported()->package_dep_spec_parse_options(), i->first->supported()->version_spec_options()))); - spec->set_tag(system_tag); system_packages->top()->append(spec); } } diff --git a/paludis/repositories/e/vdb_repository.cc b/paludis/repositories/e/vdb_repository.cc index 08d89250d..d1cbc8862 100644 --- a/paludis/repositories/e/vdb_repository.cc +++ b/paludis/repositories/e/vdb_repository.cc @@ -35,7 +35,6 @@ #include <paludis/user_dep_spec.hh> #include <paludis/literal_metadata_key.hh> #include <paludis/dep_spec_flattener.hh> -#include <paludis/dep_tag.hh> #include <paludis/distribution.hh> #include <paludis/environment.hh> #include <paludis/hook.hh> diff --git a/paludis/repositories/unpackaged/installed_repository.cc b/paludis/repositories/unpackaged/installed_repository.cc index 557bc18f2..b69dd1ebe 100644 --- a/paludis/repositories/unpackaged/installed_repository.cc +++ b/paludis/repositories/unpackaged/installed_repository.cc @@ -38,7 +38,6 @@ #include <paludis/util/fs_stat.hh> #include <paludis/action.hh> #include <paludis/environment.hh> -#include <paludis/dep_tag.hh> #include <paludis/metadata_key.hh> #include <paludis/literal_metadata_key.hh> #include <paludis/user_dep_spec.hh> diff --git a/paludis/set_file.cc b/paludis/set_file.cc index 93397fda8..da71adfe3 100644 --- a/paludis/set_file.cc +++ b/paludis/set_file.cc @@ -222,8 +222,6 @@ namespace else { std::shared_ptr<PackageDepSpec> spec(std::make_shared<PackageDepSpec>(params.parser()(tokens.at(1)))); - if (params.tag()) - spec->set_tag(params.tag()); result->top()->append(spec); } } @@ -237,9 +235,6 @@ namespace } std::shared_ptr<PackageDepSpec> spec(std::make_shared<PackageDepSpec>(params.parser()(tokens.at(1)))); - if (params.tag()) - spec->set_tag(params.tag()); - if (spec->package_ptr()) { if (! params.environment()) @@ -264,9 +259,6 @@ namespace } std::shared_ptr<PackageDepSpec> spec(std::make_shared<PackageDepSpec>(params.parser()(tokens.at(1)))); - if (params.tag()) - spec->set_tag(params.tag()); - if (spec->package_ptr()) { if (! params.environment()) @@ -346,8 +338,6 @@ SimpleHandler::_create_contents() const else { std::shared_ptr<PackageDepSpec> p(std::make_shared<PackageDepSpec>(_p.parser()(stringify(*i)))); - if (_p.tag()) - p->set_tag(_p.tag()); _contents->top()->append(p); } } diff --git a/paludis/set_file.hh b/paludis/set_file.hh index 4bc4354b0..e3a853c6b 100644 --- a/paludis/set_file.hh +++ b/paludis/set_file.hh @@ -28,7 +28,6 @@ #include <paludis/name.hh> #include <paludis/spec_tree.hh> #include <paludis/dep_spec-fwd.hh> -#include <paludis/dep_tag-fwd.hh> #include <functional> #include <iosfwd> @@ -72,7 +71,6 @@ namespace paludis NamedValue<n::file_name, FSPath> file_name; NamedValue<n::parser, std::function<PackageDepSpec (const std::string &)> > parser; NamedValue<n::set_operator_mode, SetFileSetOperatorMode> set_operator_mode; - NamedValue<n::tag, std::shared_ptr<const DepTag> > tag; NamedValue<n::type, SetFileType> type; }; diff --git a/paludis/set_file_TEST.cc b/paludis/set_file_TEST.cc index 9879355bd..83b485669 100644 --- a/paludis/set_file_TEST.cc +++ b/paludis/set_file_TEST.cc @@ -1,7 +1,7 @@ /* vim: set sw=4 sts=4 et foldmethod=syntax : */ /* - * Copyright (c) 2007, 2008, 2009, 2010 Ciaran McCreesh + * Copyright (c) 2007, 2008, 2009, 2010, 2011 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 @@ -76,7 +76,6 @@ namespace test_cases n::file_name() = FSPath("set_file_TEST_dir/simple1"), n::parser() = std::bind(&parse_user_package_dep_spec, _1, &env, UserPackageDepSpecOptions(), filter::All()), n::set_operator_mode() = sfsmo_natural, - n::tag() = std::shared_ptr<DepTag>(), n::type() = sft_simple )); @@ -143,7 +142,6 @@ namespace test_cases n::file_name() = FSPath("set_file_TEST_dir/paludisconf1"), n::parser() = std::bind(&parse_user_package_dep_spec, _1, &env, UserPackageDepSpecOptions(), filter::All()), n::set_operator_mode() = sfsmo_natural, - n::tag() = std::shared_ptr<DepTag>(), n::type() = sft_paludis_conf )); @@ -213,7 +211,6 @@ namespace test_cases n::file_name() = FSPath("set_file_TEST_dir/override"), n::parser() = std::bind(&parse_user_package_dep_spec, _1, &env, UserPackageDepSpecOptions(), filter::All()), n::set_operator_mode() = sfsmo_natural, - n::tag() = std::shared_ptr<DepTag>(), n::type() = sft_paludis_conf )); @@ -228,7 +225,6 @@ namespace test_cases n::file_name() = FSPath("set_file_TEST_dir/override"), n::parser() = std::bind(&parse_user_package_dep_spec, _1, &env, UserPackageDepSpecOptions(), filter::All()), n::set_operator_mode() = sfsmo_star, - n::tag() = std::shared_ptr<DepTag>(), n::type() = sft_paludis_conf )); |