aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2013-09-15 17:24:28 +0100
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2013-09-17 13:22:18 +0100
commit4cf6969f791466411e9084c9e4a5301cb427f796 (patch)
treedd9b0807e6faa01542d927223032f1c36bc6bff7
parent633cee0ee6153cfcff5d1a29aad1cdfe60f01dc1 (diff)
downloadpaludis-4cf6969f791466411e9084c9e4a5301cb427f796.tar.gz
paludis-4cf6969f791466411e9084c9e4a5301cb427f796.tar.xz
Support recording volatile files in ndbam
-rw-r--r--paludis/ndbam_merger.cc4
-rw-r--r--paludis/ndbam_merger.hh4
-rw-r--r--paludis/repositories/e/exndbam_repository.cc1
-rw-r--r--paludis/repositories/unpackaged/installed_repository.cc1
4 files changed, 8 insertions, 2 deletions
diff --git a/paludis/ndbam_merger.cc b/paludis/ndbam_merger.cc
index 85acc05..1b61f22 100644
--- a/paludis/ndbam_merger.cc
+++ b/paludis/ndbam_merger.cc
@@ -1,7 +1,7 @@
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
/*
- * Copyright (c) 2007, 2008, 2009, 2010, 2011 Ciaran McCreesh
+ * Copyright (c) 2007, 2008, 2009, 2010, 2011, 2013 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
@@ -189,6 +189,8 @@ NDBAMMerger::record_install_file(const FSPath & src, const FSPath & dst_dir, con
*_imp->contents_file << " mtime=" << timestamp;
if (!part.empty())
*_imp->contents_file << " part=" << part;
+ if (_imp->params.is_volatile()(FSPath(tidy)))
+ *_imp->contents_file << " volatile=true";
*_imp->contents_file << std::endl;
}
diff --git a/paludis/ndbam_merger.hh b/paludis/ndbam_merger.hh
index 8508b79..57834bd 100644
--- a/paludis/ndbam_merger.hh
+++ b/paludis/ndbam_merger.hh
@@ -1,7 +1,7 @@
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
/*
- * Copyright (c) 2007, 2008, 2009, 2010, 2011 Ciaran McCreesh
+ * Copyright (c) 2007, 2008, 2009, 2010, 2011, 2013 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
@@ -40,6 +40,7 @@ namespace paludis
typedef Name<struct name_get_new_ids_or_minus_one> get_new_ids_or_minus_one;
typedef Name<struct name_image> image;
typedef Name<struct name_install_under> install_under;
+ typedef Name<struct name_is_volatile> is_volatile;
typedef Name<struct name_merged_entries> merged_entries;
typedef Name<struct name_options> options;
typedef Name<struct name_output_manager> output_manager;
@@ -61,6 +62,7 @@ namespace paludis
NamedValue<n::get_new_ids_or_minus_one, std::function<std::pair<uid_t, gid_t> (const FSPath &)> > get_new_ids_or_minus_one;
NamedValue<n::image, FSPath> image;
NamedValue<n::install_under, FSPath> install_under;
+ NamedValue<n::is_volatile, std::function<bool (const FSPath &)> > is_volatile;
NamedValue<n::merged_entries, std::shared_ptr<FSPathSet> > merged_entries;
NamedValue<n::options, MergerOptions> options;
NamedValue<n::output_manager, std::shared_ptr<OutputManager> > output_manager;
diff --git a/paludis/repositories/e/exndbam_repository.cc b/paludis/repositories/e/exndbam_repository.cc
index 31b4e0e..15feba6 100644
--- a/paludis/repositories/e/exndbam_repository.cc
+++ b/paludis/repositories/e/exndbam_repository.cc
@@ -477,6 +477,7 @@ ExndbamRepository::merge(const MergeParams & m)
n::get_new_ids_or_minus_one() = std::bind(&get_new_ids_or_minus_one, _imp->params.environment(), std::placeholders::_1),
n::image() = m.image_dir(),
n::install_under() = FSPath("/"),
+ n::is_volatile() = [] (const FSPath &) { return false; },
n::merged_entries() = m.merged_entries(),
n::options() = m.options(),
n::output_manager() = m.output_manager(),
diff --git a/paludis/repositories/unpackaged/installed_repository.cc b/paludis/repositories/unpackaged/installed_repository.cc
index b0ea4ad..449606a 100644
--- a/paludis/repositories/unpackaged/installed_repository.cc
+++ b/paludis/repositories/unpackaged/installed_repository.cc
@@ -341,6 +341,7 @@ InstalledUnpackagedRepository::merge(const MergeParams & m)
_imp->params.environment(), rewrite_ids_over_to_root, _1),
n::image() = m.image_dir(),
n::install_under() = install_under,
+ n::is_volatile() = [] (const FSPath &) { return false; },
n::merged_entries() = std::make_shared<FSPathSet>(),
n::options() = m.options(),
n::output_manager() = m.output_manager(),