Bug 14531 - pydevshell or devpyshell?
Summary: pydevshell or devpyshell?
Status: RESOLVED FIXED
Alias: None
Product: OE-Core
Classification: Build System, Metadata & Runtime
Component: Scripts and Tools (show other bugs)
Version: 3.4
Hardware: x86 Multiple
: Medium normal
Target Milestone: 4.0
Assignee: Michael Opdenacker
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2021-08-30 13:48 UTC by Michael Opdenacker
Modified: 2021-11-12 18:49 UTC (History)
3 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: Yes (doc changes required)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Opdenacker 2021-08-30 13:48:54 UTC
There's a confusing naming inconsistency in OE-core...

The command to invoke the dev shell is:
bitbake <task> -c devpyshell

However, the prompt in the shell is "pydevshell".

Indeed, you see both names in the code:

$ git grep devpyshell
meta/classes/devshell.bbclass:def devpyshell(d):
meta/classes/devshell.bbclass:python do_devpyshell() {
meta/classes/devshell.bbclass:        devpyshell(d)
meta/classes/devshell.bbclass:addtask devpyshell after do_patch
meta/classes/devshell.bbclass:do_devpyshell[nostamp] = "1"
meta/conf/documentation.conf:do_devpyshell[doc] = "Starts an interactive Python shell for development/debugging"
scripts/oepydevshell-internal.py:histfile = os.path.expanduser("~/.oedevpyshell-history")

$ git grep pydevshell
meta/classes/devshell.bbclass:        oe_terminal("oepydevshell-internal.py %s %d" % (sname, pid), 'OpenEmbedded Developer PyShell', d)
meta/classes/devshell.bbclass:        ps1 = "pydevshell> "
scripts/oepydevshell-internal.py:    print('oepydevshell-internal.py: error: the following arguments are required: pty, pid\n'
scripts/oepydevshell-internal.py:          'Usage: oepydevshell-internal.py pty pid\n\n'
scripts/oepydevshell-internal.py:          'OpenEmbedded oepydevshell-internal.py - internal script called from meta/classes/devshell.bbclass\n\n'

It's probably easier to replace "pydevshell" by "devpyshell", so that the task name doesn't change.

Note that this will require a documentation update too.

I'll be happy to propose a patch but I need your opinions first.
Thanks in advance
Michael.
Comment 1 Randy MacLeod 2021-09-02 14:36:29 UTC
The vote is to keep pydevshell even if it does break the task name.
Comment 2 Michael Opdenacker 2021-10-05 08:37:53 UTC
Thanks for the decision!
Proposed a patch to OE-core:
https://lists.openembedded.org/g/openembedded-core/message/156637

If it is accepted, I'll also have to update the documentation
to fix this bug for good.
Comment 3 Michael Opdenacker 2021-10-18 14:43:41 UTC
The patch was accepted:
https://git.openembedded.org/openembedded-core/commit/?id=958133f4e97275d1f2c74a7e715c4506cca3582f

Will submit a documentation patch soon.
Comment 4 Michael Opdenacker 2021-10-18 15:12:01 UTC
Documentation patch posted:
https://lists.yoctoproject.org/g/docs/message/1996
Comment 5 Michael Opdenacker 2021-11-12 18:49:17 UTC
Everything is fixed now, both the code and then the documentation.
Marking the bug as "Resolved".