[BUG] Pip updates fail through Agent broker: Global is sent as Machine
维护者通常 1 天内回复
评估
调研方向
Start by examining the Pip inventory in src/UniGetUI.PackageEngine.Managers.Pip/Pip.cs to see how PackageScope.Global is assigned. Then review BrokerRequestBuilder.cs to understand the mapping from Global to Machine. The Agent's Pip command builder in the devolutions-gateway repository shows what scopes are supported. The fix involves distinguishing between interpreter base-site and user-site installations and adjusting the scope mapping accordingly. Test with a per-user Python installation having both base-site and user-site packages.
由索引模型根据 Issue 内容生成。
描述
Please confirm these before moving forward
- I have searched for my issue and have not found a work-in-progress/duplicate/resolved issue.
- I have tested that this issue has not been fixed in the latest (beta or stable) release.
- I have checked the FAQ section for solutions.
- This issue is about a bug (if it is not, please use the correct template).
UniGetUI Version
2026.3.0 (latest stable)
Windows version, edition, and architecture
Windows 11 x64, build 26200
Describe your issue
Observed behavior
With UniGetUI 2026.3.0 and Devolutions Agent 2026.3.0, the broker is reachable and its policy is loaded. Pip updates fail before pip starts:
Broker package manager 'Pip' does not support scope 'Machine'.
This affects unrelated Pip packages and is distinct from #5273, where the broker itself is unavailable.
Root cause
- Pip inventory currently labels installed and updatable distributions
PackageScope.Globalwithout determining their actual installation scheme. BrokerRequestBuildermapsGlobalto brokerMachinefor every manager. The Agent advertises onlyUserfor Pip and rejectsMachine/elevated Pip requests.- Simply changing every request to
Useris not correct: the Agent adds--user, which installs into the Python user-site. A per-user Python installation can also have packages in its separate interpreter base-site. On this machine both schemes occur under the same Python 3.10 interpreter. - The Agent resolves
python.exefrom the target user PATH rather than receiving a bound interpreter identity. The client also sends the Pip source URL although the Agent Pip builder rejects explicit source URLs. A scope-only change would therefore still not provide reliable updates.
Expected behavior / proposed fix
- Discover and retain the Python interpreter and installation scheme for each Pip distribution. Do not treat Pip
Globalas proof of OS-wideMachinescope. - Define broker semantics for interpreter base-site versus Python user-site. For a per-user interpreter, run base-site updates under the same non-elevated user without
--user; use--useronly for confirmed user-site packages. Bind discovery and execution to the same validated interpreter. Do not allow a client-supplied arbitrary executable path to bypass broker policy. - Keep true
Machine/elevated Pip operations unsupported until the Agent can select and validate a trusted system-wide Python and its imported pip modules. Do not elevate a user-writable Python installation. - Represent default PyPI without an unsupported explicit source URL, and validate/authorize any custom index in the broker protocol.
- Until end-to-end support exists, reject unsupported Pip broker operations before queueing with an actionable capability message. Do not silently fall back to local execution when the broker is required.
Suggested regression tests
- Base-site package in a per-user Python: same interpreter, no elevation, no
--user, no duplicate user-site installation. - User-site package: same interpreter,
--user. - Different Python on PATH: never update a different interpreter from the one inventoried.
Machine/elevated Pip: rejected unless a trusted system-wide interpreter is explicitly supported.- Default versus custom package source, and mixed bulk updates with other managers.
Steps to reproduce the issue
- Install Python for the current Windows user and install a package into its interpreter base-site (ordinary
python -m pip install <package>). Optionally install another package with--userinto the separate user-site. - Install UniGetUI 2026.3.0 and Devolutions Agent 2026.3.0, enable a working Agent broker, then refresh Pip updates.
- Start an update for either Pip package. The operation fails at broker validation with the same
Machine-scope message, before pip runs.
UniGetUI Log
Broker package manager 'Pip' does not support scope 'Machine'.
Package Managers Logs
No pip process/output: the broker rejects the request before invoking the package manager.
Relevant information
Relevant source paths (release v2026.3.0):
- UniGetUI Pip inventory: https://github.com/Devolutions/UniGetUI/blob/v2026.3.0/src/UniGetUI.PackageEngine.Managers.Pip/Pip.cs
- UniGetUI scope translation: https://github.com/Devolutions/UniGetUI/blob/v2026.3.0/src/UniGetUI.PackageEngine.AgentBroker/BrokerRequestBuilder.cs
- Agent Pip capabilities and command builder: https://github.com/Devolutions/devolutions-gateway/blob/v2026.3.0/crates/now-package-broker/src/server/responses.rs and https://github.com/Devolutions/devolutions-gateway/blob/v2026.3.0/crates/now-package-broker/src/command_builder/pip.rs
- UniGetUI local Pip update behavior: https://github.com/Devolutions/UniGetUI/blob/v2026.3.0/src/UniGetUI.PackageEngine.Managers.Pip/Helpers/PipPkgOperationHelper.cs
Screenshots and videos
No response
- 主要语言
- C#
- 星标
- 26.6k
- 派生
- 945
- 平均合并
- 22 小时 5 分钟
- 30 天内合并 PR
- 76
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
Devolutions/UniGetUI 的其他 Issue
-
bug
难度 1/5 1 小时以内 新手友好度 85/100
Devolutions/UniGetUI#5029 · 2 条评论 ·
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 75/100
Devolutions/UniGetUI#4918 ·
维护者通常 1 天内回复
-
bug
难度 1/5 1 小时以内 新手友好度 88/100
Devolutions/UniGetUI#4768 ·
维护者通常 1 天内回复
-
[IMPROVEMENT] UI/UX Architecture layers: Package Bundle Catalogue and Startup Operations Integration未关闭enhancement
难度 5/5 一周以上 新手友好度 12/100
Devolutions/UniGetUI#5524 ·
维护者通常 1 天内回复
-
enhancement
难度 5/5 一周以上 新手友好度 15/100
Devolutions/UniGetUI#5523 ·
维护者通常 1 天内回复
查看 Devolutions/UniGetUI 的全部 Issue
相似的 Issue
-
7.0
难度 2/5 1-3 小时 新手友好度 72/100
unoplatform/uno.extensions#3253 ·
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 62/100
Sector-Vestige/Sector-Vestige#476 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 75/100
PowerShell/platyPS#868 ·
-
S: Untriaged
难度 2/5 1-3 小时 新手友好度 62/100
Trauma-Station/Trauma-Station#5058 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 82/100
维护者通常 2 天内回复