Skip to content

fix: preserve relationships in APT package index - #18

Open
wmdhs12138 wants to merge 1 commit into
Hope2333:native-androidfrom
wmdhs12138:fix/packages-index-relationships
Open

fix: preserve relationships in APT package index#18
wmdhs12138 wants to merge 1 commit into
Hope2333:native-androidfrom
wmdhs12138:fix/packages-index-relationships

Conversation

@wmdhs12138

Copy link
Copy Markdown

Summary

  • preserve Debian relationship fields when generating Packages.gz
  • include Pre-Depends, Depends, Recommends, Suggests, Enhances, Conflicts, Breaks, Replaces, and Provides when present
  • omit absent relationship fields instead of emitting an empty Depends

Problem

read_control() extracts these fields from each .deb, but the manually assembled index stanza previously discarded everything except Depends. For example, the native opencode package contains:

Conflicts: opencode-glibc, opencode-compressed

The generated Packages.gz omitted it. With the flat APT source enabled, this metadata mismatch can make APT select the repository copy of an already-installed same-version package again.

Verification

  • python -m py_compile tools/gen-packages-index.py
  • generated an index from opencode_1.18.29_aarch64.deb
  • confirmed the generated stanza retains Conflicts: opencode-glibc, opencode-compressed
  • git diff --check

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