aboutsummaryrefslogtreecommitdiff
path: root/bpkg/pkg-build-collect.cxx
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2023-01-20 17:21:53 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2023-01-20 21:36:38 +0300
commitb583457aa83df2c80d94584cd3cba78f0dbce6e9 (patch)
tree8e8b0d1a8d1df537ec994558e8800cffcff3cce9 /bpkg/pkg-build-collect.cxx
parent6a3ab64a076a262d13b487b58e10eab55a8226f6 (diff)
Review-inspired changes
Diffstat (limited to 'bpkg/pkg-build-collect.cxx')
-rw-r--r--bpkg/pkg-build-collect.cxx24
1 files changed, 14 insertions, 10 deletions
diff --git a/bpkg/pkg-build-collect.cxx b/bpkg/pkg-build-collect.cxx
index 11d1848..8442b15 100644
--- a/bpkg/pkg-build-collect.cxx
+++ b/bpkg/pkg-build-collect.cxx
@@ -30,7 +30,7 @@ namespace bpkg
// build_package
//
const system_package_status* build_package::
- system_install () const
+ system_status () const
{
assert (action);
@@ -40,20 +40,24 @@ namespace bpkg
assert (sys_rep);
if (const system_package* sys_pkg = sys_rep->find (name ()))
- {
- const system_package_status* s (sys_pkg->system_status);
-
- return s != nullptr &&
- (s->status == system_package_status::partially_installed ||
- s->status == system_package_status::not_installed)
- ? s
- : nullptr;
- }
+ return sys_pkg->system_status;
}
return nullptr;
}
+ const system_package_status* build_package::
+ system_install () const
+ {
+ if (const system_package_status* s = system_status ())
+ return s->status == system_package_status::partially_installed ||
+ s->status == system_package_status::not_installed
+ ? s
+ : nullptr;
+
+ return nullptr;
+ }
+
bool build_package::
user_selection () const
{