summaryrefslogtreecommitdiff
path: root/installer
diff options
context:
space:
mode:
authorSangyoon Jang <jeremy.jang@samsung.com>2017-07-19 12:21:07 +0900
committerSangyoon Jang <jeremy.jang@samsung.com>2017-07-25 15:35:36 +0900
commit5b51612297057db436d781dd58a0d45329f9029c (patch)
tree30713e1ee81ccff9679e668d4c1f5b208698c959 /installer
parentdfee13dcf7a390e88d497ed8ab6c7d388f9cc265 (diff)
downloadslp-pkgmgr-5b51612297057db436d781dd58a0d45329f9029c.tar.gz
slp-pkgmgr-5b51612297057db436d781dd58a0d45329f9029c.tar.bz2
slp-pkgmgr-5b51612297057db436d781dd58a0d45329f9029c.zip
Add a new installer option
Change-Id: I21c2b3ad905e2eb3ae27b7ead4aac12d89db21db Signed-off-by: Sangyoon Jang <jeremy.jang@samsung.com>
Diffstat (limited to 'installer')
-rw-r--r--installer/pkgmgr_installer.c12
-rw-r--r--installer/pkgmgr_installer.h35
2 files changed, 47 insertions, 0 deletions
diff --git a/installer/pkgmgr_installer.c b/installer/pkgmgr_installer.c
index e9a0aa7..fc4950a 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";
@@ -87,6 +88,7 @@ const struct option long_opts[] = {
{ "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 },
+ { "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;
};
@@ -421,6 +424,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);
@@ -715,6 +721,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 73ffbd3..c0ca9a2 100644
--- a/installer/pkgmgr_installer.h
+++ b/installer/pkgmgr_installer.h
@@ -698,6 +698,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