| Summary: | devtool edit-recipe fails within crops/extsdk-container | ||
|---|---|---|---|
| Product: | [Yocto Project Subprojects] CROPS | Reporter: | Brian Kurle <brianx.j.kurle> |
| Component: | crops-default | Assignee: | brian avery <brian.avery> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | Medium+ | CC: | bluelightning, brianx.j.kurle, randy.e.witt |
| Version: | unspecified | ||
| Target Milestone: | 2.4 M3 | ||
| Hardware: | x86 | ||
| OS: | Multiple | ||
| Whiteboard: | |||
| OS type for building Yocto: | --- | Type of Regression: | --- |
| Verified: | Documentation change: | Yes (doc changes required) | |
In conversation with Randy Witt, it was suggested that this be moved to documentation on the wiki of HOWTO augment the containers with the user preferred editor. Need to know where to submit documentation (and which wiki) adding paul. Question how about changing "devtool edit-recipe" to "devtool find-recipe" then we would just get a path to the recipe so people can do what they want with it. Admittedly, we would still have the problem with the inside and outside the container path being different, but if you understand the mapping it's still helpful. maybe add a --rel option so you get a relative path which might make the mapping easier if your host side editor has CWD=workdir... I would be all for devtool providing and handling relative pathing as I have been bitten with devtool runqemu as a similar issue. It appears that the crops/extsdk-container is useful for building, but not for a general developer interactive environment. edit-recipe, runqemu, (et al.) fail (more spectacularly so when you try to execute the latter outside the container and the workspace is now hardcoded to /workdir). some patches that went into 2.3 (this week) for https://bugzilla.yoctoproject.org/show_bug.cgi?id=11375 make the qemu and testimage stuff relative. That should help. I'd rather not remove edit-recipe since it's useful outside of the container, however we can add find-recipe or something similar that just gives you the path. We can also make edit-recipe's behaviour less ugly when the EDITOR specified doesn't exist. Is the relative patch going to make it to morty? Moving to M3 The devtool find-recipe patch is in master. It will not be backported, as features generally don't make it into dot releases. Will add a pointer in the docs to a wiki page where features like this can be better documented. |
Preconditions/Environment ------------------------- $ docker pull crops/extsdk-container Using default tag: latest latest: Pulling from crops/extsdk-container Digest: sha256:a015a1d601371a9b58b3248c3a288e63116d56387d7003555ad671d1ac9e8056 Status: Image is up to date for crops/extsdk-container:latest Triggering Action/Cause ----------------------- devtool edit-recipe <any valid recipe> Expectation ----------- vi, (nor any other editor discovered) appears not to be installed within crops/extsdk-container. Thus, devtool fails when attempting to execute subcommand edit-recipe Expected vi or some preconfigured editor to be available when executing devtool subcommands that require an editor. Actual Result ------------- SDK environment now set up; additionally you may now run devtool to perform development tasks. Run devtool --help for further details. sdkuser@43c20f0c6d57:/workdir$ devtool edit-recipe mbedtls /bin/sh: 1: vi: not found Traceback (most recent call last): File "/workdir/sysroots/x86_64-pokysdk-linux/usr/bin/devtool", line 344, in <module> ret = main() File "/workdir/sysroots/x86_64-pokysdk-linux/usr/bin/devtool", line 331, in main ret = args.func(args, config, basepath, workspace) File "/workdir/layers/poky/scripts/lib/devtool/utilcmds.py", line 52, in edit_recipe return scriptutils.run_editor(recipefile) File "/workdir/layers/poky/scripts/lib/scriptutils.py", line 115, in run_editor return subprocess.check_call('%s %s' % (editor, params), shell=True) File "/workdir/buildtools/sysroots/x86_64-pokysdk-linux/usr/lib/python3.5/subprocess.py", line 581, in check_call raise CalledProcessError(retcode, cmd) subprocess.CalledProcessError: Command 'vi "/workdir/workspace/recipes/mbedtls/mbedtls_git.bb"' returned non-zero exit status 127 Reproducibility --------------- 100% Where: n = total number of attempts m = number of times the phenomenon is visible