aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2012-04-14 20:26:09 +0100
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2012-04-14 20:26:09 +0100
commit0eba37612dad62dc675f082d15d7d07aa91fc590 (patch)
tree8e5ede01bdd152bf92417ea98c66dff62a467afb
parentf0d23e3bdda8a4b5fab3b200ffc301c0d9c4a478 (diff)
downloadpaludis-0eba37612dad62dc675f082d15d7d07aa91fc590.tar.gz
paludis-0eba37612dad62dc675f082d15d7d07aa91fc590.tar.xz
Add %u format for uniquely identifying spec
-rw-r--r--src/clients/cave/cmd_print_dependent_ids.cc1
-rw-r--r--src/clients/cave/cmd_print_ids.cc1
-rw-r--r--src/clients/cave/cmd_print_owners.cc1
-rw-r--r--src/clients/cave/format_package_id.cc4
4 files changed, 6 insertions, 1 deletions
diff --git a/src/clients/cave/cmd_print_dependent_ids.cc b/src/clients/cave/cmd_print_dependent_ids.cc
index 8a82048..2ab56f2 100644
--- a/src/clients/cave/cmd_print_dependent_ids.cc
+++ b/src/clients/cave/cmd_print_dependent_ids.cc
@@ -84,6 +84,7 @@ namespace
"%c for category, %p for package, %v for version, %s for slot, %: for ':' if we have a slot and "
"empty otherwise, %r for repository, %F for the canonical full form, %V for the canonical full "
"version, %W for the canonical full unversioned form, %N for the canonical full unnamed form, "
+ "%u for a uniquely identifying dependency spec, "
"\\n for newline, \\t for tab. Default is '%F\\n'.")
{
add_usage_line("spec");
diff --git a/src/clients/cave/cmd_print_ids.cc b/src/clients/cave/cmd_print_ids.cc
index b3326e2..3b4b179 100644
--- a/src/clients/cave/cmd_print_ids.cc
+++ b/src/clients/cave/cmd_print_ids.cc
@@ -111,6 +111,7 @@ namespace
"%c for category, %p for package, %v for version, %s for slot, %: for ':' if we have a slot and "
"empty otherwise, %r for repository, %F for the canonical full form, %V for the canonical full "
"version, %W for the canonical full unversioned form, %N for the canonical full unnamed form, "
+ "%u for a uniquely identifying dependency spec, "
"\\n for newline, \\t for tab. Default is '%F\\n'.")
{
add_usage_line("[ --matching spec ] [ --supporting action ] [ --with-mask mask-kind ]");
diff --git a/src/clients/cave/cmd_print_owners.cc b/src/clients/cave/cmd_print_owners.cc
index 9851d1e..d5ed643 100644
--- a/src/clients/cave/cmd_print_owners.cc
+++ b/src/clients/cave/cmd_print_owners.cc
@@ -85,6 +85,7 @@ namespace
"%c for category, %p for package, %v for version, %s for slot, %: for ':' if we have a slot and "
"empty otherwise, %r for repository, %F for the canonical full form, %V for the canonical full "
"version, %W for the canonical full unversioned form, %N for the canonical full unnamed form, "
+ "%u for a uniquely identifying dependency spec, "
"\\n for newline, \\t for tab. Default is '%F\\n'.")
{
add_usage_line("[ --type algorithm ] [ --matching spec ] pattern");
diff --git a/src/clients/cave/format_package_id.cc b/src/clients/cave/format_package_id.cc
index e229ec8..f6a0058 100644
--- a/src/clients/cave/format_package_id.cc
+++ b/src/clients/cave/format_package_id.cc
@@ -3,7 +3,7 @@
/*
* Copyright (c) 2011 Alex Elsayed
* Based in part on format_plain_metadata_key.hh, which is
- * Copyright (c) 2008, 2010 Ciaran McCreesh
+ * Copyright (c) 2008, 2010, 2011 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
@@ -29,6 +29,7 @@
#include <paludis/util/stringify.hh>
#include <paludis/package_id.hh>
#include <paludis/version_spec.hh>
+#include <paludis/dep_spec.hh>
#include <string>
using namespace paludis;
@@ -50,6 +51,7 @@ paludis::cave::format_package_id(
m->insert('V', id->canonical_form(idcf_version));
m->insert('W', id->canonical_form(idcf_no_version));
m->insert('N', id->canonical_form(idcf_no_name));
+ m->insert('u', stringify(id->uniquely_identifying_spec()));
return format_string(format, m);
}