From 422afdb14a7a0c141bce59287377bca1b1b34a07 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Wed, 16 Sep 2015 13:15:53 +0200 Subject: Add --purge|-p option to pkg-{fetch,unpack} commands --- bpkg/pkg-unpack.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'bpkg/pkg-unpack.cxx') diff --git a/bpkg/pkg-unpack.cxx b/bpkg/pkg-unpack.cxx index 8b08674..3192c27 100644 --- a/bpkg/pkg-unpack.cxx +++ b/bpkg/pkg-unpack.cxx @@ -24,7 +24,7 @@ using namespace butl; namespace bpkg { static shared_ptr - pkg_unpack (database& db, const dir_path& c, const dir_path& d) + pkg_unpack (database& db, const dir_path& c, const dir_path& d, bool purge) { tracer trace ("pkg_unpack(dir)"); @@ -66,7 +66,7 @@ namespace bpkg optional (), // No archive false, // Don't purge archive. move (ad), - false}); // Don't purge source. + purge}); db.persist (p); t.commit (); @@ -186,7 +186,7 @@ namespace bpkg fail << "package directory argument expected" << info << "run 'bpkg help pkg-unpack' for more information"; - p = pkg_unpack (db, c, dir_path (args.next ())); + p = pkg_unpack (db, c, dir_path (args.next ()), o.purge ()); } else { -- cgit v1.1