aboutsummaryrefslogtreecommitdiff
path: root/src/clients/cave/cmd_print_owners.cc
diff options
context:
space:
mode:
authorAvatar Alex Elsayed <eternaleye@gmail.com> 2011-06-28 17:10:23 -0700
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2011-06-30 10:27:28 +0100
commit2c58ebc323b45ec1e8fa0902741fad331c1bbb7e (patch)
tree78838a79091e0780980a7a0d9d18a92ce977d976 /src/clients/cave/cmd_print_owners.cc
parente83a3ad0f53a5bd48e6f4cfdabac24914705b2ff (diff)
downloadpaludis-2c58ebc323b45ec1e8fa0902741fad331c1bbb7e.tar.gz
paludis-2c58ebc323b45ec1e8fa0902741fad331c1bbb7e.tar.xz
Start using the new format_package_id
Diffstat (limited to 'src/clients/cave/cmd_print_owners.cc')
-rw-r--r--src/clients/cave/cmd_print_owners.cc22
1 files changed, 2 insertions, 20 deletions
diff --git a/src/clients/cave/cmd_print_owners.cc b/src/clients/cave/cmd_print_owners.cc
index caa81b54c..9851d1ec5 100644
--- a/src/clients/cave/cmd_print_owners.cc
+++ b/src/clients/cave/cmd_print_owners.cc
@@ -20,7 +20,7 @@
#include "cmd_print_owners.hh"
#include "command_command_line.hh"
-#include "format_string.hh"
+#include "format_package_id.hh"
#include "owner_common.hh"
#include <paludis/args/args.hh>
#include <paludis/args/do_help.hh>
@@ -92,29 +92,11 @@ namespace
}
};
- std::string format_id(
- const std::string & format,
- const std::shared_ptr<const PackageID> & i)
- {
- std::shared_ptr<Map<char, std::string> > m(std::make_shared<Map<char, std::string>>());
- m->insert('c', stringify(i->name().category()));
- m->insert('p', stringify(i->name().package()));
- m->insert('v', stringify(i->version()));
- m->insert('s', i->slot_key() ? stringify(i->slot_key()->parse_value()) : "");
- m->insert(':', i->slot_key() ? ":" : "");
- m->insert('r', stringify(i->repository_name()));
- m->insert('F', i->canonical_form(idcf_full));
- m->insert('V', i->canonical_form(idcf_version));
- m->insert('W', i->canonical_form(idcf_no_version));
- m->insert('N', i->canonical_form(idcf_no_name));
- return format_string(format, m);
- }
-
void print_package_id(
const std::string & format,
const std::shared_ptr<const PackageID> & id)
{
- cout << format_id(format, id);
+ cout << format_package_id(id, format);
}
}