-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
Meson sets global config path incorrectly #10882
Comments
Where is your |
This is working as intended and the keybindings for this have not changed in years. |
So before 0.35 it wasn't? In /usr/local/etc/mpv/input.conf I have In the 0.35 log file I see |
A look into ~/mpv $ grep CONFDIR build/config.h #define MPV_CONFDIR "etc/mpv" for comparison (waf): /tmp/mpv $ grep CONFDIR build/config.h #define MPV_CONFDIR "/usr/local/etc/mpv" |
Oh so this is actually different defaults that I guess favors Linux distros over BSDs. Meson uses the |
My example is with prefix set to |
Apparently it magically works if you just join the paths of |
I happened to notice this commit. For OpenBSD we use prefix=/usr/local and sysconfdir=/etc. For WAF we were using..
which is /etc/mpv and /usr/local/share/examples/mpv. |
If you were already explicitly setting the path anyway, it will work the same way before and after this commit. This just makes the default not a wrong path in some cases. |
Well we just converted over to using Meson. But with that commit it appears as if the path is now hardcoded so if we use prefix=/usr/local and sysconf=/etc that the conf path is /usr/local/etc/mpv instead of /etc/mpv. I don't mind whichever is the default. Just as long as there is a way of overriding the path. |
It's not hardcoded. I don't know about how the ports work but essentially you'll want to pass: |
Meson uses the sysconfdir option for setting the global config directory. This conveniently defaults to /etc if the prefix is set to /usr which is nice for linux distros. BSDs tend to use /usr/local which causes this value to become 'etc' by default which is not an absolute path so you would need to set something like -Dsysconfdir=/usr/local/etc as well in the configuration step. It turns out we can have our cake and eat it too by just joining the paths of prefix and sysconfdir together. In the case where -Dprefix=/usr, this still results in /etc/mpv as the path since the path joining logic just drops the leading '/usr/'. For the /usr/local case, it ends up as /usr/local/etc/mpv as expected. This fixes #10882.
Meson uses the sysconfdir option for setting the global config directory. This conveniently defaults to /etc if the prefix is set to /usr which is nice for linux distros. BSDs tend to use /usr/local which causes this value to become 'etc' by default which is not an absolute path so you would need to set something like -Dsysconfdir=/usr/local/etc as well in the configuration step. It turns out we can have our cake and eat it too by just joining the paths of prefix and sysconfdir together. In the case where -Dprefix=/usr, this still results in /etc/mpv as the path since the path joining logic just drops the leading '/usr/'. For the /usr/local case, it ends up as /usr/local/etc/mpv as expected. This fixes mpv-player#10882.
Meson uses the sysconfdir option for setting the global config directory. This conveniently defaults to /etc if the prefix is set to /usr which is nice for linux distros. BSDs tend to use /usr/local which causes this value to become 'etc' by default which is not an absolute path so you would need to set something like -Dsysconfdir=/usr/local/etc as well in the configuration step. It turns out we can have our cake and eat it too by just joining the paths of prefix and sysconfdir together. In the case where -Dprefix=/usr, this still results in /etc/mpv as the path since the path joining logic just drops the leading '/usr/'. For the /usr/local case, it ends up as /usr/local/etc/mpv as expected. This fixes mpv-player#10882.
... even with --keep-open=no, both on "Enter" or ">" keys.
Expected: 0.34 closed the program when I pressed "Enter" on single file or on last file on playlist.
FreeBSD 13.1
mpv 0.35.0 Copyright © 2000-2022 mpv/MPlayer/mplayer2 projects
built on Thu Nov 17 04:25:08 2022
The text was updated successfully, but these errors were encountered: