Skip to contentSkip to conversation

openjdk-8: 'do_unpack_remove_X11_wrappers' confuses pyro bitbake parser

PATCH Superseded Matthew McClain 2 participants 3 messages Jul 17, 2018 – Jul 18, 2018

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 openjdk-8: 'do_unpack_remove_X11_wrappers' confuses pyro bitbake parser

Renaming the function to anything else allows the recipe to be parsed. The problem appears to be the word "_remove_". This affects both the sumo and master branches.

---
 recipes-core/openjdk/openjdk-8-common.inc | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
recipes-core/openjdk/openjdk-8-common.inc +2 -2
index b2020c3..fbb10be 100644
@@ -39,7 +39,7 @@ do_unpack_extract_submodules () {
     tar xjf ${WORKDIR}/${NASHORN_FILE} --transform "s,-${NASHORN_CHANGESET},,g"
 }
 
-do_unpack_remove_X11_wrappers() {
+do_unpack_delete_X11_wrappers() {
     find ${S}/jdk/src/solaris/classes/sun/awt/X11 -maxdepth 1 -name '*.java' -delete
 }
 
@@ -153,7 +153,7 @@ def jdk_configure_options(d):
     return options[3]
 
 do_unpack[postfuncs] += "do_unpack_extract_submodules"
-do_unpack[postfuncs] += "${@bb.utils.contains('PACKAGECONFIG', 'x11', '', 'do_unpack_remove_X11_wrappers', d)}"
+do_unpack[postfuncs] += "${@bb.utils.contains('PACKAGECONFIG', 'x11', '', 'do_unpack_delete_X11_wrappers', d)}"
 
 do_configure_prepend() {
         export ${@jdk_environment_options(d)}
Signature · 1 line
2.17.1
#1 lore raw

Hi,
thank you for your patch! Please see my comments below...

Quoted 3 lines · Matthew McClain

Renaming the function to anything else allows the recipe to be parsed. The problem appears to be the word "_remove_". This affects both the sumo and master branches.

In the subject you say it causes problems with the pyro branch, but here you say sumo and master... So which branches are really affected? Can you please adapt the title/commit-message accordingly?

Do you (or somebody else here) have any clue why the "remove" keyword triggers such a problem (since pyro?).

If I get it right the mentioned parsing error only occurs when we have no X11 (in PACKAGECONFIG). Is that true? Can you please mention it in the commit message?

Quoted 21 lines
---
  recipes-core/openjdk/openjdk-8-common.inc | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)
recipes-core/openjdk/openjdk-8-common.inc +1 -1
index b2020c3..fbb10be 100644
@@ -39,7 +39,7 @@ do_unpack_extract_submodules () {
      tar xjf ${WORKDIR}/${NASHORN_FILE} --transform "s,-${NASHORN_CHANGESET},,g"
  }
 
-do_unpack_remove_X11_wrappers() {
+do_unpack_delete_X11_wrappers() {
      find ${S}/jdk/src/solaris/classes/sun/awt/X11 -maxdepth 1 -name '*.java' -delete
  }
 

recipes-core/openjdk/openjdk-8-common.inc def jdk_configure_options(d): · line 159

Quoted 8 lines
recipes-core/openjdk/openjdk-8-common.inc +1 -1
@@ -153,7 +153,7 @@ def jdk_configure_options(d):
      return options[3]
 
  do_unpack[postfuncs] += "do_unpack_extract_submodules"
-do_unpack[postfuncs] += "${@bb.utils.contains('PACKAGECONFIG', 'x11', '', 'do_unpack_remove_X11_wrappers', d)}"
+do_unpack[postfuncs] += "${@bb.utils.contains('PACKAGECONFIG', 'x11', '', 'do_unpack_delete_X11_wrappers', d)}"
 
  do_configure_prepend() {
          export ${@jdk_environment_options(d)}

Otherwise the patch itself looks fine to me.

Thank you!

regards;Richard.L

#2 lore raw
Quoted 7 lines · Richard Leitner
Quoted 3 lines · Matthew McClain

Renaming the function to anything else allows the recipe to be parsed.  The problem appears to be the word "_remove_".  This affects both the sumo and master branches.

In the subject you say it causes problems with the pyro branch, but here you say sumo and master... So which branches are really affected? Can you please adapt the title/commit-message accordingly?

The issue is with building the sumo or master branches of meta-java with the pyro branches of meta-poky, meta-oe, etc.  I should just put this in the summary.

I suspect it's because _remove (like _append) is used to modify variables.

Quoted 1 line

If I get it right the mentioned parsing error only occurs when we have no X11 (in PACKAGECONFIG). Is that true? Can you please mention it in the commit message?

If I comment out the do_unpack[postfuncs] line, the recipe parses fine, so I would assume if X11 is configured, it would be fine.

I didn't include the error in the summary as it's long and messy.

                     parser = bb.codeparser.ShellParser(key, logger)
    >                parser.parse_shell(parsedvar.value)
                     deps = deps | shelldeps
  File "/home/test/yocto/poky/bitbake/lib/bb/codeparser.py", line 361, in ShellParser.parse_shell(value=None):

    >        self._parse_shell(value)
             self.execs = set(cmd for cmd in self.allexecs if cmd not in self.funcdefs)
  File "/home/test/yocto/poky/bitbake/lib/bb/codeparser.py", line 370, in ShellParser._parse_shell(value=None):
             try:
    >            tokens, _ = pyshyacc.parse(value, eof=True, debug=False)
             except pyshlex.NeedMore:
  File "/home/test/yocto/poky/bitbake/lib/bb/pysh/pyshyacc.py", line 668, in parse(input=None, eof=True, debug=False):
         lexer = pyshlex.PLYLexer()
    >    remaining = lexer.add(input, eof)
         if lexer.is_empty():
  File "/home/test/yocto/poky/bitbake/lib/bb/pysh/pyshlex.py", line 580, in PLYLexer.add(data=None, eof=True):
             """
    >        self._input += list(data)
             self._parse(eof)
TypeError: 'NoneType' object is not iterable

Thanks,
Matthew