Bug 9849 - hald doesn't handle indirections in copy_property in <append> and <prepend>
Summary: hald doesn't handle indirections in copy_property in <append> and <prepend>
Status: RESOLVED FIXED
Alias: None
Product: hal
Classification: Unclassified
Component: hald (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: Danny Kukawka
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-02-02 04:30 UTC by Martin Parm
Modified: 2007-08-28 12:28 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
Simple test case which illustrates the bug (538 bytes, text/plain)
2007-02-02 04:32 UTC, Martin Parm
Details
Fix for handling indirections in <append> and <prepend> (4.44 KB, patch)
2007-02-02 04:33 UTC, Martin Parm
Details | Splinter Review
Fix for handling indirections in <append> and <prepend> (hal-0.5.8.1) (4.45 KB, patch)
2007-02-02 04:39 UTC, Martin Parm
Details | Splinter Review

Description Martin Parm 2007-02-02 04:30:44 UTC
According to the HAL specs
(http://gitweb.freedesktop.org/?p=hal.git;a=blob_plain;f=doc/spec/hal-spec.html#spec-device-info)
should be able to handle indirections in copy_property in both <merge>,
<append> and <prepend>-nodes, however only <merge> handles indirections right.
A simple .fdi file which illustrates the problem will be posted shortly.
I've looked in the lastest source from the upstream repository, but it doesn't
seem like they have fixed to problem yet either.
Comment 1 Martin Parm 2007-02-02 04:32:29 UTC
Created attachment 8579 [details]
Simple test case which illustrates the bug

This simple test case illustrates the bug with indirections in <append> and
<prepend>. Simply put this file in /etc/hal/fdi/policy and plug in some
removable storage-device (e.g an USB-key). If indirections in <append> and
<prepend> had worked, volume.policy.desired_mount_point should be "usb_disk"
for a USB-key.
Comment 2 Martin Parm 2007-02-02 04:33:47 UTC
Created attachment 8580 [details] [review]
Fix for handling indirections in <append> and <prepend>

This patch fixes the bug by correctly handling indirections in copy_property in
<append> and <prepend>. It also simplifies the code a bit by merging the append
and prepend handling code, as they are nearly identical anyway. The patch has
been made with sys-apps/hal-0.5.7-r3 but also works with sys-hal-0.5.7.1-r1
without any changes.
Comment 3 Martin Parm 2007-02-02 04:36:50 UTC
(In reply to comment #2)
> The patch has been made with sys-apps/hal-0.5.7-r3 but also works with
> sys-hal-0.5.7.1-r1 without any changes.

Ehm, I accidently used Gentoo-specific package names. It simple means hal-0.5.7 and hal-0.5.7.1.

Comment 4 Martin Parm 2007-02-02 04:39:05 UTC
Created attachment 8581 [details] [review]
Fix for handling indirections in <append> and <prepend> (hal-0.5.8.1)

This is a quick port of the patch to hal-0.5.8.1. It hasn't been as extensivly tested as the 0.5.7.1 patch, but it should work AFAIK.
Comment 5 Danny Kukawka 2007-08-24 21:20:53 UTC
I submitted some patches for fdi directives which cover also this bug.
Comment 6 Danny Kukawka 2007-08-28 12:28:24 UTC
fixed in git HEAD now.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.