void inst(const std::string &where, bool doUpgrade) { cout << "\nINSTALLING to " << where << endl; JobInfoPtr inf = spr->installPack("test", "test", where, NULL, false, doUpgrade); if(inf) if(inf->isSuccess()) cout << "SUCCESS!\n"; else inf->failError(); else cout << "NO JOB EXECUTED\n"; printDir(where); }
void uninst(const std::string &where) { cout << "\nUNINSTALLING " << where << endl; JobInfoPtr inf = spr->uninstallPack("test", "test", where, false); if(inf) if(inf->isSuccess()) cout << "SUCCESS!\n"; else inf->failError(); else cout << "NO JOB EXECUTED\n"; shortStatus(*spr); if(bf::exists(where)) throw runtime_error("ERROR: dir still exists!\n"); }