Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

scm/url: fix crash if no extractor is installed #538

Merged
merged 1 commit into from
Nov 17, 2023

Conversation

rhubert
Copy link
Contributor

@rhubert rhubert commented Nov 16, 2023

Fix a crash on a system without 'unzip':

Traceback (most recent call last):
  File "/bob/pym/bob/scripts.py", line 146, in catchErrors
    ret = fun(*args, **kwargs)
          ^^^^^^^^^^^^^^^^^^^^
  File "/bob/pym/bob/scripts.py", line 254, in cmd
    ret = cmd(args.args, bobRoot)
          ^^^^^^^^^^^^^^^^^^^^^^^
  File "/bob/pym/bob/scripts.py", line 29, in __develop
    doDevelop(*args, **kwargs)
  File "/bob/pym/bob/cmds/build/build.py", line 410, in doDevelop
    commonBuildDevelop(parser, argv, bobRoot, True)
  File "/bob/pym/bob/cmds/build/build.py", line 345, in commonBuildDevelop
    builder.cook([ExecutableStep.fromStep(b, LazyIR) for b in backlog],
  File "/bob/pym/bob/builder.py", line 916, in cook
    raise self.__buildErrors[0]
  File "/bob/pym/bob/builder.py", line 811, in __taskWrapper
    ret = await coro()
          ^^^^^^^^^^^^
  File "/bob/pym/bob/builder.py", line 970, in _cookStep
    await self._cookCheckoutStep(step, depth)
  File "/bob/pym/bob/builder.py", line 1173, in _cookCheckoutStep
    await self._runShell(checkoutStep, "checkout", a)
  File "/bob/pym/bob/builder.py", line 737, in _runShell
    ret = await invoker.executeStep(mode, cleanWorkspace)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/bob/pym/bob/invoker.py", line 379, in executeStep
    await scm.invoke(self)
  File "/bob/pym/bob/scm/url.py", line 371, in invoke
    executor.fail("No suitable extractor found!")
    ^^^^^^^^
NameError: name 'executor' is not defined

Fix a crash on a system without 'unzip':

Traceback (most recent call last):
  File "/bob/pym/bob/scripts.py", line 146, in catchErrors
    ret = fun(*args, **kwargs)
          ^^^^^^^^^^^^^^^^^^^^
  File "/bob/pym/bob/scripts.py", line 254, in cmd
    ret = cmd(args.args, bobRoot)
          ^^^^^^^^^^^^^^^^^^^^^^^
  File "/bob/pym/bob/scripts.py", line 29, in __develop
    doDevelop(*args, **kwargs)
  File "/bob/pym/bob/cmds/build/build.py", line 410, in doDevelop
    commonBuildDevelop(parser, argv, bobRoot, True)
  File "/bob/pym/bob/cmds/build/build.py", line 345, in commonBuildDevelop
    builder.cook([ExecutableStep.fromStep(b, LazyIR) for b in backlog],
  File "/bob/pym/bob/builder.py", line 916, in cook
    raise self.__buildErrors[0]
  File "/bob/pym/bob/builder.py", line 811, in __taskWrapper
    ret = await coro()
          ^^^^^^^^^^^^
  File "/bob/pym/bob/builder.py", line 970, in _cookStep
    await self._cookCheckoutStep(step, depth)
  File "/bob/pym/bob/builder.py", line 1173, in _cookCheckoutStep
    await self._runShell(checkoutStep, "checkout", a)
  File "/bob/pym/bob/builder.py", line 737, in _runShell
    ret = await invoker.executeStep(mode, cleanWorkspace)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/bob/pym/bob/invoker.py", line 379, in executeStep
    await scm.invoke(self)
  File "/bob/pym/bob/scm/url.py", line 371, in invoke
    executor.fail("No suitable extractor found!")
    ^^^^^^^^
NameError: name 'executor' is not defined
Copy link

codecov bot commented Nov 16, 2023

Codecov Report

Attention: 1 lines in your changes are missing coverage. Please review.

Comparison is base (0fd7793) 87.92% compared to head (2b1cabb) 87.93%.

Files Patch % Lines
pym/bob/scm/url.py 0.00% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##           master     #538   +/-   ##
=======================================
  Coverage   87.92%   87.93%           
=======================================
  Files          46       46           
  Lines       14509    14509           
=======================================
+ Hits        12757    12758    +1     
+ Misses       1752     1751    -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@jkloetzke jkloetzke merged commit 8f7a9eb into BobBuildTool:master Nov 17, 2023
9 of 11 checks passed
@jkloetzke
Copy link
Member

Thanks!

@rhubert rhubert deleted the rh-executor branch September 17, 2024 09:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants