- uid_t uid = getuid();
- std::string dbPath = uid == 0 ? "/opt/dbspace/" : "/opt/dbspace/user/" + std::to_string(uid) + "/";
-
- std::ostringstream command;
- command << "/usr/bin/sqlite3 "
- << dbPath << ".pkgmgr_parser.db "
- << " \"insert into package_info (package, package_type, package_api_version,"
- << " install_location, mainapp_id, root_path, installed_storage)"
- << " values ('" << request.getPkgId() << "', 'tpk', '" << request.getAppTizenVersion()
- << "', 'auto', '" << request.getPkgId() << "', '/opt/usr/globallapps/"
- << request.getPkgId() << "', 'installed_internal')\"";
- int pkgmgrResult = system(command.str().c_str());
- RUNNER_ASSERT_MSG(pkgmgrResult == 0, "failed to set package_info: " << pkgmgrResult);
-