mirror of
https://git.yoctoproject.org/meta-ti
synced 2026-05-08 04:20:11 +00:00
linux.inc: don't choke on missing defconfig in lzop dep
When a recipe is being parsed which will be skipped due to an incompatible machine, no local defconfig will exist for the current machine. It seems that the fetch localpath code doesn't error in that case, so we need to check for an IOError on the attempted open. Without this, we can hit parse errors. Signed-off-by: Christopher Larson <chris_larson@mentor.com> Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
This commit is contained in:
committed by
Koen Kooi
parent
845be4c1d3
commit
32d77d9fcf
@@ -269,9 +269,14 @@ python () {
|
||||
try:
|
||||
defconfig = bb.fetch2.localpath('file://defconfig', d)
|
||||
except bb.fetch2.FetchError:
|
||||
pass
|
||||
else:
|
||||
if 'CONFIG_KERNEL_LZO=y\n' in open(defconfig).readlines():
|
||||
depends = d.getVar('DEPENDS', False)
|
||||
d.setVar('DEPENDS', depends + ' lzop-native')
|
||||
return
|
||||
|
||||
try:
|
||||
configfile = open(defconfig)
|
||||
except IOError:
|
||||
return
|
||||
|
||||
if 'CONFIG_KERNEL_LZO=y\n' in configfile.readlines():
|
||||
depends = d.getVar('DEPENDS', False)
|
||||
d.setVar('DEPENDS', depends + ' lzop-native')
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user