]> code.ossystems Code Review - openembedded-core.git/commit
rpm: fix nativesdk's default var location
authorChen Qi <Qi.Chen@windriver.com>
Thu, 16 Jul 2020 06:56:32 +0000 (14:56 +0800)
committerSteve Sakoman <steve@sakoman.com>
Thu, 23 Jul 2020 14:07:37 +0000 (04:07 -1000)
commit4e0d1bdc6e896c7dedccf615d6d0da9eb91d9b1d
tree7f5ac91567f0e26065503521018cebacc2bbdcb2
parent66f9db48bb9d59f08492f0515bc08b6b039aa03f
rpm: fix nativesdk's default var location

For now, the nativesdk-rpm's %_var in /usr/lib/rpm/macros is
'/var'. This is causing error when running `rpm -qplv A.rpm'.

   error: cannot open Packages index using db5 - Permission denied (13)
   error: cannot open Packages database in /var/lib/rpm

The rpm in SDK should be using its own database. So we should remove
this configure option, letting the SDK's native sysroot prefix to be
there in %_var. In fact, '%_usr' in macros has already got the prefix.
After this change, we have in the macros file lines like below.

"""
%_usr                   /opt/windriver/wrlinux/20.29/sysroots/x86_64-wrlinuxsdk-linux/usr
%_usrsrc                %{_usr}/src
%_var                   /opt/windriver/wrlinux/20.29/sysroots/x86_64-wrlinuxsdk-linux/var
"""

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 13e17930062cb3f816516ba7dbeb70d6da7174dd)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
meta/recipes-devtools/rpm/rpm_4.14.2.1.bb