Fix wrong script
authorChengwei Yang <chengwei.yang@intel.com>
Wed, 19 Dec 2012 01:23:00 +0000 (09:23 +0800)
committerChengwei Yang <chengwei.yang@intel.com>
Wed, 19 Dec 2012 01:23:00 +0000 (09:23 +0800)
In general, the %{buildroot} will expand to the build root as its name
suggested, this is useful at %install but not scriptlet.

And so the mistake will cause create a directory like below
/opt/home/abuild/rpmbuild/BUILDROOT/msg-service-0.9.2-4.7.i386/opt/usr/dbspace

That's not what we want and it should be /opt/usr/dbspace in fact.

Change-Id: I438fb577ad7479b97800a0056f143ae8e7d5a46e
Signed-off-by: Chengwei Yang <chengwei.yang@intel.com>
packaging/msg-service.spec

index 86c2481..4914c02 100755 (executable)
@@ -127,7 +127,7 @@ mkdir -p %{buildroot}/opt/usr/data/msg-service
 
 if [ ! -f /opt/usr/dbspace/.msg_service.db ]
 then
-    mkdir -p %{buildroot}/opt/usr/dbspace/
+    mkdir -p /opt/usr/dbspace/
     sqlite3 /opt/usr/dbspace/.msg_service.db "PRAGMA journal_mode = PERSIST;
 
     CREATE TABLE MSG_CONVERSATION_TABLE (