Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 911883 - media-video/pipewire gentoo-pipewire-launcher should fall back to $HOME/.config if XDG_CONFIG_HOME is not set
Summary: media-video/pipewire gentoo-pipewire-launcher should fall back to $HOME/.conf...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Sam James
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2023-08-07 20:17 UTC by Ninpo
Modified: 2023-08-24 19:42 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Fall back to using ~/.config if XDG_CONFIG_HOME isn't set. (0001-media-video-pipewire-gentoo-pipewire-launcher-config.patch,986 bytes, patch)
2023-08-10 09:35 UTC, Alexis
Details | Diff
Fall back to using ${HOME}/.config if XDG_CONFIG_HOME isn't set. (0001-media-video-pipewire-gentoo-pipewire-launcher-config.patch,2.04 KB, patch)
2023-08-11 01:39 UTC, Alexis
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ninpo 2023-08-07 20:17:34 UTC
In gentoo-pipewire-launcher script the following line:
CONF="${XDG_CONFIG_HOME}/gentoo-pipewire-launcher.conf"
will never find a config file if XDG_CONFIG_HOME is unset, which can often be the case (unless you put the config at /gentoo-pipewire-launcher.conf).

I suggest changing to:
CONF="${XDG_CONFIG_HOME-${HOME}/.config}/gentoo-pipewire-launcher.conf"

Which will fallback to $HOME/.config as per the XDG spec:
https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html


Reproducible: Always
Comment 1 Alexis 2023-08-10 03:35:04 UTC
Thanks for the report! i'm happy to put together the patch for this. Will try to get to it as soon as i can.
Comment 2 Alexis 2023-08-10 09:35:11 UTC
Created attachment 867561 [details, diff]
Fall back to using ~/.config if XDG_CONFIG_HOME isn't set.
Comment 3 Alexis 2023-08-11 01:39:09 UTC
Created attachment 867598 [details, diff]
Fall back to using ${HOME}/.config if XDG_CONFIG_HOME isn't set.
Comment 4 Larry the Git Cow gentoo-dev 2023-08-24 19:42:23 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c1e0cc9215766a8fc6c13bce085910ba564a4e87

commit c1e0cc9215766a8fc6c13bce085910ba564a4e87
Author:     Alexis <flexibeast@gmail.com>
AuthorDate: 2023-08-10 09:30:26 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2023-08-24 19:42:15 +0000

    media-video/pipewire: gentoo-pipewire-launcher configuration.
    
    Fall back to using ${HOME}/.config if XDG_CONFIG_HOME isn't set.
    
    Closes: https://bugs.gentoo.org/911883
    Signed-off-by: Alexis <flexibeast@gmail.com>
    Signed-off-by: Sam James <sam@gentoo.org>

 media-video/pipewire/files/gentoo-pipewire-launcher.1            | 9 +++++++++
 media-video/pipewire/files/gentoo-pipewire-launcher.in-r2        | 2 +-
 .../{pipewire-0.3.75-r2.ebuild => pipewire-0.3.75-r3.ebuild}     | 0
 .../{pipewire-0.3.77-r1.ebuild => pipewire-0.3.77-r2.ebuild}     | 0
 .../{pipewire-0.3.78.ebuild => pipewire-0.3.78-r1.ebuild}        | 0
 5 files changed, 10 insertions(+), 1 deletion(-)