diff options
author | 2014-09-17 20:09:50 +0100 | |
---|---|---|
committer | 2014-09-17 20:09:50 +0100 | |
commit | e50565b501d2e1484a92b62c41ae9628d6a51b53 (patch) | |
tree | 502e7ae3f2c1291600f6175ffc747fbe3f61d7f8 /paludis/environments/paludis | |
parent | 484fd93ff91f84c5e89cd4ef69ccf9a4fa15aee6 (diff) | |
download | paludis-e50565b501d2e1484a92b62c41ae9628d6a51b53.tar.gz paludis-e50565b501d2e1484a92b62c41ae9628d6a51b53.tar.xz |
Remove 'breaks Portage' code
Diffstat (limited to 'paludis/environments/paludis')
-rw-r--r-- | paludis/environments/paludis/paludis_config.cc | 34 | ||||
-rw-r--r-- | paludis/environments/paludis/paludis_config.hh | 12 | ||||
-rw-r--r-- | paludis/environments/paludis/paludis_environment.cc | 22 | ||||
-rw-r--r-- | paludis/environments/paludis/paludis_environment.hh | 5 |
4 files changed, 4 insertions, 69 deletions
diff --git a/paludis/environments/paludis/paludis_config.cc b/paludis/environments/paludis/paludis_config.cc index 5f7b777bd..0af9c81a3 100644 --- a/paludis/environments/paludis/paludis_config.cc +++ b/paludis/environments/paludis/paludis_config.cc @@ -1,7 +1,7 @@ /* vim: set sw=4 sts=4 et foldmethod=syntax : */ /* - * Copyright (c) 2006, 2007, 2008, 2009, 2010, 2011, 2013 Ciaran McCreesh + * Copyright (c) 2006, 2007, 2008, 2009, 2010, 2011, 2013, 2014 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 @@ -194,8 +194,6 @@ namespace paludis mutable std::mutex general_conf_mutex; mutable bool has_general_conf; - mutable bool accept_all_breaks_portage; - mutable Set<std::string> accept_breaks_portage; mutable std::string reduced_username; std::shared_ptr<Map<std::string, std::string> > commandline_environment; @@ -219,7 +217,6 @@ namespace paludis output_conf(std::make_shared<OutputConf>(e)), suggestions_conf(std::make_shared<SuggestionsConf>(e)), has_general_conf(false), - accept_all_breaks_portage(false), reduced_username(getenv_with_default(env_vars::reduced_username, "paludisbuild")), commandline_environment(std::make_shared<Map<std::string, std::string>>()) { @@ -240,7 +237,6 @@ namespace paludis commandline_environment->insert("root", root); commandline_environment->insert("ROOT", root); - commandline_environment->insert("accept_breaks_portage", "*"); const KeyValueConfigFile::DefaultFunction def_predefined = std::bind( @@ -344,18 +340,6 @@ namespace paludis if (! kv->get("reduced_username").empty()) reduced_username = kv->get("reduced_username"); - std::list<std::string> breakages; - tokenise_whitespace(kv->get("accept_breaks_portage"), std::back_inserter(breakages)); - for (std::list<std::string>::const_iterator it(breakages.begin()), - it_end(breakages.end()); it_end != it; ++it) - if ("*" == *it) - { - accept_all_breaks_portage = true; - break; - } - else - accept_breaks_portage.insert(*it); - distribution = kv->get("distribution"); if (! kv->get("world").empty()) @@ -1062,22 +1046,6 @@ PaludisConfig::reduced_username() const return _imp->reduced_username; } -bool -PaludisConfig::accept_all_breaks_portage() const -{ - _imp->need_general_conf(); - - return _imp->accept_all_breaks_portage; -} - -const Set<std::string> & -PaludisConfig::accept_breaks_portage() const -{ - _imp->need_general_conf(); - - return _imp->accept_breaks_portage; -} - std::shared_ptr<const KeywordsConf> PaludisConfig::keywords_conf() const { diff --git a/paludis/environments/paludis/paludis_config.hh b/paludis/environments/paludis/paludis_config.hh index 815107f20..539ab8830 100644 --- a/paludis/environments/paludis/paludis_config.hh +++ b/paludis/environments/paludis/paludis_config.hh @@ -1,7 +1,7 @@ /* vim: set sw=4 sts=4 et foldmethod=syntax : */ /* - * Copyright (c) 2006, 2007, 2008, 2009, 2010, 2011 Ciaran McCreesh + * Copyright (c) 2006, 2007, 2008, 2009, 2010, 2011, 2014 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 @@ -156,16 +156,6 @@ namespace paludis */ std::string system_root() const; - /** - * Whether it's ok to unmask things that break Portage, regardless of the reason. - */ - bool accept_all_breaks_portage() const; - - /** - * Specific reasons why a package might break Portage that it's ok to ignore. - */ - const Set<std::string> & accept_breaks_portage() const; - ///\name Userpriv ///\{ diff --git a/paludis/environments/paludis/paludis_environment.cc b/paludis/environments/paludis/paludis_environment.cc index c92972f15..4bc180843 100644 --- a/paludis/environments/paludis/paludis_environment.cc +++ b/paludis/environments/paludis/paludis_environment.cc @@ -1,7 +1,7 @@ /* vim: set sw=4 sts=4 et foldmethod=syntax : */ /* - * Copyright (c) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2013 Ciaran McCreesh + * Copyright (c) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2013, 2014 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 @@ -383,26 +383,6 @@ namespace } const std::shared_ptr<const Mask> -PaludisEnvironment::mask_for_breakage(const std::shared_ptr<const PackageID> & id) const -{ - if (! _imp->config->accept_all_breaks_portage()) - { - std::shared_ptr<const Set<std::string> > breakages(id->breaks_portage()); - if (breakages) - { - std::list<std::string> bad_breakages; - std::set_difference(breakages->begin(), breakages->end(), - _imp->config->accept_breaks_portage().begin(), _imp->config->accept_breaks_portage().end(), - std::back_inserter(bad_breakages)); - if (! bad_breakages.empty()) - return std::make_shared<BreaksPortageMask>(join(breakages->begin(), breakages->end(), " ")); - } - } - - return std::shared_ptr<const Mask>(); -} - -const std::shared_ptr<const Mask> PaludisEnvironment::mask_for_user(const std::shared_ptr<const PackageID> & d, const bool o) const { if (_imp->config->package_mask_conf()->query(d, "")) diff --git a/paludis/environments/paludis/paludis_environment.hh b/paludis/environments/paludis/paludis_environment.hh index 553ff238a..080bf0de7 100644 --- a/paludis/environments/paludis/paludis_environment.hh +++ b/paludis/environments/paludis/paludis_environment.hh @@ -1,7 +1,7 @@ /* vim: set sw=4 sts=4 et foldmethod=syntax : */ /* - * Copyright (c) 2005, 2006, 2007, 2008, 2009, 2010, 2011 Ciaran McCreesh + * Copyright (c) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2014 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 @@ -108,9 +108,6 @@ namespace paludis virtual bool accept_license(const std::string &, const std::shared_ptr<const PackageID> &) const PALUDIS_ATTRIBUTE((warn_unused_result)); - virtual const std::shared_ptr<const Mask> mask_for_breakage(const std::shared_ptr<const PackageID> &) const - PALUDIS_ATTRIBUTE((warn_unused_result)); - virtual const std::shared_ptr<const Mask> mask_for_user(const std::shared_ptr<const PackageID> &, const bool) const PALUDIS_ATTRIBUTE((warn_unused_result)); |