From 53c2aa8e382dd50d09b385285bc3fa0b645ace0a Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Fri, 19 Aug 2016 17:37:29 +0300 Subject: Support system packages --- bpkg/pkg-drop.cxx | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'bpkg/pkg-drop.cxx') diff --git a/bpkg/pkg-drop.cxx b/bpkg/pkg-drop.cxx index 79a4870..fa9f0bd 100644 --- a/bpkg/pkg-drop.cxx +++ b/bpkg/pkg-drop.cxx @@ -352,10 +352,14 @@ namespace bpkg // transaction t (db.begin ()); pkg_disfigure (c, o, t, p); // Commits the transaction. - assert (p->state == package_state::unpacked); + + assert (p->state == package_state::unpacked || + p->state == package_state::transient); if (verb) - text << "disfigured " << p->name; + text << (p->state == package_state::transient + ? "purged " + : "disfigured ") << p->name; } if (disfigure_only) @@ -372,6 +376,9 @@ namespace bpkg const shared_ptr& p (dp.package); + if (p->state == package_state::transient) // Fully purged by disfigure. + continue; + assert (p->state == package_state::fetched || p->state == package_state::unpacked); @@ -526,7 +533,8 @@ namespace bpkg for (const drop_package& dp: pkgs) { if (dp.reason == drop_reason::prerequisite) - dr << text << dp.package->name; + dr << text << (dp.package->system () ? "sys:" : "") + << dp.package->name; } } -- cgit v1.1