Aller au contenu
Skillpedia
Déploiement et cloud (DevOps)5.4k · #14968

azldev-update-component

Ce qu’il fait

Cette compétence explique quand et comment mettre à jour les fichiers de verrouillage des composants dans azldev. Elle s'adresse aux développeurs qui terminent une modification sur un paquet ou en ajoutent un nouveau à une distribution azldev.

Quand l’utiliser

  • ✓Quand vous ajoutez un nouveau composant et devez créer son verrouillage avant la compilation.
  • ✓Quand vous terminez une modification d'un paquet et devez actualiser le verrouillage pour une demande de fusion.
  • ✓Quand vous changez le commit ou la version amont utilisé par un paquet.

Lien du skill

https://github.com/microsoft/azurelinux/blob/4.0/.agents/skills/azldev-update-component/SKILL.md

Copiez-le et collez-le dans votre IA (Claude, ChatGPT ou Cursor) en lui demandant de suivre les instructions.

Comment l’utiliser

Le plus simple : copiez le message et collez-le dans votre IA. Elle lit le skill et suit les instructions.

Message prêt à coller

Utilise ce skill pour m’aider : https://github.com/microsoft/azurelinux/blob/4.0/.agents/skills/azldev-update-component/SKILL.md Lis le fichier SKILL.md de ce lien et suis ses instructions pour ma tâche.
Envie que votre IA trouve seule des skills comme celui-ci ?Installez le MCP gratuit de Skillpedia : une ligne, et elle cherche parmi 15 000+ skills avant chaque tâche.Installer en 1 minute →

Exemple de demande à votre IA

“J'ai terminé mes modifications de surcouches pour le paquet curl. Peux-tu actualiser son fichier de verrouillage et refaire le rendu de la spécification ?”

5 nouveaux skills par semaine. 1 minute de lecture.

Comment ça marche

L'agent lance la commande de mise à jour du composant, valide le verrouillage, puis refait le rendu et corrige le résultat comme le décrit le flux de travail. Il utilise l'actualisation d'un seul composant pour le travail quotidien.

Contenu technique (SKILL.md original)

Texte original de l’auteur, en anglais, directement depuis GitHub.

Update component lock files

azldev comp update (comp is an alias for component) refreshes one or more component lock files under locks/. A lock pins the resolved upstream commit plus an input fingerprint computed from the component's render inputs — its TOML config, overlays, the pinned upstream commit, and the distro release version. If any of those change, the lock is stale.

When to run update

Situation Run update?
Adding a new upstream component (no lock yet) Yes — first, to create the lock before render/build can resolve it
Finalizing a component change for a PR Yes — once at the end
Changing source resolution (commit pin, upstream distro/version, or snapshot) Yes — also mid-workflow (see below)
Iterating on overlays / build config / metadata No — once the lock exists, render alone is enough while iterating
Just reading or building existing components No

Refresh a single component with -p <name>. Use -a (all components) only for coordinated mass refreshes (e.g. a new distro snapshot) or when investigating lock drift across many components — it is slow. For day-to-day work use -p. Add -O json for machine-readable lock output when debugging.

End-of-work refresh (the common case)

For most edits — overlays, build flags, metadata — run update once at the end, then re-render after committing so the generated changelog and release reflect your new commit:

azldev comp update -p <name>
azldev comp render -p <name>
git add <changed-component-config-and-source-paths> \
	locks/<name>.lock \
	specs/<first-char>/<name>/
git commit -m "fix(<name>): ..."

# Re-render and amend so the changelog / Release: track the new commit.
azldev comp render -p <name>
git add specs/<first-char>/<name>/
git commit --amend --no-edit

Why the second render-and-amend?

Changelog generation and release calculation are separate. When a spec uses %autochangelog, rpmautospec derives it from the component's git history for every release mode. For non-manual release modes, azldev also derives or bumps Release: from that history. The first render happens before your commit exists, so a fresh render after committing incorporates the new changelog entry and any automatic release bump. Amending folds that output into a single clean commit and keeps rendered-spec / lock CI gates (which run against committed state) green.

For a component with release.calculation = "manual", increment the release counter yourself in the same change. Manual mode is not an exemption from the post-commit render-stage-amend cycle: when the spec uses %autochangelog, that render incorporates the new commit.

Changing source resolution

A source-resolution change follows the same rule, using one commit followed by a post-render amend:

  1. Change the commit pin, upstream distro/version, or snapshot, then azldev comp update -p <name>; sanity-check locks/<name>.lock.

  2. azldev comp render -p <name> — the spec body now tracks the newly resolved source. %changelog / Release: still reflect the previous source; that is expected until you commit.

  3. Iterate on overlays / patches / build config as the new source requires, re-rendering after each change. Re-run update only if you change a source-resolution input again.

  4. azldev comp update -p <name>, then stage and commit all component inputs changed above with the refreshed lock and rendered output:

    git add <changed-component-config-and-source-paths> \
        locks/<name>.lock \
        specs/<first-char>/<name>/
    git commit -m "update(<name>): ..."
    
  5. azldev comp render -p <name> — %changelog / Release: now reflect the new lock.

  6. git add specs/<first-char>/<name>/, then git commit --amend --no-edit so the source change and rendered output land together.

Generated by azldev docs agent; do not hand-edit.

Questions fréquentes

Qu'est-ce qu'un fichier de verrouillage ?

Il fixe le commit amont et une empreinte des entrées, pour que les compilations restent reproductibles.

Quand une mise à jour du verrouillage n'est-elle pas nécessaire ?

La compétence indique que, pendant les itérations sur les surcouches ou les options de compilation, le rendu suffit une fois le verrouillage créé.

Faut-il actualiser tous les composants ?

En général non. La compétence indique que l'actualisation complète est lente et réservée aux mises à jour groupées coordonnées.

Détails

Description originale de l’auteur

Read this before finalizing a component change, changing source resolution, or touching a lock file; lock edits are easy to get wrong. Explains how to refresh azldev component lock files with 'azldev comp update', covering when to run update versus render, the update/render/commit/re-render/amend workflow, and per-component versus -a refresh. Triggers include comp update, refresh lock, bump pin, change snapshot, upstream distro, lock drift, version bump, finalize component.

repo: microsoft/azurelinux

Popularité

Étoiles GitHub
5.4k
Position au classement
#14968
Licence
MIT
Mis à jour
02/11/2026

Ce skill vous est-il utile ?

0

Connectez-vous pour voter.

Commentaires

  • …

Autres skills de ce dépôt

Skills similaires