aboutsummaryrefslogtreecommitdiff
path: root/load/load.cxx
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2016-03-11 18:45:17 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2016-03-11 18:45:17 +0300
commit218cd07992a715246076128ebf7ff67275f4dce0 (patch)
tree54c0ca75c73e6f61fd3f4ea5744715ee91f54f64 /load/load.cxx
parented0dd177c63bb7758e8633ffe26de2a8bc315d1b (diff)
Adapt to manifest classes refactoring
Diffstat (limited to 'load/load.cxx')
-rw-r--r--load/load.cxx26
1 files changed, 10 insertions, 16 deletions
diff --git a/load/load.cxx b/load/load.cxx
index 7556449..7786e0e 100644
--- a/load/load.cxx
+++ b/load/load.cxx
@@ -292,29 +292,23 @@ load_packages (const shared_ptr<repository>& rp, database& db)
optional<string> dsc;
if (pm.description)
{
- if (pm.description->file)
- {
- // @@ Pull description from the file when package manager API
- // is ready.
- }
- else
- dsc = move (*pm.description);
+ assert (!pm.description->file);
+ dsc = move (pm.description->text);
}
string chn;
for (auto& c: pm.changes)
{
- if (c.file)
- {
- // @@ Pull change notes from the file when package manager
- // API is ready.
- }
+ assert (!c.file);
+
+ if (chn.empty ())
+ chn = move (c.text);
else
{
- if (chn.empty ())
- chn = move (c);
- else
- chn += "\n" + c;
+ if (chn.back () != '\n')
+ chn += '\n'; // Always have a blank line as a separator.
+
+ chn += "\n" + c.text;
}
}