diff options
author | Adrian Ratiu <adrian.ratiu@collabora.com> | 2019-07-17 00:55:58 +0300 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2019-07-17 19:25:02 +0100 |
commit | 897483147f307aae627cf200d492aaff3b4bbef4 (patch) | |
tree | 715f2fb1a91fb58d8437495d1ff59f70d1ef6f61 | |
parent | ab5a665612622f1106b37d1610ce5126aeabcb4c (diff) | |
download | poky-897483147f307aae627cf200d492aaff3b4bbef4.tar.gz |
opkg/package/rootfs_ipk: allow overwriting OPKGLIBDIR
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.
(From OE-Core rev: 81eae383c287ad2e74321345c5eba862d5704cc4)
Signed-off-by: Adrian Ratiu <adrian.ratiu@collabora.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | meta/classes/package_ipk.bbclass | 2 | ||||
-rw-r--r-- | meta/classes/rootfs_ipk.bbclass | 2 | ||||
-rw-r--r-- | meta/recipes-devtools/opkg/opkg_0.4.1.bb | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/meta/classes/package_ipk.bbclass b/meta/classes/package_ipk.bbclass index d1b317b42b..9f9da2f91d 100644 --- a/meta/classes/package_ipk.bbclass +++ b/meta/classes/package_ipk.bbclass | |||
@@ -14,7 +14,7 @@ OPKG_ARGS += "--force_postinstall --prefer-arch-to-version" | |||
14 | OPKG_ARGS += "${@['', '--no-install-recommends'][d.getVar("NO_RECOMMENDATIONS") == "1"]}" | 14 | OPKG_ARGS += "${@['', '--no-install-recommends'][d.getVar("NO_RECOMMENDATIONS") == "1"]}" |
15 | OPKG_ARGS += "${@['', '--add-exclude ' + ' --add-exclude '.join((d.getVar('PACKAGE_EXCLUDE') or "").split())][(d.getVar("PACKAGE_EXCLUDE") or "").strip() != ""]}" | 15 | OPKG_ARGS += "${@['', '--add-exclude ' + ' --add-exclude '.join((d.getVar('PACKAGE_EXCLUDE') or "").split())][(d.getVar("PACKAGE_EXCLUDE") or "").strip() != ""]}" |
16 | 16 | ||
17 | OPKGLIBDIR = "${localstatedir}/lib" | 17 | OPKGLIBDIR ??= "${localstatedir}/lib" |
18 | 18 | ||
19 | python do_package_ipk () { | 19 | python do_package_ipk () { |
20 | workdir = d.getVar('WORKDIR') | 20 | workdir = d.getVar('WORKDIR') |
diff --git a/meta/classes/rootfs_ipk.bbclass b/meta/classes/rootfs_ipk.bbclass index aabc370cfc..e73d2bfdae 100644 --- a/meta/classes/rootfs_ipk.bbclass +++ b/meta/classes/rootfs_ipk.bbclass | |||
@@ -21,7 +21,7 @@ OPKG_PREPROCESS_COMMANDS = "" | |||
21 | 21 | ||
22 | OPKG_POSTPROCESS_COMMANDS = "" | 22 | OPKG_POSTPROCESS_COMMANDS = "" |
23 | 23 | ||
24 | OPKGLIBDIR = "${localstatedir}/lib" | 24 | OPKGLIBDIR ??= "${localstatedir}/lib" |
25 | 25 | ||
26 | MULTILIBRE_ALLOW_REP = "${OPKGLIBDIR}/opkg|/usr/lib/opkg" | 26 | MULTILIBRE_ALLOW_REP = "${OPKGLIBDIR}/opkg|/usr/lib/opkg" |
27 | 27 | ||
diff --git a/meta/recipes-devtools/opkg/opkg_0.4.1.bb b/meta/recipes-devtools/opkg/opkg_0.4.1.bb index 663eaec346..6270862899 100644 --- a/meta/recipes-devtools/opkg/opkg_0.4.1.bb +++ b/meta/recipes-devtools/opkg/opkg_0.4.1.bb | |||
@@ -28,7 +28,7 @@ PACKAGES =+ "libopkg" | |||
28 | inherit autotools pkgconfig systemd ptest | 28 | inherit autotools pkgconfig systemd ptest |
29 | 29 | ||
30 | target_localstatedir := "${localstatedir}" | 30 | target_localstatedir := "${localstatedir}" |
31 | OPKGLIBDIR = "${target_localstatedir}/lib" | 31 | OPKGLIBDIR ??= "${target_localstatedir}/lib" |
32 | 32 | ||
33 | PACKAGECONFIG ??= "libsolv" | 33 | PACKAGECONFIG ??= "libsolv" |
34 | 34 | ||