From: Ming Liu <[email protected]>

There are several flaws need fixing them:
- The "/etc/opkg" should be "etc/opkg" when being passed to os.path.join
- /etc/opkg directory does not exist in image rootfs, need create it.
- There is a "\n" missing when writing path to feed conf file.

Signed-off-by: Ming Liu <[email protected]>
---
 meta/lib/oe/package_manager.py | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/meta/lib/oe/package_manager.py b/meta/lib/oe/package_manager.py
index f92f2b3..5d57563 100644
--- a/meta/lib/oe/package_manager.py
+++ b/meta/lib/oe/package_manager.py
@@ -1662,14 +1662,12 @@ class OpkgPM(OpkgDpkgPM):
             NOTE: Development-helper feature, NOT a full-fledged feed.
             """
             if (self.d.getVar('FEED_DEPLOYDIR_BASE_URI') or "") != "":
+                cfg_dir_name = os.path.join(self.target_rootfs, "etc/opkg")
+                bb.utils.mkdirhier(cfg_dir_name)
                 for arch in self.pkg_archs.split():
-                    cfg_file_name = os.path.join(self.target_rootfs,
-                                                 self.d.getVar("sysconfdir"),
-                                                 "opkg",
-                                                 "local-%s-feed.conf" % arch)
-
+                    cfg_file_name = os.path.join(cfg_dir_name, 
"local-%s-feed.conf" % arch)
                     with open(cfg_file_name, "w+") as cfg_file:
-                        cfg_file.write("src/gz local-%s %s/%s" %
+                        cfg_file.write("src/gz local-%s %s/%s\n" %
                                        (arch,
                                         
self.d.getVar('FEED_DEPLOYDIR_BASE_URI'),
                                         arch))
-- 
1.9.1

-- 
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core

Reply via email to