Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Find first source package name for a binary package with published sources #19

Merged
merged 1 commit into from
Sep 16, 2023

Conversation

philroche
Copy link
Contributor

If a changelog is not found for a binary package then iterate through list of all source package for with binaries published of that name - not just the first source package found.

This fixes a problem with metapackages like linux-gce-edge:

❯ ubuntu-package-changelog --entries=1 jammy Updates linux-gcp-edge
no changelog found

vs (with the commit present)

❯ ubuntu-package-changelog --entries=1 jammy Updates linux-gcp-edge
INFO: No published sources found for linux-gcp-edge in jammy Updates
INFO:   Trying to find a binary package with that name ...
INFO:   Found source package linux-meta-gcp-6.2 for binary package linux-gcp-edge with published sources.
INFO:   Changelog for source package linux-meta-gcp-6.2 will be parsed

linux-meta-gcp-6.2 (6.2.0.1010.10~22.04.1) jammy; urgency=medium

  * Bump ABI 6.2.0-1010.10~22.04

  * Packaging resync (LP: #1786013)
    - [Packaging] resync debian/dkms-versions from main package

 -- Khalid Elmously <[email protected]>  Tue, 18 Jul 2023 04:39:30 -0400

The source packages are sorted by date with newest first so we will always have the latest returned.

In this instance it is a metadata package which will not have a very informative changleog but it is more helpful than no changelog and at least it is known what the source package name is.

…ed sources

If a changelog is not found for a binary package then iterate through list of all source package
for with binaries published of that name - not just the first source package found.

This fixes a problem with metapackages like linux-gce-edge:

```
❯ ubuntu-package-changelog --entries=1 jammy Updates linux-gcp-edge
no changelog found
```

vs (with the commit present)

```
❯ ubuntu-package-changelog --entries=1 jammy Updates linux-gcp-edge
INFO: No published sources found for linux-gcp-edge in jammy Updates
INFO:   Trying to find a binary package with that name ...
INFO:   Found source package linux-meta-gcp-6.2 for binary package linux-gcp-edge with published sources.
INFO:   Changelog for source package linux-meta-gcp-6.2 will be parsed

linux-meta-gcp-6.2 (6.2.0.1010.10~22.04.1) jammy; urgency=medium

  * Bump ABI 6.2.0-1010.10~22.04

  * Packaging resync (LP: #1786013)
    - [Packaging] resync debian/dkms-versions from main package

 -- Khalid Elmously <[email protected]>  Tue, 18 Jul 2023 04:39:30 -0400

```

The source packages are sorted by date with newest first so we will always have the latest returned.

In this instance it is a metadata package which will not have a very informative changleog but it
is more helpful than no changelog and at least it is known what the source package name is.
@toabctl toabctl self-requested a review August 4, 2023 13:56
@toabctl toabctl merged commit d4c586e into toabctl:main Sep 16, 2023
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants