#include "common/utils/file_util.h"
#include "common/utils/manifest_util.h"
#include "common/utils/user_util.h"
-#include "pkgmgr_registration.h"
namespace bf = boost::filesystem;
namespace ci = common_installer;
// found in the LICENSE file.
#include "common/request.h"
-#include "common/utils/user_util.h"
+
#include <tzplatform_config.h>
#include <unistd.h>
+#include "common/utils/user_util.h"
+
namespace bf = boost::filesystem;
namespace common_installer {
}
void PrepareAppDefinedPrivilegeData(GList *privileges,
- AppDefinedPrivInfo& tpk_priv_vec, AppDefinedPrivInfo& wgt_priv_vec) {
+ AppDefinedPrivInfo* tpk_priv_vec, AppDefinedPrivInfo* wgt_priv_vec) {
for (auto& priv : GListRange<appdefined_privilege_x*>(privileges)) {
if (strcmp(priv->type, kWebPrivilegeType) == 0)
- wgt_priv_vec.emplace_back(std::make_pair(priv->value, priv->license ?
+ wgt_priv_vec->emplace_back(std::make_pair(priv->value, priv->license ?
priv->license : std::string()));
else
- tpk_priv_vec.emplace_back(std::make_pair(priv->value, priv->license ?
+ tpk_priv_vec->emplace_back(std::make_pair(priv->value, priv->license ?
priv->license : std::string()));
}
}
AppDefinedPrivInfo tpk_provides_appdef_vec, wgt_provides_appdef_vec;
PrepareAppDefinedPrivilegeData(manifest->appdefined_privileges,
- tpk_appdef_vec, wgt_appdef_vec);
+ &tpk_appdef_vec, &wgt_appdef_vec);
PrepareAppDefinedPrivilegeData(manifest->provides_appdefined_privileges,
- tpk_provides_appdef_vec, wgt_provides_appdef_vec);
+ &tpk_provides_appdef_vec, &wgt_provides_appdef_vec);
for (application_x* app : GListRange<application_x*>(manifest->application)) {
if (!app->appid) {
#include "common/step/configuration/step_switch_readonly_mode.h"
+#include <string>
+
namespace common_installer {
namespace configuration {
context_->uid.get());
new_tep_location_ /= old_tep_location_.filename();
} else {
- new_tep_location_ =
- GetInternalTepPath(context_->pkg_path.get()) / old_tep_location_.filename();
+ new_tep_location_ = GetInternalTepPath(context_->pkg_path.get()) /
+ old_tep_location_.filename();
}
}
bool CopyOwnershipAndPermissions(const boost::filesystem::path& src,
const boost::filesystem::path& dst) {
- if(!bf::exists(src)) {
+ if (!bf::exists(src)) {
LOG(ERROR) << "Failed to copy ownership and permissions"
<< " from " << src << " to " << dst;
return false;
bf::perms permissions = bf::status(src).permissions();
struct stat stats;
stat(src.c_str(), &stats);
- if(!SetDirOwnershipAndPermissions(dst, permissions, stats.st_uid,
+ if (!SetDirOwnershipAndPermissions(dst, permissions, stats.st_uid,
stats.st_gid)) {
LOG(ERROR) << "Failed to copy ownership and permissions"
<< " from " << src << " to " << dst;