canonical / canonical/cloud-init
Can no longer use apt patterns in apt packages
- Dominant language
- Python
- Stars
- 3.8k
- Forks
- 1.1k
- Avg merge
- 2d 23h
- Merged PRs (30d)
- 18
Description
# Bug report
Since the apt package handling now checks to see that packages exist in the package list before trying to install (https://github.com/canonical/cloud-init/blob/main/cloudinit/distros/package_management/apt.py#L129), it is no longer possible to specify apt patterns to install, e.g. `?priority(standard)`. If this is fixed, it should support complex apt patterns, e.g. `'?priority(standard) ?not(?name(systemd-timesyncd))'`.
## Steps to reproduce the problem
```
#cloud-config
packages: ['?priority(standard)']
```
## Environment details
- Cloud-init version: 25.1.4
- Operating System Distribution: Debian 13
- Cloud provider, platform or installer type: LXD/Incus
## cloud-init logs
```
apt.py[DEBUG]: The following packages were not found by APT so APT will not attempt to install them: ['?priority(standard)']
```
Contributor guide
Assessment
This issue has not been assessed yet.