From f6eed8eec4032bf173e4aa24d25da964bb87b410 Mon Sep 17 00:00:00 2001 From: Mark Lee Date: Thu, 20 Jun 2019 08:01:36 -0700 Subject: [PATCH] fix: depend on pulseaudio, not libpulse0 (#35) Electron has a dependency on libasound2. If you need pulseaudio support, you'll need the pulseaudio package anyway. This has the side benefit of also requiring the libasound2 package. --- src/yaml.js | 2 +- test/yaml.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/yaml.js b/src/yaml.js index 845fde4..d0d7088 100644 --- a/src/yaml.js +++ b/src/yaml.js @@ -35,7 +35,7 @@ const DEPENDENCY_MAP = { const FEATURES = { audio: { - packages: ['libpulse0'], + packages: ['pulseaudio'], plugs: ['pulseaudio'] }, alsa: { diff --git a/test/yaml.js b/test/yaml.js index 28df584..4a30ece 100644 --- a/test/yaml.js +++ b/test/yaml.js @@ -63,13 +63,13 @@ test('set feature on app', async t => { } } const snapcraftYaml = await createYaml(t, userDefined) - util.assertIncludes(t, snapcraftYaml.parts.electronAppName['stage-packages'], 'libpulse0', 'libpulse0 is in stage-packages') + util.assertIncludes(t, snapcraftYaml.parts.electronAppName['stage-packages'], 'pulseaudio', 'pulseaudio is in stage-packages') util.assertIncludes(t, snapcraftYaml.apps.electronAppName.plugs, 'pulseaudio', 'pulseaudio is in app plugs') }) test('setting both audio and alsa prefers alsa', async t => { const { apps, parts } = await createYaml(t, { name: 'electronAppName', features: { 'audio': true, 'alsa': true } }) - util.assertNotIncludes(t, parts.electronAppName['stage-packages'], 'libpulse0', 'libpulse0 is not in stage-packages') + util.assertNotIncludes(t, parts.electronAppName['stage-packages'], 'pulseaudio', 'pulseaudio is not in stage-packages') util.assertNotIncludes(t, apps.electronAppName.plugs, 'pulseaudio', 'pulseaudio is not in app plugs') util.assertIncludes(t, parts.electronAppName['stage-packages'], 'libasound2', 'libasound2 is in stage-packages') util.assertIncludes(t, apps.electronAppName.plugs, 'alsa', 'alsa is in app plugs')