On Fri, Aug 26, 2011 at 08:25:30AM +0900, Simon Horman wrote: > On Wed, Aug 24, 2011 at 10:06:29AM -0700, Ben Pfaff wrote: > > 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$ > > I see that error too. > > I accidently uploaded a version of 1.2.1-1 that included the dh_python2 > transition and thus it is currently broken. I will revert the dh_python2 > change and upload 1.2.1-2. > > > 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. > > It seems that /usr/share/openvswitch/python doesn't exist in 1.2.0-1. > But ovs-monitor-ipsec starts regardless.
It sounds like what happens is this: * I thought that the OVS Python libraries were private and in /usr/share/openvswitch/python. * They were actually public and somewhere else (hence the PYTHONPATH really didn't do anything). * Your patch made them actually private in some different location, so now it doesn't work. I guess the correct fix, to fold into your patch, could be either: * Make them actually public. * Fix up the PYTHONPATH line above to whatever location they are now installed privately into. I think that either one is OK from my point of view. _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev