aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2013-09-15 17:17:13 +0100
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2013-09-17 13:22:17 +0100
commit278eb8442b64676ed0c69bc2097898553be8a81b (patch)
treec3892f41966a81718329e36b0ebc10e52b6f6e82
parent83d5551e9ce575815dcbdc190cac4baecc093f6f (diff)
downloadpaludis-278eb8442b64676ed0c69bc2097898553be8a81b.tar.gz
paludis-278eb8442b64676ed0c69bc2097898553be8a81b.tar.xz
Read volatile from NDBAM contents
-rw-r--r--paludis/ndbam.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/paludis/ndbam.cc b/paludis/ndbam.cc
index 987de27..c07f39e 100644
--- a/paludis/ndbam.cc
+++ b/paludis/ndbam.cc
@@ -548,6 +548,10 @@ NDBAM::parse_contents(const PackageID & id,
if (tokens.count("part"))
part = tokens.find("part")->second;
+ bool isvolatile = false;
+ if (tokens.count("volatile"))
+ isvolatile = destringify<bool>(tokens.find("volatile")->second);
+
if (! tokens.count("mtime"))
{
Log::get_instance()->message("ndbam.contents.no_key.mtime", ll_warning, lc_context) <<
@@ -559,6 +563,8 @@ NDBAM::parse_contents(const PackageID & id,
std::shared_ptr<ContentsFileEntry> entry(std::make_shared<ContentsFileEntry>(FSPath(path), part));
entry->add_metadata_key(std::make_shared<LiteralMetadataValueKey<std::string>>("md5", "md5", mkt_normal, md5));
entry->add_metadata_key(std::make_shared<LiteralMetadataTimeKey>("mtime", "mtime", mkt_normal, Timestamp(mtime, 0)));
+ if (isvolatile)
+ entry->add_metadata_key(std::make_shared<LiteralMetadataValueKey<bool> >("volatile", "volatile", mkt_normal, isvolatile));
on_file(entry);
}
else if ("dir" == type)