X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?p=src%2Fapp-framework-main.git;a=blobdiff_plain;f=src%2Fwgtpkg-install.c;h=71a0ff69b00e3d7dbbee4bad986d17b38bb463ed;hp=8035a309df1567d826b33f94363a2fab72bd9444;hb=6f6d04fef9f08d756a37d17333f5b9b9a6b72dd2;hpb=80c482f0c8974139c023388897f77195fb8fe01f diff --git a/src/wgtpkg-install.c b/src/wgtpkg-install.c index 8035a30..71a0ff6 100644 --- a/src/wgtpkg-install.c +++ b/src/wgtpkg-install.c @@ -42,7 +42,10 @@ static const char permission_required[] = "required"; static const char permission_optional[] = "optional"; static const char feature_required_permissions[] = FWK_PREFIX "required-permissions"; -static const char exec_type_string[] = "application/x-executable"; +static const char* exec_type_strings[] = { + "application/x-executable", + "application/vnd.agl.native" +}; static int check_defined(const void *data, const char *name) { @@ -185,8 +188,16 @@ static int install_icon(const struct wgt_desc *desc) static int install_exec_flag(const struct wgt_desc *desc) { - return desc->content_type != NULL && !strcmp(desc->content_type, exec_type_string) - ? fchmodat(workdirfd, desc->content_src, 0755, 0) : 0; + int i; + + if (desc->content_type) { + i = sizeof exec_type_strings / sizeof *exec_type_strings; + while (i) { + if (!strcasecmp(desc->content_type, exec_type_strings[--i])) + return fchmodat(workdirfd, desc->content_src, 0755, 0); + } + } + return 0; } static int install_security(const struct wgt_desc *desc)