X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=src%2Fwgtpkg-install.c;h=c7de1f824263e1f4834b2cbdf35b531ef239c570;hb=7ea1070ee471141f58e9e4c03df5c95bbcef907d;hp=57c17b803faff8d36f9b369d6dd5a8fe90bb4c0d;hpb=a123bb31906ef03ff813559aee426282416d729d;p=src%2Fapp-framework-main.git diff --git a/src/wgtpkg-install.c b/src/wgtpkg-install.c index 57c17b8..c7de1f8 100644 --- a/src/wgtpkg-install.c +++ b/src/wgtpkg-install.c @@ -398,7 +398,11 @@ static int get_target_directory(char target[PATH_MAX], const char *root, const s { int rc; +#if DISTINCT_VERSIONS rc = snprintf(target, PATH_MAX, "%s/%s/%s", root, desc->id, desc->ver); +#else + rc = snprintf(target, PATH_MAX, "%s/%s", root, desc->id); +#endif if (rc < PATH_MAX) rc = 0; else { @@ -563,7 +567,7 @@ struct wgt_info *install_widget(const char *wgtfile, const char *root, int force struct wgt_info *ifo; const struct wgt_desc *desc; char installdir[PATH_MAX]; - int err; + int err, rc; struct unitconf uconf; NOTICE("-- INSTALLING widget %s to %s --", wgtfile, root); @@ -578,7 +582,12 @@ struct wgt_info *install_widget(const char *wgtfile, const char *root, int force if (zread(wgtfile, 0)) goto error2; - if (check_all_signatures(DEFAULT_ALLOW_NO_SIGNATURE)) +#if defined(ALLOW_NO_SIGNATURE) + rc = check_all_signatures(1); +#else + rc = check_all_signatures(0); +#endif + if (rc) goto error2; ifo = wgt_info_createat(workdirfd, NULL, 1, 1, 1);