Skip to content

fix(tdnf): include epoch in Evr field of JSON transaction output - #18789

Open
Vince Perri (vinceaperri) wants to merge 1 commit into
3.0-devfrom
user/vinceaperri/ic-package-manifest/fix-tdnf-json-epoch
Open

fix(tdnf): include epoch in Evr field of JSON transaction output#18789
Vince Perri (vinceaperri) wants to merge 1 commit into
3.0-devfrom
user/vinceaperri/ic-package-manifest/fix-tdnf-json-epoch

Conversation

@vinceaperri

@vinceaperri Vince Perri (vinceaperri) commented Sep 10, 2026

Copy link
Copy Markdown
Contributor
Merge Checklist
  • The toolchain has been rebuilt successfully (or no changes were made to it)
  • The toolchain/worker package manifests are up-to-date
  • Any updated packages successfully build (or no packages were changed)
  • Packages depending on static components modified in this PR (Golang, *-static subpackages, etc.) have had their Release tag incremented.
  • Package tests (%check section) have been verified with RUN_CHECK=y for existing SPEC files, or added to new SPEC files
  • All package sources are available
  • cgmanifest files are up-to-date and sorted (./cgmanifest.json, ./toolkit/scripts/toolchain/cgmanifest.json, .github/workflows/cgmanifest.json)
  • LICENSE-MAP files are up-to-date (./LICENSES-AND-NOTICES/SPECS/data/licenses.json, ./LICENSES-AND-NOTICES/SPECS/LICENSES-MAP.md, ./LICENSES-AND-NOTICES/SPECS/LICENSE-EXCEPTIONS.PHOTON)
  • All source files have up-to-date hashes in the *.signatures.json files
  • sudo make go-tidy-all and sudo make go-test-coverage pass
  • Documentation has been updated to match any changes to the build system
  • Ready to merge

Summary

tdnf --json remove drops the epoch from the Evr field of a solved transaction, so a package named in a transaction cannot always be matched back to the same package as reported by tdnf --json list installed.

Measured on 3.5.8-8, Azure Linux 3.0:

$ tdnf -j --disablerepo '*' list installed perl-Pod-Escapes | jq -c '.[] | {Name, Evr}'
{"Name":"perl-Pod-Escapes","Evr":"1:1.07-514.azl3"}

$ sudo tdnf -j --assumeno --disablerepo '*' erase perl-Pod-Escapes | jq -c '.Remove[] | select(.Name=="perl-Pod-Escapes")'
{"Name":"perl-Pod-Escapes","Evr":"1.07-514.azl3"}
Change Log
  • Backport tdnf-json-evr-epoch.patch from upstream commit 45a5dd8, merged in vmware/tdnf#603.
  • Bump tdnf to 3.5.8-9.
  • Update the pinned tdnf lines in toolchain_x86_64.txt, toolchain_aarch64.txt, pkggen_core_x86_64.txt and pkggen_core_aarch64.txt.
Does this affect the toolchain?

YES

Associated issues
Test Methodology

Local toolkit build on Azure Linux 3.0, x86_64:

sudo make build-packages -j32 REBUILD_TOOLS=y \
  SRPM_PACK_LIST="tdnf" PACKAGE_BUILD_LIST="tdnf" PACKAGE_REBUILD_LIST="tdnf"

Behaviour verified by extracting the built tdnf and tdnf-cli-libs and running them against the same rpmdb as the shipped 3.5.8-8. JDPkgList() lives in libtdnfcli, so the extracted library is what is exercised here:

# system tdnf 3.5.8-8
{"Name":"perl-Time-Local","Evr":"1.300-514.azl3"}
{"Name":"perl-Socket","Evr":"2.036-514.azl3"}
{"Name":"perl-Pod-Escapes","Evr":"1.07-514.azl3"}

# built tdnf 3.5.8-9
{"Name":"perl-Time-Local","Evr":"2:1.300-514.azl3"}
{"Name":"perl-Socket","Evr":"4:2.036-514.azl3"}
{"Name":"perl-Pod-Escapes","Evr":"1:1.07-514.azl3"}

Those epochs match what rpm -qa --qf '%{EPOCH}' reports for the three packages.

Pipeline build id: pending

@vinceaperri
Vince Perri (vinceaperri) requested a review from a team as a code owner September 10, 2026 16:33
@microsoft-github-policy-service microsoft-github-policy-service Bot added Packaging 3.0 Issues and PRs for Azure Linux 3.0 labels Sep 10, 2026
@vinceaperri
Vince Perri (vinceaperri) changed the base branch from 3.0 to 3.0-dev September 10, 2026 19:19
@microsoft-github-policy-service microsoft-github-policy-service Bot added the 3.0-dev PRs Destined for AzureLinux 3.0 label Sep 10, 2026
@vinceaperri
Vince Perri (vinceaperri) force-pushed the user/vinceaperri/ic-package-manifest/fix-tdnf-json-epoch branch from 8d5d263 to 0f93e8e Compare September 10, 2026 19:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3.0-dev PRs Destined for AzureLinux 3.0 3.0 Issues and PRs for Azure Linux 3.0 Packaging

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant