Clean scriplet 'post' section.
authorAdam Malinowski <a.malinowsk2@samsung.com>
Thu, 30 Jan 2014 10:12:04 +0000 (11:12 +0100)
committerKrzysztof Jackiewicz <k.jackiewicz@samsung.com>
Wed, 5 Feb 2014 10:50:13 +0000 (11:50 +0100)
[Issue#]       SSDWSSP-531
[Feature]      Removes unneeded file operations from 'post section'.
[Cause]        Post section is intended for file operations.
[Solution]     Unneeded operations are removed, other are moved to 'install'
               and 'files' sections. Details are placed in CAM project.
[Verification] Two ways:
               - build packages, install them on target and run tests,
               - build image with previously built packages and run tests

Change-Id: I51ccc3dbb8a9b45c3b2da224470b60e2cc830d58

Conflicts:

packaging/libprivilege-control.spec

packaging/libprivilege-control.spec

index 92d9aaa..e675523 100644 (file)
@@ -54,16 +54,11 @@ mkdir -p %{buildroot}/usr/share/privilege-control/
 
 mkdir -p %{buildroot}/usr/lib/systemd/system/multi-user.target.wants
 ln -sf /usr/lib/systemd/system/smack-rules.service %{buildroot}/usr/lib/systemd/system/multi-user.target.wants/smack-rules.service
+mkdir -p %{buildroot}/opt/dbspace
 
 %post
 /sbin/ldconfig
 
-if [ ! -e "/opt/dbspace" ]
-then
-    mkdir -p /opt/dbspace
-    chmod 775 /opt/dbspace
-fi
-
 /usr/share/privilege-control/db/updater.sh
 
 %postun -p /sbin/ldconfig
@@ -91,6 +86,7 @@ api_feature_loader --verbose --rules=/usr/share/privilege-control/ADDITIONAL_RUL
 /usr/share/privilege-control/db/updates/*
 /usr/share/privilege-control/db/load-rules-db.sql
 /etc/opt/upgrade/220.libprivilege-updater.patch.sh
+%attr(755, root, root) %dir /opt/dbspace
 
 %files conf
 %manifest %{name}.manifest