<div dir="ltr"><div style="font-size:12.8px">According to the documentation, setting FEED_DEPLOYDIR_BASE_URI should</div><div style="font-size:12.8px">be sufficient for setting up local feeds. This commit fixes the</div><div style="font-size:12.8px">implementation to actually do that, even if BUILD_IMAGES_FROM_FEEDS is</div><div style="font-size:12.8px">not set.</div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">Also fix some bugs in the old implementation:</div><div style="font-size:12.8px"> - Fetch uncompressed Packages files, because</div><div style="font-size:12.8px">   &#39;bitbake package-index&#39; does not appear to create Packages.gz files.</div><div style="font-size:12.8px"> - Add missing newline after the URI so that the options don&#39;t end up on</div><div style="font-size:12.8px">   the same line.</div><div style="font-size:12.8px"> - Fix the check when local options are necessary.</div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">Signed-off-by: Reinhard Tartler &lt;<a href="mailto:tartler@deshaw.com" target="_blank">tartler@deshaw.com</a>&gt;</div><div style="font-size:12.8px">---</div><div style="font-size:12.8px"> meta/lib/oe/package_manager.p<wbr>y | 59 +++++++++++++++++++++++-------<wbr>------------</div><div style="font-size:12.8px"> 1 file changed, 32 insertions(+), 27 deletions(-)</div><div style="font-size:12.8px"><div>diff --git a/meta/lib/oe/package_manager.<wbr>py b/meta/lib/oe/package_manager.<wbr>py</div><div>index 2802254..e92bbbd 100644</div><div>--- a/meta/lib/oe/package_manager.<wbr>py</div><div>+++ b/meta/lib/oe/package_manager.<wbr>py</div><div>@@ -1649,33 +1649,36 @@ class OpkgPM(OpkgDpkgPM):</div><div> </div><div>                     config_file.write(&quot;src/gz %s %s\n&quot; % (feed_name, feed_uri))</div><div> </div><div>-            &quot;&quot;&quot;</div><div>-            Allow to use package deploy directory contents as quick devel-testing</div><div>-            feed. This creates individual feed configs for each arch subdir of those</div><div>-            specified as compatible for the current machine.</div><div>-            NOTE: Development-helper feature, NOT a full-fledged feed.</div><div>-            &quot;&quot;&quot;</div><div>-            if (self.d.getVar(&#39;FEED_DEPLOYDIR<wbr>_BASE_URI&#39;, True) or &quot;&quot;) != &quot;&quot;:</div><div>-                for arch in self.pkg_archs.split():</div><div>-                    cfg_file_name = os.path.join(self.target_rootf<wbr>s,</div><div>-                                                 self.d.getVar(&quot;sysconfdir&quot;, True),</div><div>-                                                 &quot;opkg&quot;,</div><div>-                                                 &quot;local-%s-feed.conf&quot; % arch)</div><div>-</div><div>-                    with open(cfg_file_name, &quot;w+&quot;) as cfg_file:</div><div>-                        cfg_file.write(&quot;src/gz local-%s %s/%s&quot; %</div><div>-                                       (arch,</div><div>-                                        self.d.getVar(&#39;FEED_DEPLOYDIR<wbr>_BASE_URI&#39;, True),</div><div>-                                        arch))</div><div>-</div><div>-                        if self.opkg_dir != &#39;/var/lib/opkg&#39;:</div><div>-                            # There is no command line option for this anymore, we need to add</div><div>-                            # info_dir and status_file to config file, if OPKGLIBDIR doesn&#39;t have</div><div>-                            # the default value of &quot;/var/lib&quot; as defined in opkg:</div><div>-                            # libopkg/opkg_conf.h:#define OPKG_CONF_DEFAULT_INFO_DIR      &quot;/var/lib/opkg/info&quot;</div><div>-                            # libopkg/opkg_conf.h:#define OPKG_CONF_DEFAULT_STATUS_FILE   &quot;/var/lib/opkg/status&quot;</div><div>-                            cfg_file.write(&quot;option info_dir     %s\n&quot; % os.path.join(self.d.getVar(&#39;OP<wbr>KGLIBDIR&#39;, True), &#39;opkg&#39;, &#39;info&#39;))</div><div>-                            cfg_file.write(&quot;option status_file  %s\n&quot; % os.path.join(self.d.getVar(&#39;OP<wbr>KGLIBDIR&#39;, True), &#39;opkg&#39;, &#39;status&#39;))</div><div>+        self._setup_devel_feeds()</div><div>+</div><div>+    def _setup_devel_feeds(self):</div><div>+        &quot;&quot;&quot;</div><div>+        Allow to use package deploy directory contents as quick devel-testing</div><div>+        feed. This creates individual feed configs for each arch subdir of those</div><div>+        specified as compatible for the current machine.</div><div>+        NOTE: Development-helper feature, NOT a full-fledged feed.</div><div>+        &quot;&quot;&quot;</div><div>+</div><div>+        if (self.d.getVar(&#39;FEED_DEPLOYDIR<wbr>_BASE_URI&#39;, True) or &quot;&quot;) != &quot;&quot;:</div><div>+            for arch in self.pkg_archs.split():</div><div>+                cfg_file_name = os.path.join(self.target_rootf<wbr>s + self.d.getVar(&quot;sysconfdir&quot;, True),</div><div>+                                       &quot;opkg&quot;, &quot;local-%s-feed.conf&quot; % arch)</div><div>+</div><div>+                bb.utils.mkdirhier(os.path.di<wbr>rname(cfg_file_name))</div><div>+                with open(cfg_file_name, &quot;w+&quot;) as cfg_file:</div><div>+                    cfg_file.write(&quot;src local-%s %s/%s\n&quot; %</div><div>+                                   (arch,</div><div>+                                    self.d.getVar(&#39;FEED_DEPLOYDIR<wbr>_BASE_URI&#39;, True),</div><div>+                                    arch))</div><div>+</div><div>+                    if self.opkg_dir != self.target_rootfs + &#39;/var/lib/opkg&#39;:</div><div>+                        # There is no command line option for this anymore, we need to add</div><div>+                        # info_dir and status_file to config file, if OPKGLIBDIR doesn&#39;t have</div><div>+                        # the default value of &quot;/var/lib&quot; as defined in opkg:</div><div>+                        # libopkg/opkg_conf.h:#define OPKG_CONF_DEFAULT_INFO_DIR      &quot;/var/lib/opkg/info&quot;</div><div>+                        # libopkg/opkg_conf.h:#define OPKG_CONF_DEFAULT_STATUS_FILE   &quot;/var/lib/opkg/status&quot;</div><div>+                        cfg_file.write(&quot;option info_dir     %s\n&quot; % os.path.join(self.d.getVar(&#39;OP<wbr>KGLIBDIR&#39;, True), &#39;opkg&#39;, &#39;info&#39;))</div><div>+                        cfg_file.write(&quot;option status_file  %s\n&quot; % os.path.join(self.d.getVar(&#39;OP<wbr>KGLIBDIR&#39;, True), &#39;opkg&#39;, &#39;status&#39;))</div><div>      def _create_config(self):</div><div>@@ -1702,6 +1705,8 @@ class OpkgPM(OpkgDpkgPM):</div><div>                 config_file.write(&quot;option info_dir     %s\n&quot; % os.path.join(self.d.getVar(&#39;OP<wbr>KGLIBDIR&#39;, True), &#39;opkg&#39;, &#39;info&#39;))</div><div>                 config_file.write(&quot;option status_file  %s\n&quot; % os.path.join(self.d.getVar(&#39;OP<wbr>KGLIBDIR&#39;, True), &#39;opkg&#39;, &#39;status&#39;))</div><div> </div><div>+        self._setup_devel_feeds()</div><div>+</div><div>     def insert_feeds_uris(self):</div><div>         if self.feed_uris == &quot;&quot;:</div><div>             return</div><div style="margin:2px 0px 0px"><img src="https://ssl.gstatic.com/ui/v1/icons/mail/images/cleardot.gif" class="gmail-CToWUd"></div><div class="gmail-yj6qo gmail-ajU" style="margin:2px 0px 0px"><div id="gmail-:18s" class="gmail-ajR" tabindex="0"><img class="gmail-ajT" src="https://ssl.gstatic.com/ui/v1/icons/mail/images/cleardot.gif"></div></div><span class="gmail-HOEnZb gmail-adL"><font color="#888888"><font color="#888888"><div style="font-size:12.8px">-- </div><div style="font-size:12.8px">2.7.1</div></font></font></span></div></div>