fix(deps): update rust crate mtp-rs to 0.25.0#38
Open
renovate[bot] wants to merge 1 commit into
Open
Conversation
renovate
Bot
force-pushed
the
renovate/mtp-rs-0.x
branch
from
July 18, 2026 23:23
87cf6f3 to
81e1a81
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
0.23.0→0.25.0Release Notes
vdavid/mtp-rs (mtp-rs)
v0.25.0Compare Source
Library
0.25.0, CLI0.7.0. Diagnostics so device-specific bugs can be captured by the reporter instead of reproduced on identical hardware (follow-up to the #18 Samsung cancel-wedge work in 0.24.0).Added
tracingfeature for device-protocol diagnostics. Off by default (no dependency, no cost); enable it and install anytracingsubscriber to emit events on the transaction and cancel/reset paths. Purpose-built so a bug reporter can capture what their device actually does (issue #18) instead of us reproducing on identical hardware. The cancel/reset path logs atdebug, per-operation execution attrace.--traceflag and richerdoctor.mtp-rs --trace <cmd>prints the cancel/reset diagnostics to stderr (RUST_LOGoverrides for finer control, e.g.mtp_rs=tracefor per-operation detail).doctornow prints device capabilities, anddoctor --probe-cancelruns a cancel-health check (download a file, cancel mid-stream) that classifies the device ashealthy,wedged_recovered(#18), orerrored— the one-command artifact to attach to a freeze report.force_cancel_wedge(serial)virtual-device test hook (featurevirtual-device). Arms a one-shot so the nextcancel_transferreturnsError::DeviceReset, letting the #18 cancel-wedge contract be regression-tested with no hardware.v0.24.0Compare Source
Library
0.24.0, CLI0.6.0.Fixed
cancel()returned a false success so the consumer's next call hung, looking like a mid-transfer freeze.cancel_transfernow detects the wedge (GET_DEVICE_STATUStiming out, distinct from an unsupported-op stall), issues a session-less USBDEVICE_RESETto un-stick the transport, and returns the newError::DeviceResetinstead of a false success. It deliberately does not reopen: post-reset these devices need a span of quiet to tear the old session down, so reopen is the caller's job (drop the device, wait a few seconds, reopen with idle-spaced backoff; hammering re-wedges it).download_windowedavoids the path entirely (no multi-MB backlog to cancel). Reported by @qarmin.GetPartialObject. Previouslydownloadwith aByteRange::From/Range,download_windowed, andread_rangeall hard-requiredGetPartialObject64(0x95C1), the 64-bit-offset op. Many PTP cameras (e.g. the Panasonic Lumix DMC-TZ61, #12) only advertise the 32-bitGetPartialObject(0x101B), so these calls failed withUnsupported. The backend now falls back to the 32-bit op for any offset that fits inu32(files up to 4 GiB); a resume past 4 GiB still needs the 64-bit op (returnsError::InvalidData), and a device with neither op returnsError::Unsupported. The op selection (plan_partial_read) is unit-tested, and the 32-bit path is covered end-to-end against a virtual device configured without the 64-bit op.Changed
PtpError::DeviceResetvariant. The low-levelptp::PtpErrorenum is not#[non_exhaustive], so code that exhaustively matches it must add an arm. The neutralmtp::Errorgains the sameDeviceResetvariant but is#[non_exhaustive], so matching it with a wildcard arm is unaffected. See the #18 fix above for what the variant means.docs/debugging.mdis now a debugging hub (macOSptpcameradblocker, software-reset recovery, fast-fail timeouts, Samsung/Android gotchas), linked from AGENTS.md. Integration tests read anMTP_TEST_TIMEOUT_SECSoverride (default 30) so a wedged or absent device skips fast instead of stalling, and an opened device reporting zero storages (a half-authorized phone) now skips cleanly instead of panicking.VirtualDeviceConfiggains asupports_partial_object_64: boolfield (featurevirtual-device). Set ittrueto keep the previous behavior; set itfalseto model a camera that only implements the 32-bitGetPartialObjectand exercise the fallback above. Only affects code that constructsVirtualDeviceConfigdirectly (test setups).MTP_RUN_SLOW_TESTS=0andMTP_RUN_DROP_RECOVERY=0used to enable the gated test (a bare "is the var defined" check); they now correctly mean "off". Only1/true/yes/onenable. Reported by @juleskers in #12.Configuration
📅 Schedule: (in timezone Europe/Budapest)
🚦 Automerge: Enabled.
♻ Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.