aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2006-10-21 20:54:07 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2006-10-21 20:54:07 +0000
commit5e91f5f0a024b7965adc89e7e47e84373046d40d (patch)
treefe4172a88ab182942c86c2b11773c449c131f68a
parent1d96c0791adb4da9158eaa793396e0d5dd9e6fdb (diff)
downloadpaludis-5e91f5f0a024b7965adc89e7e47e84373046d40d.tar.gz
paludis-5e91f5f0a024b7965adc89e7e47e84373046d40d.tar.xz
Add more information to general set tags
-rw-r--r--paludis/dep_tag.cc11
-rw-r--r--paludis/dep_tag.hh5
-rw-r--r--paludis/environment/default/default_environment.cc2
-rw-r--r--paludis/repositories/portage/portage_repository.cc9
-rw-r--r--paludis/repositories/portage/portage_repository_profile.cc9
-rw-r--r--paludis/repositories/portage/portage_repository_profile.hh4
-rw-r--r--paludis/repositories/portage/portage_repository_sets.cc2
-rw-r--r--paludis/repositories/vdb/vdb_repository.cc4
8 files changed, 31 insertions, 15 deletions
diff --git a/paludis/dep_tag.cc b/paludis/dep_tag.cc
index caf2418..58f2e48 100644
--- a/paludis/dep_tag.cc
+++ b/paludis/dep_tag.cc
@@ -163,8 +163,9 @@ GLSADepTag::glsa_title() const
return _glsa_title;
}
-GeneralSetDepTag::GeneralSetDepTag(const std::string & id) :
- _id(id)
+GeneralSetDepTag::GeneralSetDepTag(const std::string & id, const std::string & r) :
+ _id(id),
+ _source(r)
{
}
@@ -180,6 +181,12 @@ GeneralSetDepTag::category() const
return "general";
}
+std::string
+GeneralSetDepTag::source() const
+{
+ return _source;
+}
+
DependencyDepTag::DependencyDepTag(const PackageDatabaseEntry & pde) :
_dbe(pde)
{
diff --git a/paludis/dep_tag.hh b/paludis/dep_tag.hh
index 7edce7d..22803d3 100644
--- a/paludis/dep_tag.hh
+++ b/paludis/dep_tag.hh
@@ -235,16 +235,19 @@ namespace paludis
{
private:
const std::string _id;
+ const std::string _source;
public:
/**
* Constructor.
*/
- GeneralSetDepTag(const std::string & id);
+ GeneralSetDepTag(const std::string & id, const std::string & source);
virtual std::string short_text() const;
virtual std::string category() const;
+
+ std::string source() const;
};
/**
diff --git a/paludis/environment/default/default_environment.cc b/paludis/environment/default/default_environment.cc
index a0a1f01..7733b9e 100644
--- a/paludis/environment/default/default_environment.cc
+++ b/paludis/environment/default/default_environment.cc
@@ -442,7 +442,7 @@ DefaultEnvironment::local_package_set(const std::string & s) const
{
LineConfigFile f(ff);
AllDepAtom::Pointer result(new AllDepAtom);
- GeneralSetDepTag::Pointer tag(new GeneralSetDepTag(s));
+ GeneralSetDepTag::Pointer tag(new GeneralSetDepTag(s, s + ".conf"));
for (LineConfigFile::Iterator line(f.begin()), line_end(f.end()) ;
line != line_end ; ++line)
diff --git a/paludis/repositories/portage/portage_repository.cc b/paludis/repositories/portage/portage_repository.cc
index 127ce7e..e30b603 100644
--- a/paludis/repositories/portage/portage_repository.cc
+++ b/paludis/repositories/portage/portage_repository.cc
@@ -172,9 +172,11 @@ namespace paludis
/// Have we loaded our virtuals?
bool has_our_virtuals;
+
+ PortageRepository * const repo;
};
- Implementation<PortageRepository>::Implementation(PortageRepository * const repo,
+ Implementation<PortageRepository>::Implementation(PortageRepository * const r,
const PortageRepositoryParams & p) :
params(p),
has_category_names(false),
@@ -187,7 +189,8 @@ namespace paludis
sets_ptr(new PortageRepositorySets(params.environment, repo, p)),
entries_ptr(PortageRepositoryEntriesMaker::get_instance()->find_maker(
params.entry_format)(params.environment, repo, p)),
- has_our_virtuals(false)
+ has_our_virtuals(false),
+ repo(r)
{
}
@@ -202,7 +205,7 @@ namespace paludis
return;
profile_ptr.assign(new PortageRepositoryProfile(
- params.environment, *params.profiles));
+ params.environment, repo->name(), *params.profiles));
}
void
diff --git a/paludis/repositories/portage/portage_repository_profile.cc b/paludis/repositories/portage/portage_repository_profile.cc
index 987973f..73250b0 100644
--- a/paludis/repositories/portage/portage_repository_profile.cc
+++ b/paludis/repositories/portage/portage_repository_profile.cc
@@ -145,10 +145,11 @@ namespace paludis
///\name Basic operations
///\{
- Implementation(const Environment * const e, const FSEntryCollection & dirs) :
+ Implementation(const Environment * const e, const RepositoryName & name,
+ const FSEntryCollection & dirs) :
env(e),
system_packages(new AllDepAtom),
- system_tag(new GeneralSetDepTag("system"))
+ system_tag(new GeneralSetDepTag("system", stringify(name)))
{
for (FSEntryCollection::Iterator d(dirs.begin()), d_end(dirs.end()) ;
d != d_end ; ++d)
@@ -571,9 +572,9 @@ Implementation<PortageRepositoryProfile>::handle_profile_arch_var()
}
PortageRepositoryProfile::PortageRepositoryProfile(
- const Environment * const env, const FSEntryCollection & location) :
+ const Environment * const env, const RepositoryName & name, const FSEntryCollection & location) :
PrivateImplementationPattern<PortageRepositoryProfile>(
- new Implementation<PortageRepositoryProfile>(env, location))
+ new Implementation<PortageRepositoryProfile>(env, name, location))
{
}
diff --git a/paludis/repositories/portage/portage_repository_profile.hh b/paludis/repositories/portage/portage_repository_profile.hh
index c1520dd..a13e1ce 100644
--- a/paludis/repositories/portage/portage_repository_profile.hh
+++ b/paludis/repositories/portage/portage_repository_profile.hh
@@ -54,7 +54,9 @@ namespace paludis
///\name Basic operations
///\{
- PortageRepositoryProfile(const Environment * const env, const FSEntryCollection & location);
+ PortageRepositoryProfile(const Environment * const env,
+ const RepositoryName & name,
+ const FSEntryCollection & location);
~PortageRepositoryProfile();
///\}
diff --git a/paludis/repositories/portage/portage_repository_sets.cc b/paludis/repositories/portage/portage_repository_sets.cc
index 9126263..5b9615a 100644
--- a/paludis/repositories/portage/portage_repository_sets.cc
+++ b/paludis/repositories/portage/portage_repository_sets.cc
@@ -87,7 +87,7 @@ PortageRepositorySets::package_set(const std::string & s) const
return security_set(true);
else if ((_imp->params.setsdir / (s + ".conf")).exists())
{
- GeneralSetDepTag::Pointer tag(new GeneralSetDepTag(s));
+ GeneralSetDepTag::Pointer tag(new GeneralSetDepTag(s, stringify(_imp->portage_repository->name())));
FSEntry ff(_imp->params.setsdir / (s + ".conf"));
Context context("When loading package set '" + s + "' from '" + stringify(ff) + "':");
diff --git a/paludis/repositories/vdb/vdb_repository.cc b/paludis/repositories/vdb/vdb_repository.cc
index 3be3273..86b3459 100644
--- a/paludis/repositories/vdb/vdb_repository.cc
+++ b/paludis/repositories/vdb/vdb_repository.cc
@@ -832,7 +832,7 @@ VDBRepository::do_package_set(const std::string & s) const
if ("everything" == s)
{
AllDepAtom::Pointer result(new AllDepAtom);
- GeneralSetDepTag::Pointer tag(new GeneralSetDepTag("everything"));
+ GeneralSetDepTag::Pointer tag(new GeneralSetDepTag("everything", stringify(name())));
if (! _imp->entries_valid)
_imp->load_entries();
@@ -850,7 +850,7 @@ VDBRepository::do_package_set(const std::string & s) const
else if ("world" == s)
{
AllDepAtom::Pointer result(new AllDepAtom);
- GeneralSetDepTag::Pointer tag(new GeneralSetDepTag("world"));
+ GeneralSetDepTag::Pointer tag(new GeneralSetDepTag("world", stringify(name())));
if (_imp->world_file.exists())
{