Explorar o código

Fix generation of systemd socket

systemd sockets names in swupdate.socket are not generated anymore. As
effect, systemd won't create the sockets, that are then created by
SWUpdate at the startup. This hides the issue, because SWUpdate acts as
fallback in case sockets are not present.

Signed-off-by: Stefano Babic <sbabic@denx.de>
Stefano Babic %!s(int64=3) %!d(string=hai) anos
pai
achega
5e611f44db
Modificáronse 1 ficheiros con 12 adicións e 8 borrados
  1. 12 8
      recipes-support/swupdate/swupdate.inc

+ 12 - 8
recipes-support/swupdate/swupdate.inc

@@ -201,17 +201,21 @@ python () {
     d.setVar('SWUPDATE_SW_VERSIONS_FILE', '/etc/sw-versions')
     for feature in features:
         if feature.startswith('CONFIG_SOCKET_CTRL_PATH='):
-            ctrl_path = feature.split('=')[1].strip()
-            d.setVar('SWUPDATE_SOCKET_CTRL_PATH', ctrl_path)
+            ctrl_path = feature.split('=')[1].strip().replace('""','')
+            if ctrl_path != "":
+               d.setVar('SWUPDATE_SOCKET_CTRL_PATH', ctrl_path)
         elif feature.startswith('CONFIG_SOCKET_PROGRESS_PATH='):
-            prog_path = feature.split('=')[1].strip()
-            d.setVar('SWUPDATE_SOCKET_PROGRESS_PATH', prog_path)
+            prog_path = feature.split('=')[1].strip().replace('""','')
+            if prog_path != "":
+               d.setVar('SWUPDATE_SOCKET_PROGRESS_PATH', prog_path)
         elif feature.startswith('CONFIG_HW_COMPATIBILITY_FILE='):
-            hwrev_file = feature.split('=')[1].strip()
-            d.setVar('SWUPDATE_HW_COMPATIBILITY_FILE', hwrev_file)
+            hwrev_file = feature.split('=')[1].strip().replace('""','')
+            if hwrev_file != "":
+               d.setVar('SWUPDATE_HW_COMPATIBILITY_FILE', hwrev_file)
         elif feature.startswith('CONFIG_SW_VERSIONS_FILE='):
-            swver_file = feature.split('=')[1].strip()
-            d.setVar('SWUPDATE_SW_VERSIONS_FILE', swver_file)
+            swver_file = feature.split('=')[1].strip().replace('""','')
+            if swver_file != "":
+               d.setVar('SWUPDATE_SW_VERSIONS_FILE', swver_file)
 }
 
 do_configure () {