package_ipk: allow to specify OPKG_ARGS in local.conf
PATCH 1/1 package_ipk: allow to specify OPKG_ARGS in local.conf
If user specific parameters to opkg are set in local.conf, they are rewritten in package_ipk.bbclass and ignored, instead append package_ipk specific arguments to the user defined ones.
The change is needed, if a user has to pass an alternative path to a temporary directory for opkg, e.g.
OPKG_ARGS = "--tmp-dir=${TOPDIR}/tmp-opkg"The default /tmp directory may be unusable for do_rootfs task, for example if there is no enough space or /tmp is mounted with noexec mount option, then an alternative path allows to complete do_rootfs and fix the problems like this:
ERROR: Unable to install packages.
...
sh: /tmp/opkg-5jPLag/run-postinsts-UsUtaI/preinst: /bin/sh: bad interpreter: Permission denied
sh: /tmp/opkg-5jPLag/base-files-4hFwQS/preinst: /bin/sh: bad interpreter: Permission denied
sh: /tmp/opkg-5jPLag/run-postinsts-UsUtaI/preinst: /bin/sh: bad interpreter: Permission denied
sh: /tmp/opkg-5jPLag/busybox-syslog-sJmfbw/preinst: /bin/sh: bad interpreter: Permission denied
...
--- meta/classes/package_ipk.bbclass | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
meta/classes/package_ipk.bbclass +1 -1
@@ -10,7 +10,7 @@ PKGWRITEDIRIPK = "${WORKDIR}/deploy-ipks" # Program to be used to build opkg packages OPKGBUILDCMD ??= "opkg-build" -OPKG_ARGS = "--force_postinstall --prefer-arch-to-version" +OPKG_ARGS += "--force_postinstall --prefer-arch-to-version" OPKG_ARGS += "${@['', '--no-install-recommends'][d.getVar("NO_RECOMMENDATIONS", True) == "1"]}" OPKG_ARGS += "${@['', '--add-exclude ' + ' --add-exclude '.join((d.getVar('PACKAGE_EXCLUDE', True) or "").split())][(d.getVar("PACKAGE_EXCLUDE", True) or "") != ""]}"
Signature · 1 line
2.1.4
I think this is a wrong list, resent the change for review to openembedded-core.
With best wishes,
Vladimir
Quoted 41 lines · Vladimir Zapolskiy
If user specific parameters to opkg are set in local.conf, they are rewritten in package_ipk.bbclass and ignored, instead append
package_ipkspecific arguments to the user defined ones.The change is needed, if a user has to pass an alternative path to a temporary directory for opkg, e.g.
OPKG_ARGS = "--tmp-dir=${TOPDIR}/tmp-opkg"The default /tmp directory may be unusable for
do_rootfstask, for example if there is no enough space or /tmp is mounted with noexec mount option, then an alternative path allows to completedo_rootfsand fix the problems like this:ERROR: Unable to install packages.
...
sh:/tmp/opkg-5jPLag/run-postinsts-UsUtaI/preinst:/bin/sh: bad interpreter: Permission denied
sh:/tmp/opkg-5jPLag/base-files-4hFwQS/preinst:/bin/sh: bad interpreter: Permission denied
sh:/tmp/opkg-5jPLag/run-postinsts-UsUtaI/preinst:/bin/sh: bad interpreter: Permission denied
sh:/tmp/opkg-5jPLag/busybox-syslog-sJmfbw/preinst:/bin/sh: bad interpreter: Permission denied
...Signed-off-by Vladimir Zapolskiy <[email protected]>--- meta/classes/package_ipk.bbclass | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)meta/classes/package_ipk.bbclass +1
-1@@ -10,7 +10,7 @@ PKGWRITEDIRIPK = "${WORKDIR}/deploy-ipks" # Program to be used to build opkg packages OPKGBUILDCMD ??= "opkg-build" -OPKG_ARGS = "--force_postinstall --prefer-arch-to-version" +OPKG_ARGS += "--force_postinstall --prefer-arch-to-version" OPKG_ARGS += "${@['', '--no-install-recommends'][d.getVar("NO_RECOMMENDATIONS", True) == "1"]}" OPKG_ARGS += "${@['', '--add-exclude ' + ' --add-exclude '.join((d.getVar('PACKAGE_EXCLUDE', True) or "").split())][(d.getVar("PACKAGE_EXCLUDE", True) or "") != ""]}"