azldev-remove-component
它能做什么
这项技能说明如何手动删除组件,因为 azldev 没有移除命令。它适用于要从 azldev 发行版中淘汰某个软件包的开发者。
适用场景
- ✓当你想从 azldev 发行版中去掉某个软件包时。
- ✓当一个软件包有依赖者,移除后可能会出问题时。
- ✓当发布或软件包组设置中仍然提到已移除的软件包时。
技能链接
https://github.com/microsoft/azurelinux/blob/4.0/.agents/skills/azldev-remove-component/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“我想从我们的 azldev 发行版中移除旧的 foo 软件包。请帮我检查哪些内容依赖它,并清理相关引用。”
每周 5 个新技能,1 分钟读完。
工作原理
智能体会检查反向依赖,删除组件的定义、锁文件和渲染后的规格文件,然后清理残留的引用。对于影响其他构建的修改,它会进行验证。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Remove a component
There is no azldev command to remove a component — it is a manual edit. A
deletion-only change needs no package build, but changes to dependents, package/image
configuration, or other built inputs must follow the repository's normal validation
requirements. The steps below delete the component's definition, lock, and rendered
spec, then clean up references.
Before you start
Confirm the component exists and inspect its resolved configuration:
azldev comp list -p <name> -q -O json
Check for reverse dependencies first: if other components BuildRequires or
Requires this one, removing it breaks their builds. Search the tree for the
component name. Identify its binary subpackage names from the rendered output under
specs/<first-char>/<name>/, then search for those names too.
azldev comp query currently supports local spec sources only, not the usual upstream
spec source.
Steps
Remove the definition. Delete the component's dedicated
<name>/<name>.comp.tomldirectory, or remove its inline[components.<name>]entry from whichever included TOML defines it.Remove publish / package config references. If your project configures publish channels or package groups, drop any references to the component or to its binary subpackages. Publishing is component-scoped; per-binary exceptions are binary-RPM-scoped — search for both.
Remove the lock. There is no azldev command for this:
rm locks/<name>.lockRemove the rendered spec. Let azldev prune orphaned spec directories:
azldev comp render -a --clean-stale--clean-stale(only valid with-a) removes rendered-spec directories that no longer correspond to a configured component. It re-renders everything, so it is slow; for a targeted removal you can instead delete the component's rendered spec underspecs/by hand.Check other references. Grep for the component (and its binary names) in image definitions and any
*.kiwi/ package-list files, and remove or replace them — an image that installs a now-removed package will not build.
Verify
azldev comp list -p <name> -q -O json # should report the component is not found
Also confirm the lock and rendered spec directory are gone and that no image or package configuration still references the component.
If the removal required changes to dependents or package/image configuration, build and test the affected outputs according to the repository's normal validation policy.
Notes
- Dependents with manual release. If removing this component forces a change
in a dependent (e.g. dropping a
BuildRequires), and that dependent setsrelease.calculation = "manual", bump its release counter yourself in the same change. Components with automatic release calculation (auto,autorelease,static) are handled by the normal commit/render/amend cycle. - Remove exclusive dependencies together. If a package is only needed by the component you are dropping, remove it in the same change to keep the tree consistent.
Generated by azldev docs agent; do not hand-edit.
常见问题
有移除软件包的命令吗?
没有。技能说明,azldev 没有移除命令,因此移除需要手动编辑。
如何找到依赖者?
技能说明,应在目录树中搜索组件名称及其二进制子包名称。
删除操作需要构建软件包吗?
技能说明,只涉及删除的变更不需要构建,但其他影响输出的变更仍需遵循正常的验证流程。
详情
作者的原始描述
Read this before deleting or dropping a component; there is no azldev remove command, so doing it wrong leaves dangling state. Explains the manual removal workflow for deleting component metadata, cleaning references, and validating any related output-affecting changes. Triggers include remove component, delete package, drop component, prune dependency.
repo: microsoft/azurelinux
热度
- GitHub 星标
- 5.4k
- 排名
- #14967
- 许可证
- MIT
- 更新时间
- 2026/11/2
评论
- …
同一仓库的更多技能
azldev-add-component
5.4k帮你的智能体把新的软件组件添加到 azldev Linux 发行版构建中,从检查上游规格文件(spec)到验证结果。
azldev-build-component
5.4k帮你的智能体构建和调试 azldev 软件包,包括渲染、构建和测试循环,以及修复失败的构建检查。
azldev-comp-toml
5.4k帮你的智能体编写、编辑和审查 azldev 用来描述每个软件包如何构建的组件定义文件。
azldev-image
5.4k帮你的智能体使用 azldev 镜像命令构建、启动和测试 Linux 镜像,例如容器镜像或虚拟机镜像。