You are not logged in.

#1 2010-06-08 19:47:38

gpunkt
Member
From: terminated.
Registered: 2010-05-17
Posts: 54

HALEVT won't work. strange error.

Hi there!
My problem is that I started using HALEVT, using x86_64, lib32 and all depps installed. when i'm trying to actually use halevt, i get the error which can be seen in the first 'code' box. I don't know what to change, i tried un/commenting some things in the use_label_as_mountpoint.xml but it wont work.


output of HALEVT

[nils@archlinux ~]$ halevt
manager.c:357 (main) Using configuration file /home/nils/.halevt/automatic_sync_mount.xml
manager.c:357 (main) Using configuration file /home/nils/.halevt/config.xml
manager.c:357 (main) Using configuration file /home/nils/.halevt/umount_from_tray-gtkdialog.xml
/home/nils/.halevt/use_label_as_mountpoint.xml:19: parser error : Entity 'MOUNTABLE' not defined
<halevt:Device match="&MOUNTABLE;">
                                 ^
/home/nils/.halevt/use_label_as_mountpoint.xml:22: parser error : Premature end of data in tag Configuration line 2

^
parse_config.c:549 (halevt_parse_config) Document not parsed successfully
manager.c:354 (main) Configuration file /home/nils/.halevt/use_label_as_mountpoint.xml parsing failed

file ~/.halevt/use_label_as_mountpoint.xml (exactly from the "examples" folder, with no changes (tried to comment/uncomment thing but the error won't disapear.)

  GNU nano 2.2.4      Datei: .halevt/use_label_as_mountpoint.xml                    

<?xml version="1.0" encoding="UTF-8"?>
<halevt:Configuration version="0.1" xmlns:halevt="http://www.environnement.ens.fr/p$

<!--
  example config to mount with label, from Marcin Gryszkalis.

  First a fdi rule has to be created to set volume.policy.desired_mount_point
  to the label, like:

<match key="volume.label" empty="false">
    <match key="volume.label" is_absolute_path="false">
        <merge key="volume.policy.desired_mount_point" type="copy_property">volume.$
    </match>
</match>

  Then use the mountpoint in halevt-mount
-->

<halevt:Device match="&MOUNTABLE;">
  <halevt:Insertion exec="halevt-mount -u $hal.udi$ -o sync -p $hal.volume.policy.d$
</halevt:Device>

my ~/.halevt/config.xml file

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE halevt:Configuration [
 
<!-- this entity corresponds with mountable devices, which have
 volume.policy.should_mount true or don't have
 volume.policy.should_mount false and are block devices hotpluggable or
 removable.
--> 
<!ENTITY MOUNTABLE "hal.block.device & hal.block.is_volume = true & (hal.volume.policy.should_mount = true | ((! 
hal.volume.policy.should_mount = false) & (hal.block.storage_device.hal.storage.policy.should_mount = true | ((! 
hal.block.storage_device.hal.storage.policy.should_mount = false)  & (hal.block.storage_device.hal.storage.hotpluggable = 
true | hal.block.storage_device.hal.storage.removable = true)))))"> 
]>
<halevt:Configuration version="0.1" xmlns:halevt="http://www.environnement.ens.fr/perso/dumas/halevt.html"> 
 
   <!-- audio CD --> 
   <halevt:Device match="hal.block.is_volume & hal.volume.disc.type=cd_rom & hal.volume.disc.has_audio=true & 
hal.volume.disc.has_data=false"> 
      <halevt:Insertion exec="grip"/> 
   </halevt:Device> 
 
   <!-- blank CD/DVD --> 
   <halevt:Device match="hal.block.is_volume & hal.volume.is_disc=true & hal.volume.disc.is_blank=true"> 
      <halevt:Insertion exec="k3b"/> 
   </halevt:Device> 
   
   <!--
   This rule matches removable devices which have volume.policy.should_mount true
   or don't have volume.policy.should_mount false.
   Upon insertion, they are mounted and recorded by halevt-mount.
   -m 002 sets the umask of mount to 002 when pmount is used system-wide
   to mount the device. This allows regular users to read the device.
      <halevt:Insertion exec='halevt-mount -u $hal.udi$ -m 002 ; /usr/local/bin/rox.panelput.pl Add "$hal.volume.mount_point$" 
"$hal.volume.label$"'/>
   !--> 
   <halevt:Device match="&MOUNTABLE; & (!hal.volume.is_disc | hal.volume.is_disc=false)"> 
      <halevt:Insertion exec='halevt-mount -u $hal.udi$ -m 002'/> 
   </halevt:Device> 
   <halevt:Device match="&MOUNTABLE; & hal.volume.is_disc=true"> 
      <halevt:Insertion exec="halevt-mount -u $hal.udi$ -m 002"/> 
   </halevt:Device> 
 
   <!--
   When a device get a mount point, it is passed to halevt-mount which can
   record it. The property that changes is volume.is_mounted, and the action is
   executed when the value of volume.is_mounted becomes true.
         <halevt:Action value="true" exec="halevt-mount -s"/>
   !--> 
<!--USB--> 
   <halevt:Device match="hal.block.device & hal.block.is_volume = true & hal.volume.mount_point & hal.volume.is_disc 
= false"> 
      <halevt:Property name="hal.volume.is_mounted"> 
         <halevt:Action value="true" exec='/usr/local/bin/rox.panelput.pl Add "$hal.volume.mount_point$" "$hal.volume.label$"'/> 
      </halevt:Property> 
   </halevt:Device> 
   
<!--cdroms--> 
    <halevt:Device match="hal.block.device & hal.block.is_volume = true  & hal.volume.is_disc = true & 
hal.volume.disc.has_data = true"> 
      <halevt:Property name="hal.volume.is_mounted"> 
         <halevt:Action value="true" exec='/usr/local/bin/rox.panelput.pl Add "$hal.volume.mount_point$" "$hal.volume.label$"'/> 
      </halevt:Property> 
   </halevt:Device> 
 
   <!--
   When a device is unmounted, it is recorded by halevt-mount.
   !--> 
   <halevt:Device match="hal.block.device & hal.block.is_volume = true"> 
      <halevt:Property name="hal.volume.is_mounted"> 
         <halevt:Action value="false" exec="halevt-mount -s"/> 
      </halevt:Property> 
   </halevt:Device> 
 
   <!--
   When a device is removed, it is recorded by halevt-mount.
   Note that at that point the device is already out of hal, so we use
   * which matches any device in the match attribute, and only pass the
   udi to the command.
   !--> 
   <halevt:Device match="hal.*"> 
      <halevt:Removal exec="halevt-umount -u $hal.udi$; halevt-umount -s"/> 
   </halevt:Device> 
 
 
   <!--
   Example of a use of OnInit. At startup all the devices are matched and the exec
   comand is run for those that match. Here we match all the removable devices
   that aren't already mounted and mount and register them.
      <halevt:OnInit exec="halevt-mount -u $hal.udi$ -m 002"/>
 
   !--> 
   <halevt:Device match="&MOUNTABLE; & (!hal.volume.is_disc | hal.volume.is_disc=false)"> 
      <halevt:OnInit exec='halevt-mount -u $hal.udi$ -m 002 ; /usr/local/bin/rox.panelput.pl Add "$hal.volume.mount_point$" 
"$hal.volume.label$"'/> 
   </halevt:Device> 
   <halevt:Device match="&MOUNTABLE; & hal.volume.is_disc=true"> 
      <halevt:OnInit exec='halevt-mount -u $hal.udi$ -m 002 ; /usr/local/bin/rox.panelput.pl Add "$hal.volume.mount_point$" 
"$hal.volume.label$"'/> 
   </halevt:Device> 
   <halevt:Device match="hal.storage.drive_type = cdrom"> 
      <halevt:Condition name="EjectPressed" exec='eject.hal $hal.block.device$'/> 
   </halevt:Device> 
 
</halevt:Configuration>

Last edited by gpunkt (2010-06-08 20:15:13)

Offline

#2 2010-06-08 21:05:09

berbae
Member
From: France
Registered: 2007-02-12
Posts: 1,302

Re: HALEVT won't work. strange error.

The error message speaks for itself :

/home/nils/.halevt/use_label_as_mountpoint.xml:19: parser error : Entity 'MOUNTABLE' not defined
<halevt:Device match="&MOUNTABLE;">
                                 ^

The boolean variable MOUNTABLE has to be defined in use_label_as_mountpoint.xml as it is in config.xml :

<!DOCTYPE halevt:Configuration [

<!ENTITY MOUNTABLE "hal.block.device & hal.block.is_volume = true & (hal.volume.policy.should_mount = true | ((! 
hal.volume.policy.should_mount = false) & (hal.block.storage_device.hal.storage.policy.should_mount = true | ((! 
hal.block.storage_device.hal.storage.policy.should_mount = false)  & (hal.block.storage_device.hal.storage.hotpluggable = 
true | hal.block.storage_device.hal.storage.removable = true)))))"> 
]>

This is the definition of MOUNTABLE.
You can see that it is not in the code of use_label_as_mountpoint.xml you provided.

Last edited by berbae (2010-06-08 21:15:57)

Offline

#3 2010-06-09 04:40:06

gpunkt
Member
From: terminated.
Registered: 2010-05-17
Posts: 54

Re: HALEVT won't work. strange error.

Ok, I'll try it out when i'm back home, but is this the Error in Line 2?

Offline

#4 2010-06-09 09:35:25

berbae
Member
From: France
Registered: 2007-02-12
Posts: 1,302

Re: HALEVT won't work. strange error.

Yes there is another parsing error :

/home/nils/.halevt/use_label_as_mountpoint.xml:22: parser error : Premature end of data in tag Configuration line 2

^

The xml file is not correctly terminated.
From http://www.nongnu.org/halevt/doc/halevt.html :

2.1 Basic syntax of halevt xml files

Halevt configuration is in XML (described in-depth at http://www.w3.org/XML/). A configuration file should begin with:

     <?xml version="1.0" encoding="UTF-8"?>
     <halevt:Configuration version="0.1" xmlns:halevt="http://www.environnement.ens.fr/perso/dumas/halevt.html">

and end with

     </halevt:Configuration>

You miss the end line.

Offline

Board footer

Powered by FluxBB