Skip to content

Commit 27ab1ef

Browse files
Anantha K Rhuaqianli
authored andcommitted
refactor(iot2050-eiofsd): resolve EIO binary detection with bbappend file paths
Replace FILE_DIRNAME based path checking with bb.fetch2.Fetch() to properly resolve EIO binary locations through FILESPATH, eliminating false warnings when binaries are supplied via bbappend from downstream layers. Signed-off-by: Anantha K R <anantha.kr@siemens.com>
1 parent a815698 commit 27ab1ef

File tree

1 file changed

+11
-9
lines changed

1 file changed

+11
-9
lines changed

meta-sm/recipes-app/iot2050-eiofsd/iot2050-eiofsd_1.0.0.bb

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
# COPYING.MIT file in the top-level directory.
1010
#
1111

12-
PR = "1"
12+
PR = "2"
1313

1414
inherit dpkg-raw
1515

@@ -36,19 +36,21 @@ python () {
3636
if not src_uri_bin_str:
3737
return
3838

39-
recipe_dir = d.getVar('FILE_DIRNAME')
40-
bin_dir = os.path.join(recipe_dir, 'files', 'bin')
41-
4239
uris_to_keep = []
4340
missing_bins = []
4441

4542
for uri in src_uri_bin_str.split():
46-
bin_name = os.path.basename(uri)
47-
bin_path = os.path.join(bin_dir, bin_name)
43+
try:
44+
bin_name = os.path.basename(uri)
45+
fetcher = bb.fetch2.Fetch([uri], d)
46+
bin_path = fetcher.localpath(uri)
47+
48+
if os.path.exists(bin_path):
49+
uris_to_keep.append(uri)
50+
else:
51+
missing_bins.append(bin_name)
4852

49-
if os.path.exists(bin_path):
50-
uris_to_keep.append(uri)
51-
else:
53+
except bb.fetch2.FetchError:
5254
missing_bins.append(bin_name)
5355

5456
if missing_bins:

0 commit comments

Comments
 (0)