Skip to content

apt_changelog.py: Fix the PPA source package URL - #80

Open
Amadeus-22 wants to merge 1 commit into
linuxmint:masterfrom
Amadeus-22:fix-ppa-changelog-uri
Open

Amadeus-22 wants to merge 1 commit into
linuxmint:masterfrom
Amadeus-22:fix-ppa-changelog-uri

Conversation

@Amadeus-22

Copy link
Copy Markdown
Contributor

For a package from a Launchpad PPA, apt changelog builds the pool URL with:

"https://ppa.launchpadcontent.net/%s/%s/ubuntu/pool/main/{self.source_prefix()}/%s" % (...)

There is no f prefix, so the URL contains the literal text {self.source_prefix()} instead of the pool prefix (libf for libfoo). The .dsc / .debian.tar.* lookup then always fails, and the command falls back to the last change only (or exits with 4 when that is missing too), for every PPA package without a local changelog or with --no-local.

The fix passes self.source_prefix() as a format argument, the same prefix get_apt_changelog_uri() already uses for the regular archive.

Checked with a script that stubs the network calls and records the URL:

before: .../ubuntu/pool/main/{self.source_prefix()}/libfoo
after:  .../ubuntu/pool/main/libf/libfoo

The Launchpad PPA pool URL was a plain string containing an f-string
placeholder, so it was built with a literal '{self.source_prefix()}'
segment and the .dsc lookup always failed, falling back to the last
change only. Use source_prefix() like get_apt_changelog_uri() does.
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.

1 participant