diff mbox series

[meta-swupdate] Fix parsing swupdate dependencies

Message ID 20200508151833.12104-1-ayoub.zaki@embexus.com
State Changes Requested
Headers show
Series [meta-swupdate] Fix parsing swupdate dependencies | expand

Commit Message

Ayoub Zaki May 8, 2020, 3:18 p.m. UTC
this fix building swupdate dependencies by running the configuration parser after do_configure and rely on .config that contains the effective used configuration.

Signed-off-by: Ayoub Zaki <ayoub.zaki@embexus.com>
---
 recipes-support/swupdate/swupdate.inc | 17 +++++++----------
 1 file changed, 7 insertions(+), 10 deletions(-)
diff mbox series

Patch

diff --git a/recipes-support/swupdate/swupdate.inc b/recipes-support/swupdate/swupdate.inc
index 21de272..944043a 100644
--- a/recipes-support/swupdate/swupdate.inc
+++ b/recipes-support/swupdate/swupdate.inc
@@ -74,18 +74,20 @@  EXTRA_OEMAKE += " HOSTCC="${BUILD_CC}" HOSTCXX="${BUILD_CXX}" LD="${CC}" DESTDIR
 
 DEPENDS += "kern-tools-native"
 
+do_configure () {
+    cp ${WORKDIR}/defconfig ${S}/.config
+    merge_config.sh -m .config ${@" ".join(find_cfgs(d))}
+    cml1_do_configure
+}
+
 # returns all the elements from the src uri that are .cfg files
 def find_cfgs(d):
     return [s for s in src_patches(d, True) if s.endswith('.cfg')]
 
 python () {
-    try:
-        defconfig = bb.fetch2.localpath('file://defconfig', d)
-    except bb.fetch2.FetchError:
-        return
 
     try:
-        configfile = open(defconfig)
+        configfile = open(d.getVar('S') + "/.config")
     except IOError:
         return
 
@@ -184,11 +186,6 @@  python () {
             d.setVar('SWUPDATE_SW_VERSIONS_FILE', swver_file)
 }
 
-do_configure () {
-    cp ${WORKDIR}/defconfig ${S}/.config
-    merge_config.sh -m .config ${@" ".join(find_cfgs(d))}
-    cml1_do_configure
-}
 
 do_compile() {
     unset LDFLAGS