aboutsummaryrefslogtreecommitdiff
path: root/paludis/environments
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2014-09-17 20:09:50 +0100
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2014-09-17 20:09:50 +0100
commite50565b501d2e1484a92b62c41ae9628d6a51b53 (patch)
tree502e7ae3f2c1291600f6175ffc747fbe3f61d7f8 /paludis/environments
parent484fd93ff91f84c5e89cd4ef69ccf9a4fa15aee6 (diff)
downloadpaludis-e50565b501d2e1484a92b62c41ae9628d6a51b53.tar.gz
paludis-e50565b501d2e1484a92b62c41ae9628d6a51b53.tar.xz
Remove 'breaks Portage' code
Diffstat (limited to 'paludis/environments')
-rw-r--r--paludis/environments/paludis/paludis_config.cc34
-rw-r--r--paludis/environments/paludis/paludis_config.hh12
-rw-r--r--paludis/environments/paludis/paludis_environment.cc22
-rw-r--r--paludis/environments/paludis/paludis_environment.hh5
-rw-r--r--paludis/environments/portage/portage_environment.cc38
-rw-r--r--paludis/environments/portage/portage_environment.hh5
-rw-r--r--paludis/environments/test/test_environment.cc8
-rw-r--r--paludis/environments/test/test_environment.hh5
8 files changed, 8 insertions, 121 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));
diff --git a/paludis/environments/portage/portage_environment.cc b/paludis/environments/portage/portage_environment.cc
index 71fc907c7..6239dd088 100644
--- a/paludis/environments/portage/portage_environment.cc
+++ b/paludis/environments/portage/portage_environment.cc
@@ -1,7 +1,7 @@
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
/*
- * Copyright (c) 2007, 2008, 2009, 2010, 2011, 2013 Ciaran McCreesh
+ * Copyright (c) 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
@@ -104,9 +104,6 @@ namespace paludis
PackageMask package_mask;
PackageUnmask package_unmask;
- std::set<std::string> ignore_breaks_portage;
- bool ignore_all_breaks_portage;
-
mutable std::mutex reduced_mutex;
bool userpriv_enabled;
mutable std::shared_ptr<uid_t> reduced_uid;
@@ -130,7 +127,6 @@ namespace paludis
Imp(const std::string & s) :
conf_dir(FSPath(s.empty() ? "/" : s) / SYSCONFDIR),
- ignore_all_breaks_portage(false),
done_hooks(false),
overlay_importance(10),
world_file(s + "/var/lib/portage/world"),
@@ -365,18 +361,6 @@ PortageEnvironment::PortageEnvironment(const std::string & s) :
}
}
- std::list<std::string> ignore_breaks_portage;
- tokenise_whitespace(_imp->vars->get("PALUDIS_IGNORE_BREAKS_PORTAGE"), std::back_inserter(ignore_breaks_portage));
- for (std::list<std::string>::const_iterator it(ignore_breaks_portage.begin()),
- it_end(ignore_breaks_portage.end()); it_end != it; ++it)
- if ("*" == *it)
- {
- _imp->ignore_all_breaks_portage = true;
- break;
- }
- else
- _imp->ignore_breaks_portage.insert(*it);
-
add_metadata_key(_imp->format_key);
add_metadata_key(_imp->config_location_key);
add_metadata_key(_imp->world_file_key);
@@ -811,26 +795,6 @@ namespace
}
const std::shared_ptr<const Mask>
-PortageEnvironment::mask_for_breakage(const std::shared_ptr<const PackageID> & id) const
-{
- if (! _imp->ignore_all_breaks_portage)
- {
- std::shared_ptr<const Set<std::string> > breakages(id->breaks_portage());
- if (breakages)
- {
- std::set<std::string> bad_breakages;
- std::set_difference(breakages->begin(), breakages->end(),
- _imp->ignore_breaks_portage.begin(), _imp->ignore_breaks_portage.end(),
- std::inserter(bad_breakages, bad_breakages.end()));
- 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>
PortageEnvironment::mask_for_user(const std::shared_ptr<const PackageID> & d, const bool o) const
{
for (PackageMask::const_iterator i(_imp->package_mask.begin()), i_end(_imp->package_mask.end()) ;
diff --git a/paludis/environments/portage/portage_environment.hh b/paludis/environments/portage/portage_environment.hh
index 11e2e6295..7030dab23 100644
--- a/paludis/environments/portage/portage_environment.hh
+++ b/paludis/environments/portage/portage_environment.hh
@@ -1,7 +1,7 @@
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
/*
- * Copyright (c) 2007, 2008, 2009, 2010, 2011 Ciaran McCreesh
+ * Copyright (c) 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
@@ -136,9 +136,6 @@ namespace paludis
virtual bool accept_keywords(const std::shared_ptr<const KeywordNameSet> &, 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));
diff --git a/paludis/environments/test/test_environment.cc b/paludis/environments/test/test_environment.cc
index 06578bfe6..2e8b77cb4 100644
--- a/paludis/environments/test/test_environment.cc
+++ b/paludis/environments/test/test_environment.cc
@@ -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
@@ -158,12 +158,6 @@ TestEnvironment::hook_dirs() const
}
const std::shared_ptr<const Mask>
-TestEnvironment::mask_for_breakage(const std::shared_ptr<const PackageID> &) const
-{
- return std::shared_ptr<const Mask>();
-}
-
-const std::shared_ptr<const Mask>
TestEnvironment::mask_for_user(const std::shared_ptr<const PackageID> &, const bool) const
{
return std::shared_ptr<const Mask>();
diff --git a/paludis/environments/test/test_environment.hh b/paludis/environments/test/test_environment.hh
index e202d8f2d..b7788724f 100644
--- a/paludis/environments/test/test_environment.hh
+++ b/paludis/environments/test/test_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
@@ -68,9 +68,6 @@ namespace paludis
virtual bool accept_keywords(const std::shared_ptr<const KeywordNameSet> &, 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));