--- libopensync-plugin-moto-0.22.orig/mototool
+++ libopensync-plugin-moto-0.22/mototool
@@ -12,11 +12,8 @@
 except ImportError:
     # motosync wasn't in our standard import path
     # try looking in the opensync python plugin dir for it
-    child = popen2.Popen3('pkg-config opensync-1.0 --variable=libdir')
-    libdir = child.fromchild.readline().rstrip('\n')
-    if child.wait() != 0 or not os.path.isdir(libdir):
-        sys.stderr.write("Error: couldn't locate OpenSync library directory\n")
-        sys.exit(1)
+    # hardcode libdir to /usr/lib as a workaround for #504866
+    libdir = '/usr/lib'
     sys.path.append(os.path.join(libdir, 'opensync', 'python-plugins'))
     import motosync
 
