After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 795431 - JHBuild crashes when builddir is removed in the shell
JHBuild crashes when builddir is removed in the shell
Status: RESOLVED FIXED
Product: jhbuild
Classification: Infrastructure
Component: general
unspecified
Other FreeBSD
: Normal normal
: ---
Assigned To: Jhbuild maintainers
Jhbuild QA
Depends on:
Blocks:
 
 
Reported: 2018-04-21 09:17 UTC by Ting-Wei Lan
Modified: 2018-04-21 14:20 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Don't crash when the user removes builddir in the shell (1.27 KB, patch)
2018-04-21 09:18 UTC, Ting-Wei Lan
committed Details | Review

Description Ting-Wei Lan 2018-04-21 09:17:08 UTC
This problem was introduced in commit 3f5e90d - Create a symlink to the srcdir from the builddir.

When the user deletes builddir in the shell started by JHBuild, it crashes when the user exits the shell.

*** Error during phase checkout of jhbuild: ########## Error running git remote update origin *** [1/1]

  [1] Rerun phase checkout
  [2] Ignore error and continue to configure
  [3] Give up on module
  [4] Start shell
  [5] Reload configuration
  [6] Go to phase "wipe directory and start over"
choice: 4

$ rm -rf ~/gnome/build/jhbuild/
$ exit
Traceback (most recent call last):
  • File "/home/lantw44/gnome/devinstall/bin/jhbuild", line 32 in <module>
    jhbuild.main.main(sys.argv[1:])
  • File "/home/lantw44/gnome/devinstall/lib/python2.7/site-packages/jhbuild/main.py", line 155 in main
    rc = jhbuild.commands.run(command, config, args, help=lambda: print_help(parser))
  • File "/home/lantw44/gnome/devinstall/lib/python2.7/site-packages/jhbuild/commands/__init__.py", line 191 in run
    return cmd.execute(config, args, help)
  • File "/home/lantw44/gnome/devinstall/lib/python2.7/site-packages/jhbuild/commands/__init__.py", line 53 in execute
    return self.run(config, options, args, help)
  • File "/home/lantw44/gnome/devinstall/lib/python2.7/site-packages/jhbuild/commands/base.py", line 343 in run
    return build.build()
  • File "/home/lantw44/gnome/devinstall/lib/python2.7/site-packages/jhbuild/frontends/buildscript.py", line 185 in build
    altphases)
  • File "/home/lantw44/gnome/devinstall/lib/python2.7/site-packages/jhbuild/frontends/terminal.py", line 374 in handle_error
    os.unlink('.jhbuild-srcdir')
OSError: [Errno 2] No such file or directory: '.jhbuild-srcdir'

Comment 1 Ting-Wei Lan 2018-04-21 09:18:05 UTC
Created attachment 371209 [details] [review]
Don't crash when the user removes builddir in the shell

It is sometimes necessary to remove the entire builddir in order to fix
the build. When the user does this, JHBuild will fail to remove the
symlink it created and the unlink call will fail and throw an exception.
Comment 2 Emmanuele Bassi (:ebassi) 2018-04-21 13:43:09 UTC
Review of attachment 371209 [details] [review]:

Sure.
Comment 3 Ting-Wei Lan 2018-04-21 14:20:35 UTC
Attachment 371209 [details] pushed as 154ce02 - Don't crash when the user removes builddir in the shell