aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doc/api/cplusplus/examples/example_package_id.cc1
-rw-r--r--paludis/package_id.se1
-rw-r--r--paludis/repositories/accounts/accounts_id.cc3
-rw-r--r--paludis/repositories/accounts/installed_accounts_id.cc3
-rw-r--r--paludis/repositories/cran/cran_package_id.cc3
-rw-r--r--paludis/repositories/e/e_installed_repository_id.cc7
-rw-r--r--paludis/repositories/e/ebuild_id.cc7
-rw-r--r--paludis/repositories/fake/fake_package_id.cc4
-rw-r--r--paludis/repositories/gems/gem_specification.cc3
-rw-r--r--paludis/repositories/unavailable/unavailable_id.cc5
-rw-r--r--paludis/repositories/unpackaged/installed_id.cc4
-rw-r--r--paludis/repositories/unpackaged/unpackaged_id.cc4
-rw-r--r--paludis/repositories/unwritten/unwritten_id.cc4
-rw-r--r--paludis/repositories/virtuals/package_id.cc4
14 files changed, 53 insertions, 0 deletions
diff --git a/doc/api/cplusplus/examples/example_package_id.cc b/doc/api/cplusplus/examples/example_package_id.cc
index e90b199..b1653dc 100644
--- a/doc/api/cplusplus/examples/example_package_id.cc
+++ b/doc/api/cplusplus/examples/example_package_id.cc
@@ -66,6 +66,7 @@ int main(int argc, char * argv[])
cout << left << setw(30) << " idcf_full:" << " " << (*i)->canonical_form(idcf_full) << endl;
cout << left << setw(30) << " idcf_version:" << " " << (*i)->canonical_form(idcf_version) << endl;
cout << left << setw(30) << " idcf_no_version:" << " " << (*i)->canonical_form(idcf_no_version) << endl;
+ cout << left << setw(30) << " idcf_no_name:" << " " << (*i)->canonical_form(idcf_no_name) << endl;
/* Let's see what keys we have. Other examples cover keys in depth,
* so we'll just use the basic methods here. */
diff --git a/paludis/package_id.se b/paludis/package_id.se
index 7948383..7d6ee2b 100644
--- a/paludis/package_id.se
+++ b/paludis/package_id.se
@@ -8,6 +8,7 @@ make_enum_PackageIDCanonicalForm()
key idcf_full "Everything"
key idcf_version "Version, and affix as appropriate"
key idcf_no_version "No version"
+ key idcf_no_name "No name \since 0.46"
doxygen_comment << "END"
/**
diff --git a/paludis/repositories/accounts/accounts_id.cc b/paludis/repositories/accounts/accounts_id.cc
index 9ef44c9..0745840 100644
--- a/paludis/repositories/accounts/accounts_id.cc
+++ b/paludis/repositories/accounts/accounts_id.cc
@@ -269,6 +269,9 @@ AccountsID::canonical_form(const PackageIDCanonicalForm f) const
case idcf_version:
return stringify(version());
+ case idcf_no_name:
+ return stringify(version()) + "::" + stringify(repository()->name());
+
case last_idcf:
break;
}
diff --git a/paludis/repositories/accounts/installed_accounts_id.cc b/paludis/repositories/accounts/installed_accounts_id.cc
index 188bc8f..56d22c8 100644
--- a/paludis/repositories/accounts/installed_accounts_id.cc
+++ b/paludis/repositories/accounts/installed_accounts_id.cc
@@ -193,6 +193,9 @@ InstalledAccountsID::canonical_form(const PackageIDCanonicalForm f) const
case idcf_version:
return stringify(version());
+ case idcf_no_name:
+ return stringify(version()) + "::" + stringify(repository()->name());
+
case last_idcf:
break;
}
diff --git a/paludis/repositories/cran/cran_package_id.cc b/paludis/repositories/cran/cran_package_id.cc
index ab57a85..2a7709f 100644
--- a/paludis/repositories/cran/cran_package_id.cc
+++ b/paludis/repositories/cran/cran_package_id.cc
@@ -448,6 +448,9 @@ CRANPackageID::canonical_form(const PackageIDCanonicalForm f) const
case idcf_no_version:
return stringify(_imp->name) + "::" + stringify(_imp->repository->name());
+ case idcf_no_name:
+ return stringify(version()) + "::" + stringify(repository()->name());
+
case last_idcf:
break;
}
diff --git a/paludis/repositories/e/e_installed_repository_id.cc b/paludis/repositories/e/e_installed_repository_id.cc
index b511555..c9e9978 100644
--- a/paludis/repositories/e/e_installed_repository_id.cc
+++ b/paludis/repositories/e/e_installed_repository_id.cc
@@ -595,6 +595,13 @@ EInstalledRepositoryID::canonical_form(const PackageIDCanonicalForm f) const
case idcf_version:
return stringify(version());
+ case idcf_no_name:
+ if (_imp->keys && _imp->keys->slot)
+ return stringify(version()) + ":" + stringify(_imp->keys->slot->value()) + "::" +
+ stringify(repository()->name());
+
+ return stringify(version()) + "::" + stringify(repository()->name());
+
case last_idcf:
break;
}
diff --git a/paludis/repositories/e/ebuild_id.cc b/paludis/repositories/e/ebuild_id.cc
index 958a070..390fcd7 100644
--- a/paludis/repositories/e/ebuild_id.cc
+++ b/paludis/repositories/e/ebuild_id.cc
@@ -589,6 +589,13 @@ EbuildID::canonical_form(const PackageIDCanonicalForm f) const
case idcf_version:
return stringify(version());
+ case idcf_no_name:
+ if (_imp->slot)
+ return stringify(version()) + ":" + stringify(_imp->slot->value()) + "::" +
+ stringify(repository()->name());
+
+ return stringify(version()) + "::" + stringify(repository()->name());
+
case last_idcf:
break;
}
diff --git a/paludis/repositories/fake/fake_package_id.cc b/paludis/repositories/fake/fake_package_id.cc
index 6156deb..425ed67 100644
--- a/paludis/repositories/fake/fake_package_id.cc
+++ b/paludis/repositories/fake/fake_package_id.cc
@@ -777,6 +777,10 @@ FakePackageID::canonical_form(const PackageIDCanonicalForm f) const
case idcf_no_version:
return stringify(_imp->name) + ":" + stringify(_imp->slot->value()) + "::" + stringify(_imp->repository->name());
+ case idcf_no_name:
+ return stringify(_imp->version) + ":" + stringify(_imp->slot->value())
+ + "::" + stringify(_imp->repository->name());
+
case last_idcf:
break;
}
diff --git a/paludis/repositories/gems/gem_specification.cc b/paludis/repositories/gems/gem_specification.cc
index c22dacc..b8c602d 100644
--- a/paludis/repositories/gems/gem_specification.cc
+++ b/paludis/repositories/gems/gem_specification.cc
@@ -301,6 +301,9 @@ GemSpecification::canonical_form(const PackageIDCanonicalForm f) const
case idcf_no_version:
return stringify(name()) + "::" + stringify(_imp->repository->name());
+ case idcf_no_name:
+ return stringify(version()) + "::" + stringify(repository()->name());
+
case last_idcf:
break;
}
diff --git a/paludis/repositories/unavailable/unavailable_id.cc b/paludis/repositories/unavailable/unavailable_id.cc
index dab1498..f732832 100644
--- a/paludis/repositories/unavailable/unavailable_id.cc
+++ b/paludis/repositories/unavailable/unavailable_id.cc
@@ -119,6 +119,11 @@ UnavailableID::canonical_form(const PackageIDCanonicalForm f) const
return stringify(_imp->version) +
" (in ::" + *_imp->from_repositories_key->value()->begin() + ")";
+ case idcf_no_name:
+ return stringify(_imp->version) +
+ ":" + stringify(_imp->slot_key->value()) + "::" + stringify(_imp->repo->name()) +
+ " (in ::" + *_imp->from_repositories_key->value()->begin() + ")";
+
case last_idcf:
break;
}
diff --git a/paludis/repositories/unpackaged/installed_id.cc b/paludis/repositories/unpackaged/installed_id.cc
index b9e1318..311a96a 100644
--- a/paludis/repositories/unpackaged/installed_id.cc
+++ b/paludis/repositories/unpackaged/installed_id.cc
@@ -511,6 +511,10 @@ InstalledUnpackagedID::canonical_form(const PackageIDCanonicalForm f) const
return stringify(_imp->name) + ":" + stringify(slot_key()->value()) + "::" +
stringify(_imp->repository_name);
+ case idcf_no_name:
+ return stringify(_imp->version) + ":" +
+ stringify(slot_key()->value()) + "::" + stringify(_imp->repository_name);
+
case last_idcf:
break;
}
diff --git a/paludis/repositories/unpackaged/unpackaged_id.cc b/paludis/repositories/unpackaged/unpackaged_id.cc
index 9f8b1d5..6909668 100644
--- a/paludis/repositories/unpackaged/unpackaged_id.cc
+++ b/paludis/repositories/unpackaged/unpackaged_id.cc
@@ -143,6 +143,10 @@ UnpackagedID::canonical_form(const PackageIDCanonicalForm f) const
return stringify(_imp->name) + ":" + stringify(slot_key()->value()) + "::" +
stringify(_imp->repository_name);
+ case idcf_no_name:
+ return stringify(_imp->version) + ":" +
+ stringify(slot_key()->value()) + "::" + stringify(_imp->repository_name);
+
case last_idcf:
break;
}
diff --git a/paludis/repositories/unwritten/unwritten_id.cc b/paludis/repositories/unwritten/unwritten_id.cc
index d6cacb2..01710c4 100644
--- a/paludis/repositories/unwritten/unwritten_id.cc
+++ b/paludis/repositories/unwritten/unwritten_id.cc
@@ -126,6 +126,10 @@ UnwrittenID::canonical_form(const PackageIDCanonicalForm f) const
case idcf_version:
return stringify(_imp->version);
+ case idcf_no_name:
+ return stringify(_imp->version) +
+ ":" + stringify(slot_key()->value()) + "::" + stringify(_imp->repo->name());
+
case last_idcf:
break;
}
diff --git a/paludis/repositories/virtuals/package_id.cc b/paludis/repositories/virtuals/package_id.cc
index 9e3d3e2..3a4c591 100644
--- a/paludis/repositories/virtuals/package_id.cc
+++ b/paludis/repositories/virtuals/package_id.cc
@@ -234,6 +234,10 @@ VirtualsPackageID::canonical_form(const PackageIDCanonicalForm f) const
case idcf_version:
return stringify(_imp->version) + " (for " + stringify(_imp->virtual_for->value()->canonical_form(idcf_no_version)) + ")";
+ case idcf_no_name:
+ return stringify(_imp->version) + "::" + stringify(_imp->repository->name()) +
+ " (virtual for " + stringify(*_imp->virtual_for->value()) + ")";
+
case last_idcf:
break;
}