aboutsummaryrefslogtreecommitdiff
path: root/bpkg/pkg-drop
blob: ffb7b357e47ded52b82a50bf9a960fb902fea9b0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
// file      : bpkg/pkg-drop -*- C++ -*-
// copyright : Copyright (c) 2014-2017 Code Synthesis Ltd
// license   : MIT; see accompanying LICENSE file

#ifndef BPKG_PKG_DROP
#define BPKG_PKG_DROP

#include <set>

#include <bpkg/types>
#include <bpkg/forward> // database, selected_package
#include <bpkg/utility>

#include <bpkg/pkg-drop-options>

namespace bpkg
{
  int
  pkg_drop (const pkg_drop_options&, cli::scanner& args);

  // Examine the list of prerequisite packages and drop those that don't
  // have any dependents. Return the set of packages that were actually
  // dropped. Note that it should be called in session.
  //
  std::set<shared_ptr<selected_package>>
  pkg_drop (const dir_path& configuration,
            const common_options&,
            database&,
            const std::set<shared_ptr<selected_package>>&,
            bool prompt);
}

#endif // BPKG_PKG_DROP