Skip to content

Commit

Permalink
fix: depend on pulseaudio, not libpulse0 (#35)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
malept authored Jun 20, 2019
1 parent c60ce64 commit f6eed8e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/yaml.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ const DEPENDENCY_MAP = {

const FEATURES = {
audio: {
packages: ['libpulse0'],
packages: ['pulseaudio'],
plugs: ['pulseaudio']
},
alsa: {
Expand Down
4 changes: 2 additions & 2 deletions test/yaml.js
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down

0 comments on commit f6eed8e

Please sign in to comment.