https://bugzilla.novell.com/show_bug.cgi?id=205669 Summary: HAL fdi file: <append key="..." type="strlist"> writes multiple same strings Product: SUSE Linux 10.1 Version: Final Platform: i386 OS/Version: SuSE Linux 10.1 Status: NEW Severity: Normal Priority: P5 - None Component: Hotplug AssignedTo: dkukawka@novell.com ReportedBy: jsmeix@novell.com QAContact: qa@suse.de Perhaps I misunderstand the documentation: /usr/share/doc/packages/hal/spec/hal-spec.html#spec-device-info reads in section "Chapter 7. Device Information Files" that "merge" for a "strlist" will overwrite the whole list so that I must use "append" to add something. But this seems not to check if the added string is already in the list so that multiple same strings can be added to the same strlist. For example when I use the follwing in a fdi file: --------------------------------------------------------------------------- <match key="resmgr.class" exists="true"> <append key="info.callouts.add" type="strlist">hal-resmgr</append> <append key="info.callouts.remove" type="strlist">hal-resmgr</append> </match> <match key="info.capabilities" contains="scanner"> <append key="info.callouts.add" type="strlist">hal-resmgr</append> <append key="info.callouts.remove" type="strlist">hal-resmgr</append> </match> --------------------------------------------------------------------------- and both items match for a particular UDI, I get in "lshal" --------------------------------------------------------------------------- udi = '/org/freedesktop/Hal/devices/usb_device_4a9_220e_noserial_usbraw' info.callouts.add = {'hal-resmgr', 'hal-resmgr'} (string list) info.callouts.remove = {'hal-resmgr', 'hal-resmgr'} (string list) info.capabilities = {'usbraw', 'scanner'} (string list) ... resmgr.class = 'scanner' (string) ... --------------------------------------------------------------------------- In this particular case I could avoid the problem because I can test if the first item does not match like --------------------------------------------------------------------------- <match key="resmgr.class" exists="true"> <append key="info.callouts.add" type="strlist">hal-resmgr</append> <append key="info.callouts.remove" type="strlist">hal-resmgr</append> </match> <match key="info.capabilities" contains="scanner"> <match key="resmgr.class" exists="false"> <append key="info.callouts.add" type="strlist">hal-resmgr</append> <append key="info.callouts.remove" type="strlist">hal-resmgr</append> </match> </match> --------------------------------------------------------------------------- but I don't know how to specify such a test in general. I.e. I would need a "nomatch" or a general kind of "if-else" clause. Even if I could test in gereral, I think it is inconvenient to require such a test. I.e. I would expect that "append/prepend" has "add" semantics for a set - i.e. don't add duplicates. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.