Resolve TCT fail issue 67/46667/1 accepted/tizen/mobile/20150825.060942 accepted/tizen/tv/20150825.060955 accepted/tizen/wearable/20150825.061013 submit/tizen/20150824.142341
authorgloryj.kim <gloryj.kim@samsung.com>
Mon, 24 Aug 2015 14:22:31 +0000 (23:22 +0900)
committergloryj.kim <gloryj.kim@samsung.com>
Mon, 24 Aug 2015 14:22:31 +0000 (23:22 +0900)
Change-Id: I94fb900349460a027a81eb6492484747c53ccdf2

CMakeLists.txt
packaging/download-provider.spec
provider/download-provider-plugin-download-agent.c

index c28a912..594f00e 100755 (executable)
@@ -59,6 +59,8 @@ IF(DEFINED SUPPORT_KNOX)
        ENDIF(SUPPORT_KNOX)
 ENDIF(DEFINED SUPPORT_KNOX)
 
+ADD_DEFINITIONS(-DLIB_AGENT_PATH=\"${LIB_AGENT_PATH}\")
+
 # BUILD
 
 ADD_SUBDIRECTORY(agent)
index 3d8754d..2fd0516 100644 (file)
@@ -93,6 +93,11 @@ Description: Download the contents in background (development files)
                -DCMAKE_INSTALL_PREFIX:PATH=%{_prefix} \\\
                -DBIN_INSTALL_DIR:PATH=%{_bindir} \\\
                -DLIB_INSTALL_DIR:PATH=%{_libdir} \\\
+               %ifarch armv7l \
+               -DLIB_AGENT_PATH="/usr/lib/libdownloadagent2.so" \\\
+               %else \
+               -DLIB_AGENT_PATH="/usr/lib64/libdownloadagent2.so" \\\
+               %endif \
                -DINCLUDE_INSTALL_DIR:PATH=%{_includedir} \\\
                -DPKG_NAME=%{name} \\\
                -DPKG_VERSION=%{version} \\\
@@ -177,8 +182,9 @@ ln -s ../download-provider.socket %{buildroot}/lib/systemd/system/sockets.target
 
 %post
 #make notify dir in post section for smack
+mkdir /opt/data/download-provider
 mkdir -p %{_notifydir}
-chsmack -a 'System:Shared' %{_notifydir}                                        
+#chsmack -a 'System:Shared' %{_notifydir}                                        
 mkdir -p --mode=0700 %{_databasedir}
 #chsmack -a 'download-provider' %{_databasedir}
 mkdir -p --mode=0700 %{_database_client_dir}
index 5522510..8acfa23 100644 (file)
@@ -634,7 +634,7 @@ static dp_content_type __dp_get_content_type(const char *mime, const char *file_
 int dp_init_agent()
 {
 
-       g_da_handle = dlopen("/usr/lib/libdownloadagent2.so", RTLD_LAZY | RTLD_GLOBAL);
+       g_da_handle = dlopen(LIB_AGENT_PATH, RTLD_LAZY | RTLD_GLOBAL);
        if (!g_da_handle) {
                TRACE_ERROR("[dlopen] %s", dlerror());
                g_da_handle = NULL;