]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core.git/commitdiff
opkg: Set correct info_dir and status_file in opkg.conf
authorHarald Seiler <hws@denx.de>
Thu, 24 Nov 2022 10:52:59 +0000 (11:52 +0100)
committerSteve Sakoman <steve@sakoman.com>
Thu, 15 Dec 2022 02:29:09 +0000 (16:29 -1000)
Distros can customize the location of OPKG data using OPKGLIBDIR.  In
OE-Core commit 11f1956cf5d7 ("package_manager.py: define info_dir and
status_file when OPKGLIBDIR isn't the default"), a fix was applied to
correctly set the info_dir and status_file options relative to
OPKGLIBDIR.

However, as the commit message notes, the opkg.conf file deployed as
part of the opkg package must also be adjusted to correctly reflect the
changed location.  Otherwise, opkg running inside the image cannot find
its data.

Fix this by also setting the info_dir and status_file options in
opkg.conf to the correct location relative to OPKGLIBDIR.

Fixes: 11f1956cf5d7 ("package_manager.py: define info_dir and status_file when OPKGLIBDIR isn't the default")
Signed-off-by: Harald Seiler <hws@denx.de>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
(cherry picked from commit adb939ae3635de6e02208859fbf29cf0ed39f565)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
meta/recipes-devtools/opkg/opkg_0.6.0.bb

index 4cd589cd29e4ec1a05b7a64a7b1d785128ed7cbf..53c73999294a1431bf89db6d6d1998c05c1893e1 100644 (file)
@@ -47,7 +47,9 @@ EXTRA_OECONF:class-native = "--localstatedir=/${@os.path.relpath('${localstatedi
 do_install:append () {
        install -d ${D}${sysconfdir}/opkg
        install -m 0644 ${WORKDIR}/opkg.conf ${D}${sysconfdir}/opkg/opkg.conf
-       echo "option lists_dir ${OPKGLIBDIR}/opkg/lists" >>${D}${sysconfdir}/opkg/opkg.conf
+       echo "option lists_dir   ${OPKGLIBDIR}/opkg/lists"  >>${D}${sysconfdir}/opkg/opkg.conf
+       echo "option info_dir    ${OPKGLIBDIR}/opkg/info"   >>${D}${sysconfdir}/opkg/opkg.conf
+       echo "option status_file ${OPKGLIBDIR}/opkg/status" >>${D}${sysconfdir}/opkg/opkg.conf
 
        # We need to create the lock directory
        install -d ${D}${OPKGLIBDIR}/opkg