update-install-packages

star 0

Update Ubuntu package configuration files for package add/delete operations.

open-edge-platform By open-edge-platform schedule Updated 6/11/2026

SPDX-FileCopyrightText: (C) 2026 Intel Corporation

SPDX-License-Identifier: Apache-2.0

name: update-install-packages description: Update Ubuntu package configuration files for package add/delete operations.

Trigger Phrases

  • update install packages
  • add package to auto-install-pkgs
  • delete package from ict template
  • modify ubuntu package list
  • update-install-packages
  • add missing packages
  • install hardware packages
  • add hardware drivers
  • install device drivers
  • manage system packages
  • configure package list
  • add kernel drivers
  • install missing dependencies

Required Inputs

  • enib_home: absolute path to this repository root
  • package_operation: add|delete
  • packages_list: comma-separated package names
  • target_config_file: auto-install-pkgs|ict-template|both

Preconditions

  • Repository exists and is writable: test -d <enib_home> && test -w <enib_home>
  • Target files exist:
    • test -f <enib_home>/infrastructure/host-os/auto-install-pkgs.yaml
    • test -f <enib_home>/infrastructure/host-os/ict/ubuntu24-x86_64-minimal-ptl.yml
  • package_operation is one of add|delete.
  • target_config_file is one of auto-install-pkgs|ict-template|both.
  • packages_list is not empty.
  • Validate each package name format (letters, digits, ., +, -) and reject invalid tokens.
  • MANDATORY: Verify package availability in Ubuntu 24.04 repositories for each requested package using apt-cache show <package_name>. If package not found, use apt-cache search <keyword> to find alternatives and present to user for selection.
  • Create backup copies before modifying configuration files.
  • Prompt for sudo confirmation only before privileged or destructive operations.
  • Sudo probe (MANDATORY before any privileged step such as sudo apt update/sudo apt install): run sudo -n true. If exit is non-zero, stop and instruct the user to run sudo -v in their terminal (or add a scoped NOPASSWD entry in /etc/sudoers.d/ for the specific binary), then re-trigger the skill. If sudo -v was already run but sudo -n true still fails, the user must make sudo timestamps global (tty_tickets issue): echo 'Defaults timestamp_type=global' | sudo tee /etc/sudoers.d/agent-timestamp && sudo chmod 0440 /etc/sudoers.d/agent-timestamp && sudo visudo -c. See AGENTS.md.

Steps

  1. Collect required inputs:
  • package_operation, packages_list, and target_config_file.
  • Split and normalize packages_list into individual package names.
  • Optionally collect hardware details (e.g., device name, model, vendor).
  1. Validate operation and package list:
  • Reject invalid operation/target values.
  • Reject invalid package name formats.
  • CRITICAL: Verify package availability in Ubuntu 24.04 repositories using apt-cache show <package_name>.
  • For add operations: MANDATORY - Query Ubuntu 24.04 apt repositories using apt-cache show <package_name> to confirm each package exists before adding to target_config_file. If a package is not found, suggest alternative package names using apt-cache search <keyword> and present options to the user. Reject any packages not found in official Ubuntu 24.04 repositories after validation.
  1. If hardware details provided, search Ubuntu 24.04 repositories:
  • Query repository metadata for corresponding userspace or kernel-space packages matching the hardware device.
  • Return matched packages to user for confirmation before adding to packages_list.
  • Merge confirmed packages with the original packages_list.
  1. Run preconditions and create backups:
  • Backup infrastructure/host-os/auto-install-pkgs.yaml and/or infrastructure/host-os/ict/ubuntu24-x86_64-minimal-ptl.yml before modification.
  1. Update target configuration files based on target_config_file:
  • auto-install-pkgs: update host-os/auto-install-pkgs.yaml.
  • ict-template: update host-os/ict/ubuntu24-x86_64-minimal-ptl.yml.
  • both: update both files.
  1. If adding more packages in host-os/auto-install-pkgs.yaml, add only the cumulative package size to existing DISK_SIZE in host-os/prepare-host-img.sh when cumulative package size exceeds 1GB. Do not increment disk size for packages under 1GB (existing disk allocation already includes future headroom).
  2. For packages that depend on kernel (performance tools, kernel drivers, or userspace packages with kernel dependencies), create symbolic links to the custom Intel kernel inside infrastructure/installation-scripts/setup-kernel-depended-pkgs.sh as a workaround. Do not start setup-kernel-depended-pkgs.sh if updated as part of auto-install-pkgs.yaml and ubuntu24-x86_64-minimal-ptl.yml; this script will start during the provisioning process separately.
  3. Validate updated YAML syntax for modified files.
  4. Summarize package update results for each modified file.
  5. If user asks for artifact packaging, hand off to the dedicated packaging skill.

Validation

  • Configuration update summary is complete for add/delete operations.
  • Updated YAML files parse successfully.
  • Backup files exist for each modified config file.

Rollback

  • Restore modified configuration files from backups if update or validation fails.

Safety Rules

  • Stop on failed preconditions.
  • Backup configuration files before modification.
  • Validate YAML syntax after updates.
  • Ask before privileged or destructive actions.
  • Ask for sudo confirmation only before privileged or destructive operations.
  • Never infer credentials, certificates, SSH keys, or secrets.
  • Stop on precondition or validation failure and provide next-action guidance.
  • Do not overwrite ICT source template; always copy to working template.
  • Verify package availability in Ubuntu 24.04 repositories.

Expected Result Summary

Return:

  • whether preconditions passed
  • requested package operation and normalized package list
  • target files selected and backup file paths
  • per-file package change results (added/deleted/already-present/not-found)
  • YAML validation status
  • whether packaging handoff was requested
  • troubleshooting hints when package update fails (for example validation, permissions, or repository metadata issues)

Troubleshooting Notes

  • Package Not Found: If apt-cache show <package> returns nothing, the package name is incorrect or the package doesn't exist. Use apt-cache search <keyword> to find the correct package name. Common issues:
    • Different naming conventions: check for suffixes like -dev, -tools, or version numbers
    • Package might be in a different repository (Intel overlay, third-party PPA)
  • If package validation fails, confirm package names against Ubuntu 24.04 repository metadata and retry.
  • If YAML validation fails, restore from backup and reapply package updates with corrected formatting.
  • If file update fails, verify write permissions for target files and backup paths.
Install via CLI
npx skills add https://github.com/open-edge-platform/edge-node-infrastructure-blueprint --skill update-install-packages
Repository Details
star Stars 0
call_split Forks 4
navigation Branch main
article Path SKILL.md
More from Creator
open-edge-platform
open-edge-platform Explore all skills →