Only pkgid is needed.
Requires:
- https://review.tizen.org/gerrit/55079
Change-Id: Idf7cee0d476e5a193868833249ed43662166927c
char *tep_path;
int tep_move;
int is_tep_included;
- char *directory_path;
- char *xml_path;
GDBusConnection *conn;
};
free(pi->caller_pkgid);
if (pi->tep_path)
free(pi->tep_path);
- if (pi->xml_path)
- free(pi->xml_path);
- if (pi->directory_path)
- free(pi->directory_path);
if (pi->conn) {
g_dbus_connection_flush_sync(pi->conn, NULL, NULL);
pi->optional_data = strndup(optarg, MAX_STRLEN);
break;
- case 'y': /* directory path*/
+ case 'y': /* pkgid for direct manifest installation */
+ mode = 'y';
pi->request_type = PKGMGR_REQ_MANIFEST_DIRECT_INSTALL;
- pi->directory_path = strndup(optarg, MAX_STRLEN);
- break;
-
- case 'x': /* xml path*/
- pi->xml_path = strndup(optarg, MAX_STRLEN);
+ pi->pkgmgr_info = strndup(optarg, MAX_STRLEN);
break;
/* Otherwise */
return pi->pkgmgr_info;
}
-API const char *pkgmgr_installer_get_directory_path(pkgmgr_installer *pi)
-{
- CHK_PI_RET(PKGMGR_REQ_INVALID);
- return pi->directory_path;
-}
-
-API const char *pkgmgr_installer_get_xml_path(pkgmgr_installer *pi)
-{
- CHK_PI_RET(PKGMGR_REQ_INVALID);
- return pi->xml_path;
-}
-
API const char *pkgmgr_installer_get_tep_path(pkgmgr_installer *pi)
{
CHK_PI_RET(PKGMGR_REQ_INVALID);
const char *pkgmgr_installer_get_request_info(pkgmgr_installer *pi);
/**
- @brief Get directory path
- @pre pkgmgr_installer_receive_request() must be called.
- @post None
- @see pkgmgr_installer_receive_request
- @param[in] pi pkgmgr_installer object
- @return Directory path if passed
- @retval NULL on function failure
- @remark Returned string must not be modified.
- @code
-#include <pkgmgr_installer.h>
-int main(int argc, char **argv)
-{
- pkgmgr_installer *pi;
- int r = 0;
- char *dir_path = NULL;
-
- pi = pkgmgr_installer_new();
- if(!pi) return -1;
- if(pkgmgr_installer_receive_request(pi, argc, argv)) {
- r = -1;
- goto CLEANUP_RET;
- }
- dir_path = (char *) pkgmgr_installer_get_directory_path(pi);
-
- // Do something...
-
- pkgmgr_installer_free(pi);
- return r;
-}
- @endcode
- */
-const char *pkgmgr_installer_get_directory_path(pkgmgr_installer *pi);
-
-/**
- @brief Get xml path
- @pre pkgmgr_installer_receive_request() must be called.
- @post None
- @see pkgmgr_installer_receive_request
- @param[in] pi pkgmgr_installer object
- @return XML path if passed
- @retval NULL on function failure
- @remark Returned string must not be modified.
- @code
-#include <pkgmgr_installer.h>
-int main(int argc, char **argv)
-{
- pkgmgr_installer *pi;
- int r = 0;
- char *xml_path = NULL;
-
- pi = pkgmgr_installer_new();
- if(!pi) return -1;
- if(pkgmgr_installer_receive_request(pi, argc, argv)) {
- r = -1;
- goto CLEANUP_RET;
- }
- xml_path = (char *) pkgmgr_installer_get_xml_path(pi);
-
- // Do something...
-
- pkgmgr_installer_free(pi);
- return r;
-}
- @endcode
- */
-const char *pkgmgr_installer_get_xml_path(pkgmgr_installer *pi);
-
-/**
@brief Get TEP path
@pre pkgmgr_installer_receive_request() must be called.
@post None
#endif
/* Supported options */
-const char *short_opts = "k:l:i:d:c:m:t:o:r:p:s:e:M:y:x:q";
+const char *short_opts = "k:l:i:d:c:m:t:o:r:p:s:e:M:y:q";
const struct option long_opts[] = {
{ "session-id", 1, NULL, 'k' },
{ "license-path", 1, NULL, 'l' },
{ "tep-path", 1, NULL, 'e' },
{ "tep-move", 1, NULL, 'M' },
{ "smack", 1, NULL, 's' },
- { "directory", 1, NULL, 'y' },
- { "xml-path", 1, NULL, 'x' },
+ { "direct-manifest-install", 1, NULL, 'y' },
{ 0, 0, 0, 0 } /* sentinel */
};