chainguard-dev / apko

Build OCI images from APK packages directly without Dockerfile
https://apko.dev
Apache License 2.0
1.21k stars 125 forks source link

Disqualify conflicts with self for packages #1415

Open jonjohnsonjr opened 13 hours ago

jonjohnsonjr commented 13 hours ago

Previously, we called disqualifyConflicts to disqualify any packages that would conflict with whatever package we selected. This made it possible to pick multiple packages with the same name, which we'd then deduplicate and end up with whatever the first package was. That's unexpected and produced solutions that were missing a package in a few corner cases, mostly caused by old packages (in wolfi) providing things accidentally that weren't withdrawn.

I've manually tested this change against our large corpus of images and nothing failed to solve.