-
Notifications
You must be signed in to change notification settings - Fork 46
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
Failed to supply deb-src in Ubuntu 24.04 #125
Comments
Maybe I can try submit a PR to include https://askubuntu.com/a/1512043? Nonetheless, I think I still need to parse the file and ensure it's about distro. |
I think this was fixed in #120 Try the latest version of the git |
Scrub that - I've just run into the same issues with that latest version. I'll look further.... |
IIUC #120 only copies However, in my case, my Ubuntu 24.04 uses |
You're absolutely right. I'll need a second or two to get up to speed on this. I've not needed to look at this for a while as most people are using pipewire these days. |
Here's a patch which I'd welcome comments on:- diff --git a/scripts/install_pulseaudio_sources_apt.sh b/scripts/install_pulseaudio_sources_apt.sh
index af0debd..c4d7357 100755
--- a/scripts/install_pulseaudio_sources_apt.sh
+++ b/scripts/install_pulseaudio_sources_apt.sh
@@ -61,7 +61,8 @@ if [ ! -d "$PULSE_DIR" ]; then
Ubuntu)
# Enable the universe repository. Don't use add-apt-repository
# as this has a huge number of dependencies.
- if ! grep -q '^ *[^#].* universe *' /etc/apt/sources.list; then
+ if [ -f /etc/apt/sources.list ] && \
+ ! grep -q '^ *[^#].* universe *' /etc/apt/sources.list; then
echo "- Adding 'universe' repository" >&2
cp /etc/apt/sources.list /tmp/sources.list
while read type url suite rest; do
@@ -101,11 +102,20 @@ if [ ! -d "$PULSE_DIR" ]; then
sudo rm $SRCLIST ;# Remove source respositories
- # remove duplicates from the combined source.list in order to prevent
- # apt warnings/errors; this is useful in cases where the user has
- # already configured source code repositories.
- sort -u < /tmp/combined_sources.list | \
- sudo tee /etc/apt/sources.list > /dev/null
+ if [ -s /tmp/combined_sources.list ]; then
+ # Old-style system using .list files
+
+ # remove duplicates from the combined source.list in order to prevent
+ # apt warnings/errors; this is useful in cases where the user has
+ # already configured source code repositories.
+ sort -u < /tmp/combined_sources.list | \
+ sudo tee /etc/apt/sources.list > /dev/null
+ fi
+
+ # Cater for new-style .sources files
+ for src in $(find /etc/apt/sources.list.d -maxdepth 1 -type f -name '*.sources'); do
+ sudo sed -i 's/^Types: deb/Types: deb deb-src/' "$src"
+ done
sudo apt-get update
I'll look at your PR tomorrow (out of time today), but I'm not seeing the same error as you at the moment. |
I'm not an expert of Ubuntu sources file. However, given the comment in pulseaudio-module-xrdp/scripts/install_pulseaudio_sources_apt.sh Lines 84 to 86 in 8c76a1d
I'm not sure if we also need to do the same check as in pulseaudio-module-xrdp/scripts/install_pulseaudio_sources_apt.sh Lines 91 to 98 in 8c76a1d
Otherwise, we may be adding |
Thanks for that @oToToT. I'll look at it. PS: I'm aware of the broken CI as well for your PR. |
In my ubuntu 24.04 setup, I don't have any
*.list
in/etc/apt/sources.list.d
.Instead, I have
*.sources
file in/etc/apt/sources.list.d
, which have a different format than the original list file.It seems like the current script will try to add
deb-src
when needed.pulseaudio-module-xrdp/scripts/install_pulseaudio_sources_apt.sh
Lines 93 to 96 in 8c76a1d
However, this method does not work on ubuntu 24.04 anymore because
*.list
no longer exists.I think we need to find a way to deal with the new
*.sources
file, but not sure what's the best way to handle it though.The text was updated successfully, but these errors were encountered: