Skip to content

Add Android METADATA package handler - #5389

Open
sunandapandit03 wants to merge 1 commit into
aboutcode-org:developfrom
sunandapandit03:add-android-metadata-support
Open

sunandapandit03 wants to merge 1 commit into
aboutcode-org:developfrom
sunandapandit03:add-android-metadata-support

Conversation

@sunandapandit03

Copy link
Copy Markdown

Adds a handler for Android third_party METADATA files (protobuf text format),
as a first step for #2844.

What it parses:

  • name and description
  • third_party.version
  • third_party.url entries: HOMEPAGE -> homepage_url, GIT -> vcs_url,
    ARCHIVE -> download_url
  • last_upgrade_date -> extra_data
  • license_type (RESTRICTED, BY_EXCEPTION_ONLY, ...) -> extra_data

Notes / questions:

  • license_type values are Android license categories, not SPDX expressions,
    so I stored them in extra_data instead of extracted_license_statement.
    Happy to change this if you prefer a different mapping.
  • Package type is "generic" for now.
  • is_datafile skips *.dist-info and *.egg-info parent folders so PyPI METADATA
    files are not picked up, and requires "third_party" near the top of the file.
  • Follow-ups in separate PRs: README.version and Android.bp.

Tests:

  • New tests/packagedcode/test_android_metadata.py with two fixtures
    (exfatprogs and a BY_EXCEPTION_ONLY file).
  • Existing tests/packagedcode/test_pypi.py still passes.
  • Plugin listing fixtures (plugins_list_linux.txt, help.txt) updated by hand,
    because the list test only runs against the Linux file.

Parse Android third_party METADATA protobuf text files into package data. Refs aboutcode-org#2844

Signed-off-by: sunandapandit03 <sunandapandit53@gmail.com>

This branch has not been deployed

No deployments
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