aboutsummaryrefslogtreecommitdiff
path: root/bpkg/package
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2015-09-15 10:58:17 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2015-09-15 10:58:17 +0200
commit333c5953151d6324d83d279a7ac3c53cd1af54b9 (patch)
treee473c5ca4461afcbdf67d5db42e883a1d76564e9 /bpkg/package
parentd05f9f046565f2d0d4135912103f96f0e66b454f (diff)
Implement pkg-verify, pkg-fetch commands
Diffstat (limited to 'bpkg/package')
-rw-r--r--bpkg/package20
1 files changed, 20 insertions, 0 deletions
diff --git a/bpkg/package b/bpkg/package
index 2aa7412..8c1e047 100644
--- a/bpkg/package
+++ b/bpkg/package
@@ -35,6 +35,18 @@ namespace bpkg
namespace bpkg
{
+ // path
+ //
+ #pragma db map type(path) as(string) \
+ to((?).string ()) from(bpkg::path (?))
+
+ using optional_path = optional<path>;
+ using optional_string = optional<string>;
+
+ #pragma db map type(optional_path) as(bpkg::optional_string) \
+ to((?) ? (?)->string () : bpkg::optional_string ()) \
+ from((?) ? bpkg::path (*(?)) : bpkg::optional_path ())
+
// version
//
#pragma db map type(version) as(_version) \
@@ -81,6 +93,14 @@ namespace bpkg
version_type version;
state_type state;
+ // Path to the archive of this package, if any. If not absolute,
+ // then it is relative to the configuration directory. The purge
+ // flag indicates whether the archive should be removed when the
+ // packaged is purged.
+ //
+ optional<path> archive;
+ bool archive_purge;
+
// Database mapping.
//
#pragma db member(name) id