diff options
author | Sangyoon Jang <jeremy.jang@samsung.com> | 2017-07-19 12:21:07 +0900 |
---|---|---|
committer | Sangyoon Jang <jeremy.jang@samsung.com> | 2017-08-08 15:42:39 +0900 |
commit | 7fb5328ddc348961c842b548d6f6210e9f149d09 (patch) | |
tree | 59f55face802f49ee722750463df92b40254128c | |
parent | 351c12d68cbf899a302160bb9f336486bf4b906b (diff) | |
download | slp-pkgmgr-accepted/tizen_3.0_mobile.tar.gz slp-pkgmgr-accepted/tizen_3.0_mobile.tar.bz2 slp-pkgmgr-accepted/tizen_3.0_mobile.zip |
Add a new installer optionsubmit/tizen_3.0/20170815.233247accepted/tizen/3.0/wearable/20170816.131055accepted/tizen/3.0/tv/20170816.131033accepted/tizen/3.0/mobile/20170816.131116accepted/tizen/3.0/ivi/20170816.131209accepted/tizen/3.0/common/20170816.145128tizen_3.0accepted/tizen_3.0_wearableaccepted/tizen_3.0_tvaccepted/tizen_3.0_mobileaccepted/tizen_3.0_iviaccepted/tizen_3.0_common
Change-Id: I21c2b3ad905e2eb3ae27b7ead4aac12d89db21db
Signed-off-by: Sangyoon Jang <jeremy.jang@samsung.com>
-rw-r--r-- | installer/pkgmgr_installer.c | 14 | ||||
-rw-r--r-- | installer/pkgmgr_installer.h | 35 |
2 files changed, 48 insertions, 1 deletions
diff --git a/installer/pkgmgr_installer.c b/installer/pkgmgr_installer.c index 70ab512..f1b79ae 100644 --- a/installer/pkgmgr_installer.c +++ b/installer/pkgmgr_installer.c @@ -59,6 +59,7 @@ #define OPTVAL_KEEP_RWDATA 1004 #define OPTVAL_PARTIAL_RW 1005 #define OPTVAL_MIGRATE_EXTIMG 1006 +#define OPTVAL_SKIP_CHECK_REFERENCE 1007 /* Supported options */ const char *short_opts = "k:l:i:d:c:m:t:o:r:p:s:b:e:M:y:u:w:D:A:qG"; @@ -86,7 +87,8 @@ const struct option long_opts[] = { { "no-remove", 0, NULL, OPTVAL_NO_REMOVAL }, /* for preload RW */ { "keep-rwdata", 0, NULL, OPTVAL_KEEP_RWDATA }, /* for preload RW */ { "partial-rw", 0, NULL, OPTVAL_PARTIAL_RW }, /* for preload RO */ - { "migrate-extimg", 1, NULL, OPTVAL_MIGRATE_EXTIMG }, + { "migrate-extimg", 1, NULL, OPTVAL_MIGRATE_EXTIMG }, + { "skip-check-reference", 0, NULL, OPTVAL_SKIP_CHECK_REFERENCE }, { 0, 0, 0, 0 } /* sentinel */ }; @@ -109,6 +111,7 @@ struct pkgmgr_installer { int keep_rwdata; int partial_rw; int debug_mode; + int skip_check_reference; GDBusConnection *conn; }; @@ -420,6 +423,9 @@ pkgmgr_installer_receive_request(pkgmgr_installer *pi, pi->pkgmgr_info = strndup(optarg, MAX_STRLEN); DBG("legacy extimg migration requested"); break; + case OPTVAL_SKIP_CHECK_REFERENCE: + pi->skip_check_reference = 1; + break; case 'k': /* session id */ if (pi->session_id) free(pi->session_id); @@ -714,6 +720,12 @@ API int pkgmgr_installer_get_debug_mode(pkgmgr_installer *pi) return pi->debug_mode; } +API int pkgmgr_installer_get_skip_check_reference(pkgmgr_installer *pi) +{ + CHK_PI_RET(PKGMGR_REQ_INVALID); + return pi->skip_check_reference; +} + API int pkgmgr_installer_send_app_uninstall_signal(pkgmgr_installer *pi, const char *pkg_type, const char *pkgid, diff --git a/installer/pkgmgr_installer.h b/installer/pkgmgr_installer.h index c108979..5393c3e 100644 --- a/installer/pkgmgr_installer.h +++ b/installer/pkgmgr_installer.h @@ -769,6 +769,41 @@ int main(int argc, char **argv) int pkgmgr_installer_get_debug_mode(pkgmgr_installer *pi); /** + @brief Get skip_check_reference value + @pre pkgmgr_installer_receive_request() must be called. + @post None + @see pkgmgr_installer_receive_request + @param[in] pi pkgmgr_installer object + @return Operation result + @retval 0 if a request does not skip checking reference + @retval 1 if a request skip checking reference + @remark None + @code +#include <pkgmgr_installer.h> +int main(int argc, char **argv) +{ + pkgmgr_installer *pi; + int r = 0; + int check_reference = 0; + + pi = pkgmgr_installer_new(); + if(!pi) return -1; + if(pkgmgr_installer_receive_request(pi, argc, argv)) { + r = -1; + goto CLEANUP_RET; + } + check_reference = pkgmgr_installer_get_skip_check_reference(pi); + + // Do something... + + pkgmgr_installer_free(pi); + return r; +} + @endcode +*/ +int pkgmgr_installer_get_skip_check_reference(pkgmgr_installer *pi); + +/** @brief Send a app status signal @pre None @post None |