Skip to content

Commit

Permalink
Get snippets for plugs aswell as slots
Browse files Browse the repository at this point in the history
  • Loading branch information
jocave committed Sep 2, 2016
1 parent f8a1f55 commit 37fe978
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions interfaces/udev/backend.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ import (
"fmt"
"os"
"path/filepath"
"strings"

"github.com/snapcore/snapd/dirs"
"github.com/snapcore/snapd/interfaces"
Expand Down Expand Up @@ -161,10 +162,9 @@ func (b *Backend) combineSnippets(snapInfo *snap.Info, snippets map[string][][]b
}
}

for _, slotInfo := range snapInfo.Slots {
securityTag := snap.NoneSecurityTag(snapInfo.Name(), slotInfo.Name)
slotSnippets := snippets[securityTag]
if len(slotSnippets) == 0 {
nonePrefix := snap.NoneSecurityTag(snapInfo.Name(), "")
for securityTag, slotSnippets := range snippets {
if !strings.HasPrefix(securityTag, nonePrefix) {
continue
}

Expand Down

0 comments on commit 37fe978

Please sign in to comment.