hw-assign overwrites existing udev rules
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Snappy |
Fix Released
|
Critical
|
Unassigned |
Bug Description
Each call to hw-assign for a given snap overwrites the (possibly) existing udev rule in 70-snappy_
The list "write_path" in <snapname>
Expected behavior:
The udev rule "70-snappy_
Following a copy of the content of both files after a sequence of calls to hw-assign:
(amd64)
{
"write_path": [
"/dev/ttyUSB*",
"/dev/simlink",
"/dev/
"/dev/simlink3"
],
"read_path": [
"/run/
]
}
(amd64)
KERNEL=
(amd64)
Related branches
- John Lenton (community): Approve
-
Diff: 159 lines (+87/-9)3 files modified.bzrignore (+3/-0)
snappy/hwaccess.go (+71/-9)
snappy/hwaccess_test.go (+13/-0)
description: | updated |
Changed in snappy: | |
status: | Triaged → Fix Committed |
Changed in snappy: | |
status: | Fix Committed → Fix Released |
This bug also affect the part of the code I am changing to fix Bug #1496319.
Since the fix for this bug should be simple (open the file in append mode, instead of writing a new file each time), I will propose a fix for this, before continuing with the fix for #1496319.