Support rpk installation for MIC 72/289472/1
authorHwankyu Jhun <h.jhun@samsung.com>
Wed, 8 Mar 2023 08:15:59 +0000 (08:15 +0000)
committerHwankyu Jhun <h.jhun@samsung.com>
Wed, 8 Mar 2023 08:15:59 +0000 (08:15 +0000)
The NUIGadget is packed using rpk. The rpk package MUST be installed in MIC step.

Change-Id: Iee1d10977aff0afc588b044d5cb0c0e124580f32
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
src/install_preload_pkg/install_preload_pkg.c

index 73ff345..9a60472 100644 (file)
 
 #define TPK_BACKEND_CMD "/usr/bin/tpk-backend"
 #define WGT_BACKEND_CMD "/usr/bin/wgt-backend"
+#define UNIFIED_BACKEND_CMD "/usr/bin/unified-backend"
 #define TPK_DIR tzplatform_mkpath(TZ_SYS_RO_APP, ".preload-tpk")
 #define WGT_DIR tzplatform_mkpath(TZ_SYS_RO_APP, ".preload-wgt")
+#define RPK_DIR tzplatform_mkpath(TZ_SYS_RO_APP, ".preload-rpk")
 #define TPK_RW_DIR tzplatform_mkpath(TZ_SYS_RO_APP, ".preload-rw-tpk")
 #define WGT_RW_DIR tzplatform_mkpath(TZ_SYS_RO_APP, ".preload-rw-wgt")
+#define RPK_RW_DIR tzplatform_mkpath(TZ_SYS_RO_APP, ".preload-rw-rpk")
 #define ALL_PRELOAD_RW_PKG_LIST "/opt/usr/share/.all_preload_rw_list"
 
 #define PKG_TYPE_STRING_LEN_MAX        128
@@ -438,6 +441,15 @@ int main(int argc, char *argv[])
                                INSTALL_TYPE_PRELOAD_RW, skip_check_reference) != 0)
                        goto error;
 
+               if (_add_pkgfile_info(UNIFIED_BACKEND_CMD, RPK_DIR,
+                               INSTALL_TYPE_PRELOAD, skip_check_reference) != 0)
+                       goto error;
+
+               if (_add_pkgfile_info(UNIFIED_BACKEND_CMD, RPK_RW_DIR,
+                               INSTALL_TYPE_PRELOAD_RW, skip_check_reference) != 0)
+                       goto error;
+
+
                _sort_pkgfile_info_list();
 
                if (_install_pkg_with_pkginfo() != 0)
@@ -455,6 +467,8 @@ int main(int argc, char *argv[])
 
        if (strcmp(pkg_type, "tpk") == 0)
                backend_cmd = TPK_BACKEND_CMD;
+       else if (strcmp(pkg_type, "rpk") == 0)
+               backend_cmd = UNIFIED_BACKEND_CMD;
        else
                backend_cmd = WGT_BACKEND_CMD;