All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] package_manager.py: fix issues when dealing with FEED_DEPLOYDIR_BASE_URI
@ 2017-01-26 13:04 liu.ming50
  2017-01-26 13:35 ` Burton, Ross
  0 siblings, 1 reply; 2+ messages in thread
From: liu.ming50 @ 2017-01-26 13:04 UTC (permalink / raw)
  To: openembedded-core; +Cc: yue.tao, Ming Liu

From: Ming Liu <peter.x.liu@external.atlascopco.com>

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 <peter.x.liu@external.atlascopco.com>
---
 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



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] package_manager.py: fix issues when dealing with FEED_DEPLOYDIR_BASE_URI
  2017-01-26 13:04 [PATCH] package_manager.py: fix issues when dealing with FEED_DEPLOYDIR_BASE_URI liu.ming50
@ 2017-01-26 13:35 ` Burton, Ross
  0 siblings, 0 replies; 2+ messages in thread
From: Burton, Ross @ 2017-01-26 13:35 UTC (permalink / raw)
  To: Ming Liu; +Cc: Yue Tao, Ming Liu, OE-core

[-- Attachment #1: Type: text/plain, Size: 1350 bytes --]

On 26 January 2017 at 13:04, <liu.ming50@gmail.com> wrote:

> @@ -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))
>

Isn't this a bad clone of the feeds generated by PACKAGE_FEED_URIS so
should be deleted entirely?

Ross

[-- Attachment #2: Type: text/html, Size: 2304 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-01-26 13:36 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-01-26 13:04 [PATCH] package_manager.py: fix issues when dealing with FEED_DEPLOYDIR_BASE_URI liu.ming50
2017-01-26 13:35 ` Burton, Ross

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.