-
Notifications
You must be signed in to change notification settings - Fork 87
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
zsh: fix - do not source bash files and fix build #3431
Conversation
Detailed problem description:zprofile was set to source /usr/share/defaults/etc/profile.d/50-prompt.sh:22: command not found: shopt
/home/tracey/.bashrc.d/solus-monorepo-helpers.sh:75: command not found: complete Additionally, as shown in that output, the Solus helper script for bash was being run The root cause was that Having zsh load Patch file notes:When I attempted to build the package, error:
|
I moved to fish awhile back so I had not noticed any issues here are some things to consider. The shopt issue was fixed by me 4 years ago with this
It has broken again with the usr-merge changes since zsh is now in /usr/bin/zsh so we could just fix the logic. If not and zprofile stops sourcing /etc/profile then 10-path.sh is not sourced so ~/.local/bin/ will never be added to path when that dir exist as that is not being set in systemd. https://github.com/getsolus/packages/blob/main/packages/s/systemd/package.yml#L138 Having zprofile source /etc/profile unless /etc/zprofile || /etc/zsh/zprofile is added by the user was part of my fix for snaps not working for zsh users. So they should be tested too if we change this behaviour. https://phab.getsol.us/R3329:c609aba3edf7df0622c1853272260f1528c7ef82 |
Thanks for the insight. Since the scope of scripts being pulled in was expanded with the inclusion of |
After looking at how Ubuntu distros handle this, I have found a solution that I think will work. Our file I'm testing with a snap install of Spotify |
Commits need squashin' |
Remove sourcing of /etc/profile for zsh Fix errors from bash scripts that are incompatible with zsh and sourcing bash scripts the user did not intend for zsh
c6ef48e
to
3e44b2f
Compare
Done. I'd like to get this in for Hacktober if possible :) |
Is my understanding correct that we cannot "simply" fix the issue be fixing the check in the Do we still need to do anything with that broken check in the |
Correct.
The if test should be removed. I opened an issue for it /issues/4214 |
@ReillyBrogan You had said you were going to review this PR, just checking if you had the time yet. Thanks! |
Summary
Remove sourcing of /etc/profile for zsh
Fix errors from sourcing bash scripts that are incompatible with zsh
Add patches to correct make error
Test Plan
After reboot
solus-monorepo-helpers.zsh
onefetch
andmpv
, which rely on zsh functions, work as expectedwhich snap
returns the binary location for snap/var/lib/snapd/desktop
is in $XDG_DATA_DIRS once and only onceChecklist