aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2007-11-03 15:36:30 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2007-11-03 15:36:30 +0000
commit4edc4bb3c61d0d0666615cff512c7b7a038a8ac4 (patch)
tree5dbd3ee65b711f2e00762740d4200579dab87fd0
parentb09997f982281ee2504db20b49df6d2696ed50da (diff)
downloadpaludis-4edc4bb3c61d0d0666615cff512c7b7a038a8ac4.tar.gz
paludis-4edc4bb3c61d0d0666615cff512c7b7a038a8ac4.tar.xz
Don't show deprecated profiles notices for qualudis
-rw-r--r--doc/configuration/erepository.html.part.in4
-rw-r--r--paludis/repositories/e/e_repository.cc1
-rw-r--r--paludis/repositories/e/e_repository_params.sr1
-rw-r--r--paludis/repositories/e/e_repository_profile.cc7
-rw-r--r--paludis/repositories/e/make_ebin_repository.cc1
-rw-r--r--paludis/repositories/e/make_ebuild_repository.cc8
-rw-r--r--src/clients/qualudis/qualudis.cc22
7 files changed, 31 insertions, 13 deletions
diff --git a/doc/configuration/erepository.html.part.in b/doc/configuration/erepository.html.part.in
index f1d04f8..6c315f3 100644
--- a/doc/configuration/erepository.html.part.in
+++ b/doc/configuration/erepository.html.part.in
@@ -50,6 +50,10 @@ repositories:</p>
<dd>Boolean. If true (default), the repository name is appended to the <code>write_cache</code> directory. Optional,
for internal use.</dd>
+ <dt><code>ignore_deprecated_profiles</code></dt>
+ <dd>Boolean. If true (default is false), profiles deprecated files are ignored. Optional,
+ for internal use.</dd>
+
<dt><code>eapi_when_unknown</code></dt>
<dd>The EAPI to use when a package's EAPI is unknown (e.g. before it has been sourced to generate its metadata, if
it does not use an EAPI filename suffix). Optional, generally set by the distribution.</dd>
diff --git a/paludis/repositories/e/e_repository.cc b/paludis/repositories/e/e_repository.cc
index 4478f53..3b3f3e8 100644
--- a/paludis/repositories/e/e_repository.cc
+++ b/paludis/repositories/e/e_repository.cc
@@ -327,6 +327,7 @@ ERepository::ERepository(const ERepositoryParams & p) :
config_info->add_kv("cache", stringify(_imp->params.cache));
config_info->add_kv("write_cache", stringify(_imp->params.write_cache));
config_info->add_kv("append_repository_name_to_write_cache", stringify(_imp->params.append_repository_name_to_write_cache));
+ config_info->add_kv("ignore_deprecated_profiles", stringify(_imp->params.ignore_deprecated_profiles));
config_info->add_kv("names_cache", stringify(_imp->params.names_cache));
config_info->add_kv("distdir", stringify(_imp->params.distdir));
config_info->add_kv("eclassdirs", join(_imp->params.eclassdirs->begin(),
diff --git a/paludis/repositories/e/e_repository_params.sr b/paludis/repositories/e/e_repository_params.sr
index 57d1e84..b59ef51 100644
--- a/paludis/repositories/e/e_repository_params.sr
+++ b/paludis/repositories/e/e_repository_params.sr
@@ -29,6 +29,7 @@ make_class_ERepositoryParams()
key eapi_when_unspecified std::string
key profile_eapi std::string
key use_manifest "erepository::UseManifest"
+ key ignore_deprecated_profiles bool
doxygen_comment << "END"
/**
diff --git a/paludis/repositories/e/e_repository_profile.cc b/paludis/repositories/e/e_repository_profile.cc
index 5d684bc..3a3905c 100644
--- a/paludis/repositories/e/e_repository_profile.cc
+++ b/paludis/repositories/e/e_repository_profile.cc
@@ -189,9 +189,10 @@ namespace paludis
{
Context subcontext("When using directory '" + stringify(*d) + "':");
- if ((*d / "deprecated").is_regular_file_or_symlink_to_regular_file())
- Log::get_instance()->message(ll_warning, lc_context) << "Profile directory '" << *d
- << "' is deprecated. See the file '" << (*d / "deprecated") << "' for details";
+ if (! p->params().ignore_deprecated_profiles)
+ if ((*d / "deprecated").is_regular_file_or_symlink_to_regular_file())
+ Log::get_instance()->message(ll_warning, lc_context) << "Profile directory '" << *d
+ << "' is deprecated. See the file '" << (*d / "deprecated") << "' for details";
load_profile_directory_recursively(*d);
}
diff --git a/paludis/repositories/e/make_ebin_repository.cc b/paludis/repositories/e/make_ebin_repository.cc
index ccbf46e..cfb8717 100644
--- a/paludis/repositories/e/make_ebin_repository.cc
+++ b/paludis/repositories/e/make_ebin_repository.cc
@@ -205,6 +205,7 @@ paludis::make_ebin_repository(
.profile_eapi(profile_eapi)
.use_manifest(use_manifest)
.append_repository_name_to_write_cache(true)
+ .ignore_deprecated_profiles(false)
.builddir(builddir)));
}
diff --git a/paludis/repositories/e/make_ebuild_repository.cc b/paludis/repositories/e/make_ebuild_repository.cc
index f3db9ec..708c142 100644
--- a/paludis/repositories/e/make_ebuild_repository.cc
+++ b/paludis/repositories/e/make_ebuild_repository.cc
@@ -147,6 +147,13 @@ paludis::make_ebuild_repository(
append_repository_name_to_write_cache = destringify<bool>(m->find("append_repository_name_to_write_cache")->second);
}
+ bool ignore_deprecated_profiles(false);
+ if (m->end() != m->find("ignore_deprecated_profiles") && ! m->find("ignore_deprecated_profiles")->second.empty())
+ {
+ Context item_context("When handling ignore_deprecated_profiles key:");
+ ignore_deprecated_profiles = destringify<bool>(m->find("ignore_deprecated_profiles")->second);
+ }
+
std::string eapi_when_unknown;
if (m->end() == m->find("eapi_when_unknown") || ((eapi_when_unknown = m->find("eapi_when_unknown")->second)).empty())
eapi_when_unknown = DistributionData::get_instance()->distribution_from_string(
@@ -239,6 +246,7 @@ paludis::make_ebuild_repository(
.profile_eapi(profile_eapi)
.use_manifest(use_manifest)
.append_repository_name_to_write_cache(append_repository_name_to_write_cache)
+ .ignore_deprecated_profiles(ignore_deprecated_profiles)
.builddir(builddir)));
}
diff --git a/src/clients/qualudis/qualudis.cc b/src/clients/qualudis/qualudis.cc
index 7ea5909..d0d3fc2 100644
--- a/src/clients/qualudis/qualudis.cc
+++ b/src/clients/qualudis/qualudis.cc
@@ -81,32 +81,32 @@ namespace
void visit(const MetadataSpecTreeKey<DependencySpecTree> & k)
{
- stream << k.raw_name() << ": " << k.pretty_print_flat(formatter);
+ stream << k.raw_name() << ": " << k.pretty_print_flat(formatter) << "\n";
}
void visit(const MetadataSpecTreeKey<FetchableURISpecTree> & k)
{
- stream << k.raw_name() << ": " << k.pretty_print_flat(formatter);
+ stream << k.raw_name() << ": " << k.pretty_print_flat(formatter) << "\n";
}
void visit(const MetadataSpecTreeKey<SimpleURISpecTree> & k)
{
- stream << k.raw_name() << ": " << k.pretty_print_flat(formatter);
+ stream << k.raw_name() << ": " << k.pretty_print_flat(formatter) << "\n";
}
void visit(const MetadataSpecTreeKey<LicenseSpecTree> & k)
{
- stream << k.raw_name() << ": " << k.pretty_print_flat(formatter);
+ stream << k.raw_name() << ": " << k.pretty_print_flat(formatter) << "\n";
}
void visit(const MetadataSpecTreeKey<ProvideSpecTree> & k)
{
- stream << k.raw_name() << ": " << k.pretty_print_flat(formatter);
+ stream << k.raw_name() << ": " << k.pretty_print_flat(formatter) << "\n";
}
void visit(const MetadataSpecTreeKey<RestrictSpecTree> & k)
{
- stream << k.raw_name() << ": " << k.pretty_print_flat(formatter);
+ stream << k.raw_name() << ": " << k.pretty_print_flat(formatter) << "\n";
}
void visit(const MetadataSetKey<PackageIDSequence> & k)
@@ -139,9 +139,9 @@ namespace
{
if (k.value())
stream << k.raw_name() << ": " << k.value()->mask_file << ": "
- << join(k.value()->comment->begin(), k.value()->comment->end(), " ");
+ << join(k.value()->comment->begin(), k.value()->comment->end(), " ") << "\n";
else
- stream << k.raw_name();
+ stream << k.raw_name() << "\n";
}
void visit(const MetadataContentsKey &)
@@ -221,7 +221,7 @@ namespace
{
MetadataKeyPrettyPrinter pp;
(*i)->accept(pp);
- std::cout << " " << pp.stream.str() << std::endl;
+ std::cout << " " << pp.stream.str();
}
}
}
@@ -269,6 +269,8 @@ int main(int argc, char *argv[])
if (! QualudisCommandLine::get_instance()->a_master_repository_dir.specified())
QualudisCommandLine::get_instance()->a_master_repository_dir.set_argument("/var/empty");
+ tr1::shared_ptr<Map<std::string, std::string> > extra(new Map<std::string, std::string>);
+ extra->insert("ignore_deprecated_profiles", "true");
tr1::shared_ptr<NoConfigEnvironment> env(new NoConfigEnvironment(no_config_environment::Params::create()
.repository_dir(FSEntry::cwd())
.write_cache(QualudisCommandLine::get_instance()->a_write_cache_dir.argument())
@@ -276,7 +278,7 @@ int main(int argc, char *argv[])
.repository_type(no_config_environment::ncer_ebuild)
.master_repository_dir(QualudisCommandLine::get_instance()->a_master_repository_dir.argument())
.disable_metadata_cache(! QualudisCommandLine::get_instance()->a_use_repository_cache.specified())
- .extra_params(tr1::shared_ptr<Map<std::string, std::string> >())
+ .extra_params(extra)
));
if (! env->main_repository()->qa_interface)