The Python libraries that Open vSwitch installs have been "private"
libraries, in the sense that they are only really meant to be used by
other parts of Open vSwitch.  Maybe that's a mistake; I guess that
there is no good reason that they cannot be used by other software.
But that's why, until now anyhow, they have been installed in
/usr/share/openvswitch/python instead of a system Python directory.

It looks like this patch moves them to
/usr/share/pyshared/python-openvswitch.  At least, that is where I see
them when I build and install python-openvswitch.  The "pyshared" in
the name makes it sound like this is a "public" directory, which isn't
what we've wanted to do so far.

However, maybe the name is misleading.  This directory doesn't seem to
be public, because this patch breaks "/etc/init.d/openvswitch-ipsec
start":

    blp@hardrock:~/db$ sudo /etc/init.d/openvswitch-ipsec start
    Starting ovs-monitor-ipsec:Traceback (most recent call last):
      File "/usr/share/openvswitch/scripts/ovs-monitor-ipsec", line 35, in 
<module>
        from ovs.db import error
    ImportError: No module named ovs.db
     failed!
    blp@hardrock:~/db$ 

That init script invokes python as:

    PYTHONPATH=/usr/share/openvswitch/python \
           /usr/share/openvswitch/scripts/ovs-monitor-ipsec \
           --pidfile-name=$PIDFILE --detach --monitor \
           unix:/var/run/openvswitch/db.sock

The easy fix would be to update the PYTHONPATH variable setting, but I
know little enough about Python packaging that I wonder whether this
is the correct fix.
_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to