From: Michael Ho <michael...@bmw.de>

The OpkgPM class has several constructor options that allows for skipping
the ipk repository set up and controlling the ipk repository directory. This
commit exposes these option via the OpkgRootfs class so others can make use
of them if they wish to.

Adds the bitbake variables "IPKGREPO_TARGET_PREPARED" and "IPKGREPO_TARGET"
to act as the interfaces.

Signed-off-by: Michael Ho <michael...@bmw.de>
---
 meta/lib/oe/package_manager/ipk/rootfs.py | 14 ++++++++++++--
 1 file changed, 12 insertions(+), 2 deletions(-)

diff --git a/meta/lib/oe/package_manager/ipk/rootfs.py 
b/meta/lib/oe/package_manager/ipk/rootfs.py
index 26dbee6..6313b72 100644
--- a/meta/lib/oe/package_manager/ipk/rootfs.py
+++ b/meta/lib/oe/package_manager/ipk/rootfs.py
@@ -129,6 +129,14 @@ class PkgRootfs(DpkgOpkgRootfs):
         self.manifest = PkgManifest(d, manifest_dir)
         self.opkg_conf = self.d.getVar("IPKGCONF_TARGET")
         self.pkg_archs = self.d.getVar("ALL_MULTILIB_PACKAGE_ARCHS")
+        self.opkg_repo = self.d.getVar("IPKGREPO_TARGET")
+        self.opkg_repo_prepared = self.d.getVar("IPKGREPO_TARGET_PREPARED")
+
+        kwargs = {}
+        if self.opkg_repo:
+            kwargs["ipk_repo_workdir"] = self.opkg_repo
+        if self.opkg_repo_prepared:
+            kwargs["prepare_index"] = False
 
         self.inc_opkg_image_gen = self.d.getVar('INC_IPK_IMAGE_GEN') or ""
         if self._remove_old_rootfs():
@@ -136,12 +144,14 @@ class PkgRootfs(DpkgOpkgRootfs):
             self.pm = OpkgPM(d,
                              self.image_rootfs,
                              self.opkg_conf,
-                             self.pkg_archs)
+                             self.pkg_archs,
+                             **kwargs)
         else:
             self.pm = OpkgPM(d,
                              self.image_rootfs,
                              self.opkg_conf,
-                             self.pkg_archs)
+                             self.pkg_archs,
+                             **kwargs)
             self.pm.recover_packaging_data()
 
         bb.utils.remove(self.d.getVar('MULTILIB_TEMP_ROOTFS'), True)
-- 
2.7.4

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#147685): 
https://lists.openembedded.org/g/openembedded-core/message/147685
Mute This Topic: https://lists.openembedded.org/mt/80401750/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to