[oe-commits] Mike Westerhof : libusb: create dummy libusb version to pull in libusb-compat instead.

GIT User account git at amethyst.openembedded.net
Wed Dec 31 21:09:33 UTC 2008


Module: openembedded.git
Branch: org.openembedded.dev
Commit: 9f0e7ad2abce9435db48ea26bf7192c3d0209a0e
URL:    http://gitweb.openembedded.net/?p=openembedded.git&a=commit;h=9f0e7ad2abce9435db48ea26bf7192c3d0209a0e

Author: Mike Westerhof <mwester at dls.net>
Date:   Wed Dec 31 15:03:49 2008 -0600

libusb: create dummy libusb version to pull in libusb-compat instead.
See comments in libusb_0.0.0.bb for details on the problem.  In a
nutshell, set PREFERRED_VERSION_libusb = "0.0.0" for your distro to
ensure that libusb-compat and libusb1 is not stomped on by libusb.

---

 conf/distro/include/slugos.inc  |    6 ++++++
 packages/libusb/libusb_0.0.0.bb |   27 +++++++++++++++++++++++++++
 2 files changed, 33 insertions(+), 0 deletions(-)

diff --git a/conf/distro/include/slugos.inc b/conf/distro/include/slugos.inc
index 40eef63..d46dcf5 100644
--- a/conf/distro/include/slugos.inc
+++ b/conf/distro/include/slugos.inc
@@ -243,5 +243,11 @@ PREFERRED_VERSION_m4-native             ?= "1.4.8"
 PREFERRED_VERSION_pkgconfig             ?= "0.23"
 PREFERRED_VERSION_pkgconfig-native      ?= "0.23"
 
+# Hack alert - selecting this version of libusb effectively selects
+# the use of libusb1 and libusb-compat in the case that something
+# still depends on libusb.  This is required because otherwise
+# libusb will overwrite libusb-compat in staging.
+PREFERRED_VERSION_libusb                ?= "0.0.0"
+
 require conf/distro/include/sane-srcdates.inc
 require conf/distro/include/sane-srcrevs.inc
diff --git a/packages/libusb/libusb_0.0.0.bb b/packages/libusb/libusb_0.0.0.bb
new file mode 100644
index 0000000..fe45956
--- /dev/null
+++ b/packages/libusb/libusb_0.0.0.bb
@@ -0,0 +1,27 @@
+DESCRIPTION = "libusb is a library to provide userspace access to USB \
+devices.  This version is a metapackage that pulls in libusb-compat, \
+the replacement for libusb."
+
+# This version of libusb will never be pulled in automagically.  The
+# intention is that a distro wishing to use libusb1 and libusb-compat
+# will place the following in the appropriate conf file:
+#
+# PREFERRED_VERSION_libusb = "0.0.0"
+#
+# This essentially results in the replacement of libusb by libusb-compat,
+# and resolves the issues of some packages depending on libusb, while
+# other (newer) ones depend on libusb-compat.
+#
+# Note that using this version of libusb will break certain packages
+# that cannot work with libusb-compat (gnuradio is said to be such a
+# packages, as is dfu-util).  Unfortunately other packages (such as bluez)
+# require libusb-compat -- there's no good solution for this conflict
+# at this time.  The fundamental problem is that both libusb and
+# libusb-compat stage to the same libs (/usr/lib/libusb.a, for example),
+# so if you have built both, the last one staged wins.
+#
+# This "hack" seems to be the most flexible and least intrusive workaround.
+
+DEFAULT_PREFERENCE = "-1"
+
+DEPENDS = "libusb-compat"





More information about the Openembedded-commits mailing list