Projects
openEuler:Mainline
libgusb
Sign Up
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
Expand all
Collapse all
Changes of Revision 2
View file
_service:tar_scm:libgusb.spec
Changed
@@ -1,12 +1,12 @@ Name: libgusb -Version: 0.3.8 -Release: 2 +Version: 0.3.10 +Release: 1 Summary: GObject-based library for libusb1 License: LGPLv2+ URL: https://github.com/hughsie/libgusb Source0: http://people.freedesktop.org/~hughsient/releases/%{name}-%{version}.tar.xz -BuildRequires: vala-devel vala-tools meson libusb1-devel gtk-doc gobject-introspection-devel glib2-devel libxslt +BuildRequires: vala meson libusb1-devel gtk-doc gobject-introspection-devel glib2-devel %description GUsb is a GObject wrapper for libusb1 that makes it easy to do @@ -60,6 +60,9 @@ %{_datadir}/gtk-doc/html/gusb/* %changelog +* Fri Jul 01 2022 jiangxinyu <jiangxinyu@kylinos.cn> - 0.3.10-1 +- Upgrade to 0.3.10 + * Sat Mar 26 2022 wangkerong <wangkerong@h-partners.com> - 0.3.8-2 - enable test case
View file
_service
Changed
@@ -2,7 +2,7 @@ <service name="tar_scm"> <param name="scm">git</param> <param name="url">git@gitee.com:src-openeuler/libgusb.git</param> - <param name="revision">d0f32c60c1d91c26aa1c70f964724c045a5f556a</param> + <param name="revision">master</param> <param name="exclude">*</param> <param name="extract">*</param> </service>
View file
_service:tar_scm:libgusb-0.3.8.tar.xz/.github/workflows/main.yml -> _service:tar_scm:libgusb-0.3.10.tar.xz/.github/workflows/main.yml
Changed
@@ -23,14 +23,14 @@ - run: docker run -t -v `pwd`:/build libgusb-${{ matrix.distro }} ./contrib/ci/build_and_test.sh -Dtests=false build-freebsd: - runs-on: macos-latest + runs-on: macos-10.15 steps: - name: Checkout uses: actions/checkout@v2 - name: Build id: test - uses: vmactions/freebsd-vm@v0.1.4 + uses: vmactions/freebsd-vm@v0.1.5 with: usesh: true mem: 8192
View file
_service:tar_scm:libgusb-0.3.8.tar.xz/NEWS -> _service:tar_scm:libgusb-0.3.10.tar.xz/NEWS
Changed
@@ -1,3 +1,19 @@ +Version 0.3.10 +~~~~~~~~~~~~~~ +Released: 2021-01-10 + +New Features: + - Add API to change the hotplug poll interval (Richard Hughes) + +Version 0.3.9 +~~~~~~~~~~~~~ +Released: 2021-12-07 + +Bugfixes: + - Don't hard-code the list of OS supporting --version-script (Ting-Wei Lan) + - Fix hotplug after threaded device removal (Richard Hughes) + - Fix version script check for GNU BFD linker on FreeBSD (Ting-Wei Lan) + Version 0.3.8 ~~~~~~~~~~~~~ Released: 2021-10-06
View file
_service:tar_scm:libgusb-0.3.8.tar.xz/RELEASE.md -> _service:tar_scm:libgusb-0.3.10.tar.xz/RELEASE.md
Changed
@@ -3,10 +3,10 @@ Write `NEWS` entries for GUsb in the same format as usual. - git shortlog 0.3.7.. | grep -i -v trivial | grep -v Merge > NEWS.new + git shortlog 0.3.9.. | grep -i -v trivial | grep -v Merge > NEWS.new ================================================= - Version 0.3.8 - ~~~~~~~~~~~~~ + Version 0.3.10 + ~~~~~~~~~~~~~~ Released: 2021-xx-xx Notes: @@ -19,7 +19,7 @@ Update library version if new ABI or API in `meson.build`, commit, and build tarball: # MAKE SURE THIS IS CORRECT - export release_ver="0.3.8" + export release_ver="0.3.10" git commit -a -m "Release version ${release_ver}" git tag -s -f -m "Release ${release_ver}" "${release_ver}" @@ -41,7 +41,7 @@ Send an email to devkit-devel@lists.freedesktop.org ================================================= - GUsb 0.3.8 released! + GUsb 0.3.10 released! GUsb is a GObject wrapper for libusb1 that makes it easy to do asynchronous control, bulk and interrupt transfers with proper
View file
_service:tar_scm:libgusb-0.3.8.tar.xz/contrib/libgusb.spec.in -> _service:tar_scm:libgusb-0.3.10.tar.xz/contrib/libgusb.spec.in
Changed
@@ -13,7 +13,7 @@ BuildRequires: gtk-doc BuildRequires: libusb1-devel >= 1.0.19 BuildRequires: meson -BuildRequires: vala-devel +BuildRequires: vala %description GUsb is a GObject wrapper for libusb1 that makes it easy to do @@ -41,14 +41,12 @@ %ldconfig_scriptlets %files -%defattr(-,root,root,-) %doc README.md AUTHORS NEWS COPYING %{_libdir}/libgusb.so.? %{_libdir}/libgusb.so.?.0.* %{_libdir}/girepository-1.0/GUsb-1.0.typelib %files devel -%defattr(-,root,root,-) %{_includedir}/gusb-1 %{_bindir}/gusbcmd %{_libdir}/libgusb.so
View file
_service:tar_scm:libgusb-0.3.8.tar.xz/gusb/gusb-context.c -> _service:tar_scm:libgusb-0.3.10.tar.xz/gusb/gusb-context.c
Changed
@@ -35,6 +35,8 @@ LAST_SIGNAL }; +#define G_USB_CONTEXT_HOTPLUG_POLL_INTERVAL_DEFAULT 1000 /* ms */ + /** * GUsbContextPrivate: * @@ -50,6 +52,7 @@ gboolean done_enumerate; volatile gint thread_event_run; guint hotplug_poll_id; + guint hotplug_poll_interval; int debug_level; GUsbContextFlags flags; libusb_context *ctx; @@ -282,10 +285,8 @@ if (priv->done_enumerate) device = g_usb_context_find_by_bus_address (context, bus, address, NULL); - if (device != NULL) { - g_debug ("%i:%i already exists", bus, address); + if (device != NULL) goto out; - } /* add the device */ device = _g_usb_device_new (context, dev, &error); @@ -407,7 +408,7 @@ GUsbContextIdleHelper *helper; helper = g_new0 (GUsbContextIdleHelper, 1); - helper->context = context; + helper->context = g_object_ref (context); helper->dev = libusb_ref_device (dev); helper->event = event; @@ -509,6 +510,70 @@ } } +static void +g_usb_context_ensure_rescan_timeout (GUsbContext *context) +{ + GUsbContextPrivate *priv = context->priv; + + if (priv->hotplug_poll_id > 0) { + g_source_remove (priv->hotplug_poll_id); + priv->hotplug_poll_id = 0; + } + if (priv->hotplug_poll_interval > 0) { + priv->hotplug_poll_id = g_timeout_add (priv->hotplug_poll_interval, + g_usb_context_rescan_cb, + context); + } +} + +/** + * g_usb_context_get_hotplug_poll_interval: + * @context: a #GUsbContext + * + * Gets the poll interval for platforms like Windows that do not support `LIBUSB_CAP_HAS_HOTPLUG`. + * + * Return value: (transfer none): the interval in ms + * + * Since: 0.3.10 + **/ +guint +g_usb_context_get_hotplug_poll_interval (GUsbContext *context) +{ + GUsbContextPrivate *priv = context->priv; + g_return_val_if_fail (G_USB_IS_CONTEXT (context), G_MAXUINT); + return priv->hotplug_poll_id; +} + +/** + * g_usb_context_set_hotplug_poll_interval: + * @context: a #GUsbContext + * @hotplug_poll_interval: the interval in ms + * + * Sets the poll interval for platforms like Windows that do not support `LIBUSB_CAP_HAS_HOTPLUG`. + * This defaults to 1000ms and can be changed before or after g_usb_context_enumerate() has been + * called. + * + * Since: 0.3.10 + **/ +void +g_usb_context_set_hotplug_poll_interval (GUsbContext *context, + guint hotplug_poll_interval) +{ + GUsbContextPrivate *priv = context->priv; + + g_return_if_fail (G_USB_IS_CONTEXT (context)); + + /* same */ + if (priv->hotplug_poll_interval == hotplug_poll_interval) + return; + + priv->hotplug_poll_interval = hotplug_poll_interval; + + /* if already running then change the existing timeout */ + if (priv->hotplug_poll_id > 0) + g_usb_context_ensure_rescan_timeout (context); +} + /** * g_usb_context_enumerate: * @context: a #GUsbContext @@ -532,9 +597,7 @@ g_usb_context_rescan (context); if (!libusb_has_capability (LIBUSB_CAP_HAS_HOTPLUG)) { g_debug ("platform does not do hotplug, using polling"); - priv->hotplug_poll_id = g_timeout_add_seconds (1, - g_usb_context_rescan_cb, - context); + g_usb_context_ensure_rescan_timeout (context); } priv->done_enumerate = TRUE; @@ -601,6 +664,7 @@ priv = context->priv = g_usb_context_get_instance_private (context); priv->flags = G_USB_CONTEXT_FLAGS_NONE; + priv->hotplug_poll_interval = G_USB_CONTEXT_HOTPLUG_POLL_INTERVAL_DEFAULT; priv->devices = g_ptr_array_new_with_free_func ((GDestroyNotify) g_object_unref); priv->dict_usb_ids = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, g_free); priv->dict_replug = g_hash_table_new_full (g_str_hash, g_str_equal,
View file
_service:tar_scm:libgusb-0.3.8.tar.xz/gusb/gusb-context.h -> _service:tar_scm:libgusb-0.3.10.tar.xz/gusb/gusb-context.h
Changed
@@ -76,6 +76,9 @@ GMainContext *g_usb_context_get_main_context (GUsbContext *context); void g_usb_context_set_main_context (GUsbContext *context, GMainContext *main_ctx); +guint g_usb_context_get_hotplug_poll_interval(GUsbContext *context); +void g_usb_context_set_hotplug_poll_interval(GUsbContext *context, + guint hotplug_poll_interval); void g_usb_context_enumerate (GUsbContext *context);
View file
_service:tar_scm:libgusb-0.3.8.tar.xz/gusb/libgusb.ver -> _service:tar_scm:libgusb-0.3.10.tar.xz/gusb/libgusb.ver
Changed
@@ -159,3 +159,10 @@ g_usb_device_get_string_descriptor_bytes_full; local: *; } LIBGUSB_0.3.6; + +LIBGUSB_0.3.10 { + global: + g_usb_context_get_hotplug_poll_interval; + g_usb_context_set_hotplug_poll_interval; + local: *; +} LIBGUSB_0.3.8;
View file
_service:tar_scm:libgusb-0.3.10.tar.xz/gusb/libgusb_meson.ver
Added
@@ -0,0 +1,7 @@ +LIBGUSB_0.1.0 { + global: + g_usb_*; + environ; + __progname; + local: *; +};
View file
_service:tar_scm:libgusb-0.3.8.tar.xz/gusb/meson.build -> _service:tar_scm:libgusb-0.3.10.tar.xz/gusb/meson.build
Changed
@@ -43,8 +43,10 @@ ) mapfile = 'libgusb.ver' +mapfile_test = 'libgusb_meson.ver' vflag = -if host_machine.system() not in 'darwin' +vflag_test = '-Wl,--version-script,@0@/@1@'.format(meson.current_source_dir(), mapfile_test) +if cc.has_link_argument(vflag_test) vflag += '-Wl,--version-script,@0@/@1@'.format(meson.current_source_dir(), mapfile) endif gusb = library(
View file
_service:tar_scm:libgusb-0.3.8.tar.xz/meson.build -> _service:tar_scm:libgusb-0.3.10.tar.xz/meson.build
Changed
@@ -1,5 +1,5 @@ project('libgusb', 'c', - version : '0.3.8', + version : '0.3.10', license : 'LGPL-2.1+', meson_version : '>=0.46.0', default_options : 'c_std=c99'
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.
浙ICP备2022010568号-2