summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2016-05-30 12:00:24 +0100
committerDan Goodliffe <dan@randomdan.homeip.net>2016-05-30 12:00:24 +0100
commit770d5c1343d651546e1a3e27296c4a5a5411531f (patch)
tree0e270ccc033b9c10d52204342122ae592fde1665
parentAssociate bugs with packages (diff)
downloadgentoobrowse-api-770d5c1343d651546e1a3e27296c4a5a5411531f.tar.bz2
gentoobrowse-api-770d5c1343d651546e1a3e27296c4a5a5411531f.tar.xz
gentoobrowse-api-770d5c1343d651546e1a3e27296c4a5a5411531f.zip
gbdbupdate does bugs too and background option
-rw-r--r--gentoobrowse-api/util/update.cpp12
1 files changed, 11 insertions, 1 deletions
diff --git a/gentoobrowse-api/util/update.cpp b/gentoobrowse-api/util/update.cpp
index 43f894a..bc0082d 100644
--- a/gentoobrowse-api/util/update.cpp
+++ b/gentoobrowse-api/util/update.cpp
@@ -8,9 +8,11 @@ int
main(int c, char ** v)
{
std::string endpoint;
+ bool background;
po::options_description opts("Gentoo Browse Util::Update options");
opts.add_options()
("endpoint", po::value(&endpoint)->default_value("tcp -p 9001"), "Service endpoint")
+ ("background,b", po::value(&background)->default_value(false)->zero_tokens(), "Background")
("help,h", "Show help")
;
@@ -27,7 +29,15 @@ main(int c, char ** v)
auto m = Gentoo::MaintenancePrx::checkedCast(ic->stringToProxy("maintenance:" + endpoint));
m->ice_ping();
- m->refreshPackageTree();
+ auto rpt = m->begin_refreshPackageTree();
+ auto rb = m->begin_refreshBugs();
+ rpt->waitForSent();
+ rb->waitForSent();
+
+ if (!background) {
+ m->end_refreshPackageTree(rpt);
+ m->end_refreshBugs(rb);
+ }
ic->destroy();
return 0;