diff options
author | Karen Arutyunov <karen@codesynthesis.com> | 2016-08-19 17:37:29 +0300 |
---|---|---|
committer | Karen Arutyunov <karen@codesynthesis.com> | 2016-08-29 18:20:03 +0300 |
commit | 53c2aa8e382dd50d09b385285bc3fa0b645ace0a (patch) | |
tree | 6d23d091bc57c0aa8d8a529e63ec2f2f22322a3a /bpkg/pkg-drop.cxx | |
parent | a4b29effed15b0a3e9309a4633a3ada37f3081e6 (diff) |
Support system packages
Diffstat (limited to 'bpkg/pkg-drop.cxx')
-rw-r--r-- | bpkg/pkg-drop.cxx | 14 |
1 files changed, 11 insertions, 3 deletions
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<selected_package>& 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; } } |