aboutsummaryrefslogtreecommitdiffstats
path: root/meta-application-manager/recipes-application-framework/pkgmgr-info/pkgmgr-info/0002-pkgmgr-info-journal-perser-db.patch
blob: 87fb4a59b428e739314b73de3f0bd993661ddb80 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
--- a/parser/pkgmgr_parser_db.c
+++ b/parser/pkgmgr_parser_db.c
@@ -2198,15 +2198,21 @@
 		ret = chown(files[i], uid, userinfo->pw_gid);
 		SET_SMACK_LABEL(files[i],uid)
 		if (ret == -1) {
+			if (files[i] == journal_file && errno == ENOENT)
+				continue;
 			strerror_r(errno, buf, sizeof(buf));
-			_LOGD("FAIL : chown %s %d.%d, because %s", db_file, uid, userinfo->pw_gid, buf);
+			//_LOGD("FAIL : chown %s %d.%d, because %s", db_file, uid, userinfo->pw_gid, buf);
+			_LOGD("FAIL : chown %s %d.%d, because %s", files[i], uid, userinfo->pw_gid, buf);
 			return -1;
 		}
 
 		ret = chmod(files[i], S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH);
 		if (ret == -1) {
+			if (files[i] == journal_file && errno == ENOENT)
+				continue;
 			strerror_r(errno, buf, sizeof(buf));
-			_LOGD("FAIL : chmod %s 0664, because %s", db_file, buf);
+			//_LOGD("FAIL : chmod %s 0664, because %s", db_file, buf);
+			_LOGD("FAIL : chmod %s 0664, because %s", files[i], buf);
 			return -1;
 		}
 	}