From 218cd07992a715246076128ebf7ff67275f4dce0 Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Fri, 11 Mar 2016 18:45:17 +0300 Subject: Adapt to manifest classes refactoring --- load/load.cxx | 26 ++++++++++---------------- 1 file changed, 10 insertions(+), 16 deletions(-) (limited to 'load') 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& rp, database& db) optional 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; } } -- cgit v1.1