archiver.bbclass: fix BB_GENERATE_MIRROR_TARBALLS checking
PATCH 1/1 archiver.bbclass: fix BB_GENERATE_MIRROR_TARBALLS checking
The variable 'have_mirror_tarballs' is used as a boolean while it is actually the result of 'd.getVar('BB_GENERATE_MIRROR_TARBALLS')' and thus a string.
Fix this by converting it into a boolean before using it.
--- meta/classes/archiver.bbclass | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
meta/classes/archiver.bbclass +1 -1
@@ -339,7 +339,7 @@ python do_ar_mirror() { dl_dir = d.getVar('DL_DIR') mirror_exclusions = (d.getVar('ARCHIVER_MIRROR_EXCLUDE') or '').split() mirror_mode = d.getVarFlag('ARCHIVER_MODE', 'mirror') - have_mirror_tarballs = d.getVar('BB_GENERATE_MIRROR_TARBALLS') + have_mirror_tarballs = d.getVar('BB_GENERATE_MIRROR_TARBALLS') == "1" if mirror_mode == 'combined': destdir = d.getVar('ARCHIVER_COMBINED_MIRRORDIR')
Signature · 1 line
2.39.2
Quoted 23 lines
-----Original Message-----
From: [email protected] <[email protected]> On Behalf Of Enrico Jörns
Sent: den 8 augusti 2024 13:04
To: [email protected]
Cc: [email protected]
Subject: [OE-core] [PATCH] archiver.bbclass: fixBB_GENERATE_MIRROR_TARBALLScheckingThe variable '
have_mirror_tarballs' is used as a boolean while it is actually the result of 'd.getVar('BB_GENERATE_MIRROR_TARBALLS')' and thus a string.Fix this by converting it into a boolean before using it.
Signed-off-by Enrico Jörns <[email protected]>--- meta/classes/archiver.bbclass | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)meta/classes/archiver.bbclass +0
-0
meta/classes/archiver.bbclass python do_ar_mirror() { · line 342
Quoted 5 lines
meta/classes/archiver.bbclass +1
-1@@ -339,7 +339,7 @@ python do_ar_mirror() { dl_dir = d.getVar('DL_DIR') mirror_exclusions = (d.getVar('ARCHIVER_MIRROR_EXCLUDE') or '').split() mirror_mode = d.getVarFlag('ARCHIVER_MODE', 'mirror') - have_mirror_tarballs = d.getVar('BB_GENERATE_MIRROR_TARBALLS') + have_mirror_tarballs = d.getVar('BB_GENERATE_MIRROR_TARBALLS') == "1"
May I suggest:
have_mirror_tarballs = oe.types.boolean(d.getVar('BB_GENERATE_MIRROR_TARBALLS'))
instead?
Quoted 5 lines
meta/classes/archiver.bbclass +0
-1if mirror_mode == 'combined': destdir = d.getVar('ARCHIVER_COMBINED_MIRRORDIR') --2.39.2
//Peter
Am Donnerstag, dem 08.08.2024 um 12:16 +0000 schrieb Peter Kjellerstedt:
Quoted 32 lines
Quoted 24 lines
-----Original Message-----
From: [email protected] <[email protected]> On Behalf Of Enrico Jörns
Sent: den 8 augusti 2024 13:04
To: [email protected]
Cc: [email protected]
Subject: [OE-core] [PATCH] archiver.bbclass: fixBB_GENERATE_MIRROR_TARBALLScheckingThe variable '
have_mirror_tarballs' is used as a boolean while it is actually the result of 'd.getVar('BB_GENERATE_MIRROR_TARBALLS')' and thus a string.Fix this by converting it into a boolean before using it.
Signed-off-by Enrico Jörns <[email protected]>---
meta/classes/archiver.bbclass | 2 +-1 file changed, 1 insertion(+), 1 deletion(-)meta/classes/archiver.bbclass +0
-0meta/classes/archiver.bbclass python do_ar_mirror() { · line 342
Quoted 5 lines
meta/classes/archiver.bbclass +1
-1@@ -339,7 +339,7 @@ python do_ar_mirror() { dl_dir = d.getVar('DL_DIR') mirror_exclusions = (d.getVar('ARCHIVER_MIRROR_EXCLUDE') or '').split() mirror_mode = d.getVarFlag('ARCHIVER_MODE', 'mirror') - have_mirror_tarballs = d.getVar('BB_GENERATE_MIRROR_TARBALLS') + have_mirror_tarballs = d.getVar('BB_GENERATE_MIRROR_TARBALLS') == "1"May I suggest:
Quoted 3 lines
have_mirror_tarballs= oe.types.boolean(d.getVar('BB_GENERATE_MIRROR_TARBALLS'))instead?
Oh, did not know this helper exists. Thank you for the hint! Will send a v2.
Regards, Enrico
Quoted 8 lines
Quoted 5 lines
if
mirror_mode== 'combined':
destdir =d.getVar('ARCHIVER_COMBINED_MIRRORDIR')--
2.39.2//Peter
Signature · 4 lines
Pengutronix e.K. | Enrico Jörns | Embedded Linux Consulting & Support | https://www.pengutronix.de/ | Steuerwalder Str. 21 | Phone: +49-5121-206917-180 | 31137 Hildesheim, Germany | Fax: +49-5121-206917-9 |