]> code.ossystems Code Review - openembedded-core.git/commitdiff
rpm: fix nativesdk's default var location
authorChen Qi <Qi.Chen@windriver.com>
Thu, 16 Jul 2020 06:56:32 +0000 (14:56 +0800)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sat, 18 Jul 2020 10:06:28 +0000 (11:06 +0100)
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>
meta/recipes-devtools/rpm/rpm_4.15.1.bb

index cbe1acffe2c84d0d8402ed50c73a9582c61664fa..b5a0ac93820cde205fc0fd05f01b5a34acc70da0 100644 (file)
@@ -67,7 +67,7 @@ EXTRA_OECONF_append_libc-musl = " --disable-nls --disable-openmp"
 # Disable dbus for native, so that rpm doesn't attempt to inhibit shutdown via session dbus even when plugins support is enabled.
 # Also disable plugins by default for native.
 EXTRA_OECONF_append_class-native = " --sysconfdir=/etc --localstatedir=/var --disable-plugins"
-EXTRA_OECONF_append_class-nativesdk = " --sysconfdir=/etc --localstatedir=/var --disable-plugins"
+EXTRA_OECONF_append_class-nativesdk = " --sysconfdir=/etc --disable-plugins"
 
 BBCLASSEXTEND = "native nativesdk"