aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAvatar Saleem Abdulrasool <compnerd@compnerd.org> 2013-02-22 19:58:18 -0800
committerAvatar Saleem Abdulrasool <compnerd@compnerd.org> 2013-03-11 22:35:15 -0700
commit0e6261448e1613a45e4a3e79f7d9cf158e71df2d (patch)
tree2fbdab0aa9e6cd46db7d75504c797bbd9eb6e94e /src
parentb62787ab8a2f2c1f7dc8793c8451ee7f7e932ca3 (diff)
downloadpaludis-0e6261448e1613a45e4a3e79f7d9cf158e71df2d.tar.gz
paludis-0e6261448e1613a45e4a3e79f7d9cf158e71df2d.tar.xz
allow partitioning image
This adds a new function `expart' which allows partitioning the image into separate parts. This information is then provided to the merge to record. Signed-off-by: Saleem Abdulrasool <compnerd@compnerd.org>
Diffstat (limited to 'src')
-rw-r--r--src/clients/cave/cmd_contents-fmt.hh12
-rw-r--r--src/clients/cave/cmd_contents.cc13
2 files changed, 20 insertions, 5 deletions
diff --git a/src/clients/cave/cmd_contents-fmt.hh b/src/clients/cave/cmd_contents-fmt.hh
index ccae47be5..7d70fed83 100644
--- a/src/clients/cave/cmd_contents-fmt.hh
+++ b/src/clients/cave/cmd_contents-fmt.hh
@@ -1,13 +1,21 @@
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
const auto fs_file = make_format_string_fetcher("contents/file", 1)
- << c::bold_blue_or_pink() << param<'s'>() << c::normal();
+ << c::bold_blue_or_pink() << param<'s'>()
+ << param_if<'p'>()
+ << c::yellow() << " [" << param<'p'>() << "]"
+ << param_endif<'p'>()
+ << c::normal();
const auto fs_dir = make_format_string_fetcher("contents/dir", 1)
<< c::blue_or_pink() << param<'s'>() << c::normal();
const auto fs_sym = make_format_string_fetcher("contents/sym", 1)
- << c::bold_green_or_pink() << param<'s'>() << c::normal() << " -> " << param<'t'>();
+ << c::bold_green_or_pink() << param<'s'>()
+ << c::normal() << " -> " << param<'t'>()
+ << param_if<'p'>()
+ << c::yellow() << " [" << param<'p'>() << "]" << c::normal()
+ << param_endif<'p'>();
const auto fs_other = make_format_string_fetcher("contents/other", 1)
<< c::bold_yellow() << param<'s'>() << c::normal();
diff --git a/src/clients/cave/cmd_contents.cc b/src/clients/cave/cmd_contents.cc
index 23f00adc8..2122dd2dc 100644
--- a/src/clients/cave/cmd_contents.cc
+++ b/src/clients/cave/cmd_contents.cc
@@ -82,7 +82,11 @@ namespace
{
std::string visit(const ContentsFileEntry & e) const
{
- return fuc(fs_file(), fv<'s'>(stringify(e.location_key()->parse_value())));
+ return fuc(fs_file(),
+ fv<'p'>(e.part_key()
+ ? stringify(e.part_key()->parse_value())
+ : ""),
+ fv<'s'>(stringify(e.location_key()->parse_value())));
}
std::string visit(const ContentsDirEntry & e) const
@@ -93,8 +97,11 @@ namespace
std::string visit(const ContentsSymEntry & e) const
{
return fuc(fs_sym(),
- fv<'s'>(stringify(e.location_key()->parse_value())),
- fv<'t'>(stringify(e.target_key()->parse_value())));
+ fv<'p'>(e.part_key()
+ ? stringify(e.part_key()->parse_value())
+ : ""),
+ fv<'s'>(stringify(e.location_key()->parse_value())),
+ fv<'t'>(stringify(e.target_key()->parse_value())));
}
std::string visit(const ContentsOtherEntry & e) const