bool preload) {
ManifestLoader manifest_loader(path);
std::list<ManifestInfo> manifest_list = manifest_loader.LoadManifest();
+ bool result = true;
for (auto &manifest_info : manifest_list) {
std::cerr << "Manifest : " << std::get<0>(manifest_info) <<
(option_checker_.IsPartialRW() ? " (rw-only)":" (all)") << std::endl;
if (!RunBackend(std::get<1>(manifest_info),
std::get<2>(manifest_info), preload))
- return false;
+ result = false;
}
- return true;
+ return result;
}
bool InitPkgDB::Run() {
if (!HandleDatabase())
return false;
+ bool result = true;
if (option_checker_.IsGlobal()) {
if (!option_checker_.IsRWOnly())
if (!LoadDirectory(tzplatform_getenv(TZ_SYS_RO_PACKAGES), true))
- return false;
+ result = false;
if (option_checker_.IsROOnly())
- return true;
+ return result;
if (!LoadDirectory(tzplatform_getenv(TZ_SYS_RW_PACKAGES), false))
- return false;
+ result = false;
} else {
// Specified user location
tzplatform_set_user(option_checker_.GetUid());
std::string user_dir(tzplatform_getenv(TZ_USER_PACKAGES));
tzplatform_reset_user();
if (!LoadDirectory(user_dir, false))
- return false;
+ result = false;
}
- return true;
+ return result;
}
bool InitPkgDB::HandleDatabase() {