Description of problem: The prompt is different then it used to be and weird I must say: $ mock -r ruby22-x86_64 shell INFO: mock.py version 1.2.4 starting (python version = 2.7.8)... Start: init plugins INFO: selinux enabled Finish: init plugins Start: run Start: chroot init INFO: LVM plugin enabled. Allocated pool data: None%. Allocated metadata: None%. INFO: calling preinit hooks INFO: enabled yum cache Start: cleaning yum metadata Finish: cleaning yum metadata INFO: enabled ccache Finish: chroot init Start: shell <mock-chroot>sh-4.3# su - mockbuild Poslední přihlášení: Po 19.01.2015 16:51:51 CET -bash-4.3$ -bash-4.3$ logout <mock-chroot>sh-4.3# Version-Release number of selected component (if applicable): $ rpm -q mock mock-1.2.4-1.fc21.noarch How reproducible: Steps to Reproduce: 1. 2. 3. Actual results: There are sh-4.3 and -bash-4.3 prompts. Expected results: There are no sh-4.3 and -bash-4.3 prompts. The mockbuild's user prompt should probably contain the <mock-chroot> as well as the root's prompt. Additional info:
This bug appears to have been reported against 'rawhide' during the Fedora 22 development cycle. Changing version to '22'. More information and reason for this action is here: https://fedoraproject.org/wiki/Fedora_Program_Management/HouseKeeping/Fedora22
Fedora 22 changed to end-of-life (EOL) status on 2016-07-19. Fedora 22 is no longer maintained, which means that it will not receive any further security or bug fix updates. As a result we are closing this bug. If you can reproduce this bug against a currently maintained version of Fedora please feel free to reopen this bug against that version. If you are unable to reopen this bug, please file a new report against the current release. If you experience problems, please add a comment to this bug. Thank you for reporting this bug and we are sorry it could not be fixed.
The prompt is still weird ...
Can we close this as DUPLICATE for bug 1215792?
(In reply to Pavel Raiskup from comment #4) Well my concerns were more about the specific format of the prompt, which changed with the mock-1.2.4, so I don't think these are duplicates.
What are the real pros of having it re-implemented? I don't think that mock should care of it at all. This is related to 'user's workflow' inside the buildroot but not to the mock itself (--shell or whatever).
This bug appears to have been reported against 'rawhide' during the Fedora 25 development cycle. Changing version to '25'.
I fixed this with add these to /etc/mock/site-defaults.cfg config_opts['environment']['PROMPT_COMMAND'] = r'printf "\033]0;<mock-chroot>\007"' config_opts['environment']['PS1'] = r'<mock-chroot> \s-\v\$ ' or is fixed on mock-1.2.21-1.fc23.noarch , r'something' means one raw string so we don't need double escape \s and \v .
I used r'' syntax in commit * ccf4d12 simplify PROMPT_COMMAND string The '\s-\v\' *is* default for bash' PS1. So we just copy here. It is really up to you what you will use there. Thou I added more examples in commit: * 6839fd5 (HEAD -> devel) more examples of PS1 [RHBZ#1183733] The only remaining issue is that: mock shell su - mockbuild will give you different shell. But that cannot be changed without alternation of bashrc, and I really hesitate to do that.