aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2009-01-09 15:28:07 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2009-01-09 15:28:07 +0000
commit3c502ca3ff22aea056348040fe8fd47e94baf346 (patch)
tree1833c83eea5fe3da00ecfdc2d72cae42790a62ea
parent812e57e9e112dd949aadced0c2e0cdf22ad22c90 (diff)
downloadpaludis-3c502ca3ff22aea056348040fe8fd47e94baf346.tar.gz
paludis-3c502ca3ff22aea056348040fe8fd47e94baf346.tar.xz
Don't always show deprecated profile warnings.
If we're getting deprecated profiles from a master, and we're not explicitly setting profiles ourself, don't bother warning. Fixes: ticket:692
-rw-r--r--paludis/repositories/e/e_repository.cc10
-rw-r--r--paludis/repositories/e/e_repository_params.hh4
-rw-r--r--paludis/repositories/e/e_repository_profile.cc15
-rw-r--r--paludis/repositories/e/e_repository_profile.hh5
4 files changed, 22 insertions, 12 deletions
diff --git a/paludis/repositories/e/e_repository.cc b/paludis/repositories/e/e_repository.cc
index 7941b64..79f7d0d 100644
--- a/paludis/repositories/e/e_repository.cc
+++ b/paludis/repositories/e/e_repository.cc
@@ -340,7 +340,8 @@ namespace paludis
profile_ptr.reset(new ERepositoryProfile(
params.environment(), repo, repo->name(), *params.profiles(),
EAPIData::get_instance()->eapi_from_string(
- params.eapi_when_unknown())->supported()->ebuild_environment_variables()->env_arch()));
+ params.eapi_when_unknown())->supported()->ebuild_environment_variables()->env_arch(),
+ params.profiles_explicitly_set()));
}
void
@@ -384,7 +385,8 @@ namespace paludis
value_for<n::profile>(std::tr1::shared_ptr<ERepositoryProfile>(new ERepositoryProfile(
params.environment(), repo, repo->name(), profiles,
EAPIData::get_instance()->eapi_from_string(
- params.eapi_when_unknown())->supported()->ebuild_environment_variables()->env_arch()))),
+ params.eapi_when_unknown())->supported()->ebuild_environment_variables()->env_arch(),
+ true))),
value_for<n::status>(tokens.at(2))
));
}
@@ -1364,6 +1366,7 @@ ERepository::repository_factory_create(
}
std::tr1::shared_ptr<FSEntrySequence> profiles(new FSEntrySequence);
+ bool profiles_explicitly_set(false);
tokenise_whitespace(f("profiles"), create_inserter<FSEntry>(std::back_inserter(*profiles)));
if (profiles->empty())
{
@@ -1378,6 +1381,8 @@ ERepository::repository_factory_create(
throw ERepositoryConfigurationError("No profiles have been specified");
}
}
+ else
+ profiles_explicitly_set = true;
std::tr1::shared_ptr<FSEntrySequence> eclassdirs(new FSEntrySequence);
tokenise_whitespace(f("eclassdirs"), create_inserter<FSEntry>(std::back_inserter(*eclassdirs)));
@@ -1574,6 +1579,7 @@ ERepository::repository_factory_create(
value_for<n::newsdir>(FSEntry(newsdir).realpath_if_exists()),
value_for<n::profile_eapi_when_unspecified>(profile_eapi),
value_for<n::profiles>(profiles),
+ value_for<n::profiles_explicitly_set>(profiles_explicitly_set),
value_for<n::securitydir>(FSEntry(securitydir).realpath_if_exists()),
value_for<n::setsdir>(FSEntry(setsdir).realpath_if_exists()),
value_for<n::sync>(sync),
diff --git a/paludis/repositories/e/e_repository_params.hh b/paludis/repositories/e/e_repository_params.hh
index a0e19c3..2980f0a 100644
--- a/paludis/repositories/e/e_repository_params.hh
+++ b/paludis/repositories/e/e_repository_params.hh
@@ -1,7 +1,7 @@
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
/*
- * Copyright (c) 2006, 2007, 2008 Ciaran McCreesh
+ * Copyright (c) 2006, 2007, 2008, 2009 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
@@ -60,6 +60,7 @@ namespace paludis
struct newsdir;
struct profile_eapi_when_unspecified;
struct profiles;
+ struct profiles_explicitly_set;
struct securitydir;
struct setsdir;
struct sync;
@@ -96,6 +97,7 @@ namespace paludis
NamedValue<n::newsdir, FSEntry> newsdir;
NamedValue<n::profile_eapi_when_unspecified, std::string> profile_eapi_when_unspecified;
NamedValue<n::profiles, std::tr1::shared_ptr<const FSEntrySequence> > profiles;
+ NamedValue<n::profiles_explicitly_set, bool> profiles_explicitly_set;
NamedValue<n::securitydir, FSEntry> securitydir;
NamedValue<n::setsdir, FSEntry> setsdir;
NamedValue<n::sync, std::string> sync;
diff --git a/paludis/repositories/e/e_repository_profile.cc b/paludis/repositories/e/e_repository_profile.cc
index 5806a3c..9d8d39f 100644
--- a/paludis/repositories/e/e_repository_profile.cc
+++ b/paludis/repositories/e/e_repository_profile.cc
@@ -182,7 +182,7 @@ namespace paludis
Implementation(const Environment * const e, const ERepository * const p,
const RepositoryName & name, const FSEntrySequence & dirs,
- const std::string & arch_var_if_special) :
+ const std::string & arch_var_if_special, const bool profiles_explicitly_set) :
packages_file(p),
virtuals_file(p),
package_mask_file(p),
@@ -205,10 +205,11 @@ namespace paludis
{
Context subcontext("When using directory '" + stringify(*d) + "':");
- if (! p->params().ignore_deprecated_profiles())
- if ((*d / "deprecated").is_regular_file_or_symlink_to_regular_file())
- Log::get_instance()->message("e.profile.deprecated", ll_warning, lc_context) << "Profile directory '" << *d
- << "' is deprecated. See the file '" << (*d / "deprecated") << "' for details";
+ if (profiles_explicitly_set)
+ if (! p->params().ignore_deprecated_profiles())
+ if ((*d / "deprecated").is_regular_file_or_symlink_to_regular_file())
+ Log::get_instance()->message("e.profile.deprecated", ll_warning, lc_context) << "Profile directory '" << *d
+ << "' is deprecated. See the file '" << (*d / "deprecated") << "' for details";
load_profile_directory_recursively(*d);
}
@@ -730,9 +731,9 @@ Implementation<ERepositoryProfile>::handle_profile_arch_var(const std::string &
ERepositoryProfile::ERepositoryProfile(
const Environment * const env, const ERepository * const p, const RepositoryName & name,
const FSEntrySequence & location,
- const std::string & arch_var_if_special) :
+ const std::string & arch_var_if_special, const bool x) :
PrivateImplementationPattern<ERepositoryProfile>(
- new Implementation<ERepositoryProfile>(env, p, name, location, arch_var_if_special))
+ new Implementation<ERepositoryProfile>(env, p, name, location, arch_var_if_special, x))
{
}
diff --git a/paludis/repositories/e/e_repository_profile.hh b/paludis/repositories/e/e_repository_profile.hh
index c30117f..97f67c6 100644
--- a/paludis/repositories/e/e_repository_profile.hh
+++ b/paludis/repositories/e/e_repository_profile.hh
@@ -1,7 +1,7 @@
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
/*
- * Copyright (c) 2005, 2006, 2007, 2008 Ciaran McCreesh
+ * Copyright (c) 2005, 2006, 2007, 2008, 2009 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
@@ -65,7 +65,8 @@ namespace paludis
const ERepository * const,
const RepositoryName & name,
const FSEntrySequence & location,
- const std::string & arch_var_if_special);
+ const std::string & arch_var_if_special,
+ const bool profiles_explicitly_set);
~ERepositoryProfile();
///\}