canonical / canonical/cloud-init

Can no longer use apt patterns in apt packages

Open
#6,350 1 comment 0 reactions 0 assignees View on GitHub
bug
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.