backports Kconfig processing
Hi Johannes,
I was made aware that the select line in brcm80211 Kconfig is not working in backports:
select WANT_DEV_COREDUMP if BRCMFMAC
Is this something that can be fixed in backports?
Regards,
Arend
--
To unsubscribe from this list: send the line "unsubscribe backports" in
Hi Arend,
Quoted 6 lines
I was made aware that the select line in brcm80211
Kconfigis not working in backports:select
WANT_DEV_COREDUMPif BRCMFMACIs this something that can be fixed in backports?
I guess it can be, but what do you mean by "not working"?
It should be rewritten to
select BPAUTO_WANT_DEV_COREDUMP if BRCMFMAC
but quite possibly the parser doesn't understand the " if BRCMFMAC" part there.
johannes
--
To unsubscribe from this list: send the line "unsubscribe backports" in
Quoted 9 lines · Johannes Berg
Hi Arend,
Quoted 6 lines
I was made aware that the select line in brcm80211
Kconfigis not working in backports:select
WANT_DEV_COREDUMPif BRCMFMACIs this something that can be fixed in backports?
Quoted 8 lines
I guess it can be, but what do you mean by "not working"?
It should be rewritten to
select
BPAUTO_WANT_DEV_COREDUMPif BRCMFMACbut quite possibly the parser doesn't understand the " if BRCMFMAC" part there.
That exactly what is being reported. Things were working fine until I added the "if BRCMFMAC" part.
Regards,
Arend
Signature · 1 line
This electronic communication and the information and any files transmitted with it, or attached to it, are confidential and are intended solely for the use of the individual or entity to whom it is addressed and may contain information that is confidential, legally privileged, protected by privacy laws, or otherwise restricted from disclosure to anyone else. If you are not the intended recipient or the person responsible for delivering the e-mail to the intended recipient, you are hereby notified that any use, copying, distributing, dissemination, forwarding, printing, or copying of this e-mail is strictly prohibited. If you received this e-mail in error, please return the e-mail to the sender, delete it from your computer, and destroy any printed copy of it.
Quoted 15 lines · Arend van Spriel
Quoted 13 lines · Johannes Berg
Hi Arend,
Quoted 6 lines
I was made aware that the select line in brcm80211
Kconfigis not working in backports:select
WANT_DEV_COREDUMPif BRCMFMACIs this something that can be fixed in backports?
I guess it can be, but what do you mean by "not working"?
It should be rewritten to
Quoted 7 lines
Quoted 4 lines
select
BPAUTO_WANT_DEV_COREDUMPif BRCMFMACbut quite possibly the parser doesn't understand the " if BRCMFMAC" part there.
That exactly what is being reported. Things were working fine until I added the "if BRCMFMAC" part.
Yeah, so lib/kconfig.py has this
sel_line = re.compile(r'^(?P<spc>\s+)select\s+(?P<sym>[^\s]*)\s*$')
which doesn't cover the case of "if ..." on the select line.
I guess you could either look at that and fix it - need to fix the regex to allow all_selects() to find it, and modify_selects() to preserve the "if ..." part.
Probably something like
lib/kconfig.py +3 -3
@@ -8,7 +8,7 @@ src_line_rel = re.compile(r'^\s*source\s+(?P<src>[^\s"]*)"?\s*$') tri_line = re.compile(r'^(?P<spc>\s+)tristate') bool_line = re.compile(r'^(?P<spc>\s+)bool') cfg_line = re.compile(r'^(?P<opt>config|menuconfig)\s+(?P<sym>[^\s]*)') -sel_line = re.compile(r'^(?P<spc>\s+)select\s+(?P<sym>[^\s]*)\s*$') +sel_line = re.compile(r'^(?P<spc>\s+)select\s+(?P<sym>[^\s]*)(?P<ifexpr>.*)$') backport_line = re.compile(r'^\s+#(?P<key>[ch]-file|module-name)\s*(?P<name>.*)') class ConfigTree(object):
@@ -230,9 +230,9 @@ class ConfigTree(object): m = sel_line.match(l) if m and not m.group('sym') in syms: if 'BPAUTO_' + m.group('sym') in syms: - out += m.group('spc') + "select BPAUTO_" + m.group('sym') + '\n' + out += m.group('spc') + "select BPAUTO_" + m.group('sym') + m.group('ifexpr') + '\n' else: - out += m.group('spc') + "depends on " + m.group('sym') + '\n' + out += m.group('spc') + "depends on " + m.group('sym') + m.group('ifexpr') + '\n' else: out += l outf = open(os.path.join(self.bpid.target_dir, nf), 'w')
johannes
--
To unsubscribe from this list: send the line "unsubscribe backports" in
Quoted 51 lines · Johannes Berg
Quoted 15 lines · Arend van Spriel
Quoted 13 lines · Johannes Berg
Hi Arend,
Quoted 6 lines
I was made aware that the select line in brcm80211
Kconfigis not working in backports:select
WANT_DEV_COREDUMPif BRCMFMACIs this something that can be fixed in backports?
I guess it can be, but what do you mean by "not working"?
It should be rewritten to
Quoted 7 lines
Quoted 4 lines
select
BPAUTO_WANT_DEV_COREDUMPif BRCMFMACbut quite possibly the parser doesn't understand the " if BRCMFMAC" part there.
That exactly what is being reported. Things were working fine until I added the "if BRCMFMAC" part.
Yeah, so
lib/kconfig.pyhas this
sel_line= re.compile(r'^(?P<spc>\s+)select\s+(?P<sym>[^\s]*)\s*$')which doesn't cover the case of "if ..." on the select line.
I guess you could either look at that and fix it - need to fix the regex to allow
all_selects()to find it, andmodify_selects()to preserve the "if ..." part.Probably something like
lib/kconfig.py +1
-1@@ -8,7 +8,7 @@ src_line_rel = re.compile(r'^\s*source\s+(?P<src>[^\s"]*)"?\s*$') tri_line = re.compile(r'^(?P<spc>\s+)tristate') bool_line = re.compile(r'^(?P<spc>\s+)bool') cfg_line = re.compile(r'^(?P<opt>config|menuconfig)\s+(?P<sym>[^\s]*)') -sel_line = re.compile(r'^(?P<spc>\s+)select\s+(?P<sym>[^\s]*)\s*$') +sel_line = re.compile(r'^(?P<spc>\s+)select\s+(?P<sym>[^\s]*)(?P<ifexpr>.*)$') backport_line = re.compile(r'^\s+#(?P<key>[ch]-file|module-name)\s*(?P<name>.*)') class ConfigTree(object):@@ -230,9 +230,9 @@ class ConfigTree(object): m = sel_line.match(l)
lib/kconfig.py class ConfigTree(object): · line 238
Quoted 10 lines
lib/kconfig.py +2
-2if m and not m.group('sym') in syms: if 'BPAUTO_' + m.group('sym') in syms: - out += m.group('spc') + "select BPAUTO_" + m.group('sym') + '\n' + out += m.group('spc') + "select BPAUTO_" + m.group('sym') + m.group('ifexpr') + '\n' else: - out += m.group('spc') + "depends on " + m.group('sym') + '\n' + out += m.group('spc') + "depends on " + m.group('sym') + m.group('ifexpr') + '\n' else: out += l outf = open(os.path.join(self.bpid.target_dir, nf), 'w')
Thanks for the suggestion. I will give it a try.
Regards,
Arend
Signature · 1 line
This electronic communication and the information and any files transmitted with it, or attached to it, are confidential and are intended solely for the use of the individual or entity to whom it is addressed and may contain information that is confidential, legally privileged, protected by privacy laws, or otherwise restricted from disclosure to anyone else. If you are not the intended recipient or the person responsible for delivering the e-mail to the intended recipient, you are hereby notified that any use, copying, distributing, dissemination, forwarding, printing, or copying of this e-mail is strictly prohibited. If you received this e-mail in error, please return the e-mail to the sender, delete it from your computer, and destroy any printed copy of it.