]> code.ossystems Code Review - openembedded-core.git/commitdiff
opkg/package/rootfs_ipk: allow overwriting OPKGLIBDIR
authorAdrian Ratiu <adrian.ratiu@collabora.com>
Tue, 16 Jul 2019 21:55:58 +0000 (00:55 +0300)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 17 Jul 2019 18:23:20 +0000 (19:23 +0100)
Some distributions for various reasons (like for example mounting a
tmpfs over /var at runtime) can't use /var/lib to store the opkg
metadata, so a different path is required to have a functioning
package manager.

${localstatedir} can't be modified to something other than the
hardcoded value in bitbake.conf because other recipes depending on it
will fail to install.

So the only recourse, which is also the least invasive, is to allow
distros to overwrite the OPKGLIBDIR variable just like they are also
allowed to overwrite OPKGBUILDCMD.

Signed-off-by: Adrian Ratiu <adrian.ratiu@collabora.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/package_ipk.bbclass
meta/classes/rootfs_ipk.bbclass
meta/recipes-devtools/opkg/opkg_0.4.1.bb

index d1b317b42bb70986d08d20720fefced0416ebf72..9f9da2f91deb361edd678118a6f16376e04e6a68 100644 (file)
@@ -14,7 +14,7 @@ OPKG_ARGS += "--force_postinstall --prefer-arch-to-version"
 OPKG_ARGS += "${@['', '--no-install-recommends'][d.getVar("NO_RECOMMENDATIONS") == "1"]}"
 OPKG_ARGS += "${@['', '--add-exclude ' + ' --add-exclude '.join((d.getVar('PACKAGE_EXCLUDE') or "").split())][(d.getVar("PACKAGE_EXCLUDE") or "").strip() != ""]}"
 
-OPKGLIBDIR = "${localstatedir}/lib"
+OPKGLIBDIR ??= "${localstatedir}/lib"
 
 python do_package_ipk () {
     workdir = d.getVar('WORKDIR')
index aabc370cfce9c63a4ebd2c93797b059459f7e2cd..e73d2bfdae86a46d29a4c7037312aa804810d5ef 100644 (file)
@@ -21,7 +21,7 @@ OPKG_PREPROCESS_COMMANDS = ""
 
 OPKG_POSTPROCESS_COMMANDS = ""
 
-OPKGLIBDIR = "${localstatedir}/lib"
+OPKGLIBDIR ??= "${localstatedir}/lib"
 
 MULTILIBRE_ALLOW_REP = "${OPKGLIBDIR}/opkg|/usr/lib/opkg"
 
index 663eaec346e59f3fe9be24703c5e4799cebad08f..62708628994cc8d089a19120af84bc14e0f970e3 100644 (file)
@@ -28,7 +28,7 @@ PACKAGES =+ "libopkg"
 inherit autotools pkgconfig systemd ptest
 
 target_localstatedir := "${localstatedir}"
-OPKGLIBDIR = "${target_localstatedir}/lib"
+OPKGLIBDIR ??= "${target_localstatedir}/lib"
 
 PACKAGECONFIG ??= "libsolv"