|
| 1 | +# How To: Inspect Resolved Package Configuration |
| 2 | + |
| 3 | +This guide shows how to use `azldev package list` to audit the effective |
| 4 | +binary-package configuration for your project without running a build. |
| 5 | + |
| 6 | +## Background |
| 7 | + |
| 8 | +Binary package configuration in azldev is assembled from up to four layers |
| 9 | +(see [Package Groups](../reference/config/package-groups.md) for details): |
| 10 | + |
| 11 | +1. Project `default-package-config` |
| 12 | +2. Package group `default-package-config` |
| 13 | +3. Component `default-package-config` |
| 14 | +4. Component `packages.<name>` override (highest priority) |
| 15 | + |
| 16 | +`azldev package list` resolves all of these layers and prints the effective |
| 17 | +configuration for each package you ask about. |
| 18 | + |
| 19 | +## List All Explicitly-Configured Packages |
| 20 | + |
| 21 | +Use `-a` to enumerate every package that appears in any package-group or |
| 22 | +component `packages` map: |
| 23 | + |
| 24 | +```bash |
| 25 | +azldev package list -a |
| 26 | +``` |
| 27 | + |
| 28 | +Example output: |
| 29 | + |
| 30 | +``` |
| 31 | +╭──────────────────┬────────────────┬───────────┬──────────────╮ |
| 32 | +│ PACKAGE │ GROUP │ COMPONENT │ CHANNEL │ |
| 33 | +├──────────────────┼────────────────┼───────────┼──────────────┤ |
| 34 | +│ curl-debugsource │ debug-packages │ │ rpm-debug │ |
| 35 | +│ libcurl │ base-packages │ │ rpm-base │ |
| 36 | +│ libcurl-devel │ devel-packages │ curl │ rpm-base │ |
| 37 | +│ wget2-wget │ │ wget2 │ rpm-base │ |
| 38 | +╰──────────────────┴────────────────┴───────────┴──────────────╯ |
| 39 | +``` |
| 40 | + |
| 41 | +### Column meanings |
| 42 | + |
| 43 | +| Column | Meaning | |
| 44 | +|--------|---------| |
| 45 | +| **Package** | Binary package name (RPM `Name` tag) | |
| 46 | +| **Group** | Package-group whose `packages` list contains this package, if any | |
| 47 | +| **Component** | Component that has an explicit `packages.<name>` override for this package, if any | |
| 48 | +| **Channel** | Effective publish channel after all config layers are applied | |
| 49 | + |
| 50 | +> **Note:** A non-empty **Component** column means the component has an explicit |
| 51 | +> per-package entry in its `packages` map — it does **not** mean "the component |
| 52 | +> whose spec produces this package". Packages that get their configuration only |
| 53 | +> from the project default or a package-group will show an empty Component. |
| 54 | +
|
| 55 | +## Look Up Specific Packages |
| 56 | + |
| 57 | +Use `-p` to look up one or more packages by exact name. Packages that are not |
| 58 | +in any explicit configuration are still shown — they resolve using only the |
| 59 | +project default: |
| 60 | + |
| 61 | +```bash |
| 62 | +azldev package list -p libcurl -p libcurl-devel -p curl-debugsource |
| 63 | +``` |
| 64 | + |
| 65 | +Positional arguments are equivalent to `-p`: |
| 66 | + |
| 67 | +```bash |
| 68 | +azldev package list libcurl libcurl-devel curl-debugsource |
| 69 | +``` |
| 70 | + |
| 71 | +You can combine `-a` and `-p` — the results are the union of both selections. |
| 72 | + |
| 73 | +## Machine-Readable Output |
| 74 | + |
| 75 | +Pass `-q -O json` to get JSON output suitable for scripting: |
| 76 | + |
| 77 | +```bash |
| 78 | +azldev package list -a -q -O json |
| 79 | +``` |
| 80 | + |
| 81 | +```json |
| 82 | +[ |
| 83 | + { |
| 84 | + "packageName": "libcurl", |
| 85 | + "group": "base-packages", |
| 86 | + "component": "", |
| 87 | + "channel": "rpm-base" |
| 88 | + }, |
| 89 | + ... |
| 90 | +] |
| 91 | +``` |
| 92 | + |
| 93 | +## Alias |
| 94 | + |
| 95 | +`pkg` is an alias for the `package` subcommand: |
| 96 | + |
| 97 | +```bash |
| 98 | +azldev pkg list -a |
| 99 | +``` |
0 commit comments