Skip to content

v0.10.0

Latest

Choose a tag to compare

@emiliano-go emiliano-go released this 29 Jul 18:17
156fe73

TL;DR

Sixteen commits since v0.9.0 rewire repo discovery to use pacman -Sl + pacman -Q instead of the broken pacman -Q --repo path, replace AUR RPC calls with a local metadata-dump snapshot for trustsight review, split repo warnings into "does not exist" vs "exists but no packages", add a first-run sentinel to suppress duplicate messages, drop Python 3.10 (stdlib tomllib everywhere), and add optdepends for python-cryptography and pyalpm.

Changed

  • get_installed_from_repo() rewired from pacman -Q --repo (which missed packages not tracked as repo-origin) to pacman -Sl <repo> + pacman -Q. The old approach only found packages whose pacman -Q shows an explicit repository name; the new one lists the repo's contents via -Sl and cross-references with -Q.
  • Discovery for review replaced AUR RPC calls with the local metadata-dump snapshot (full-aur-meta.json, from full_aur/metadata.py). Installed versions are compared against snapshot versions via vercmp instead of per-package AUR RPC info queries. Falls back to the RPC on failure.
  • Repo warnings split into two distinct messages: repo 'X' does not exist (when pacman -Sl fails) and repo 'X' exists but no packages from it are installed (when the repo exists but -Q finds nothing).
  • _get_installed_packages() now correctly cross-references repo packages and foreign packages, respecting --repo, --foreign, and --all-repos flags. Previous implementation only collected foreign packages when a repo was specified.
  • First-run sentinel. _discover_packages() returns (None, 0) on the first metadata fetch so that review() does not emit a duplicate "No outdated packages found" message.
  • Python >=3.11 required. requires-python bumped from >=3.10 to >=3.11. The tomli compat shim (src/trustsight/_toml.py) and its conditional dependency in pyproject.toml are removed. All imports use stdlib tomllib.
  • CI matrix drops Python 3.10.

Added

  • Regression tests for metadata-dispatch bugs (first-run sentinel, repo warnings in metadata path, cross-referencing repos, deduplication). 7 new tests in tests/test_cli.py.
  • optdepends for python-cryptography and pyalpm in packaging/aur/PKGBUILD.
  • Line mapping for findings. map_diff_lines() maps diff line indices to file names and line numbers. Findings from apply_rules() now carry file/line context propagated through ScoreEntry and PackageFact.
  • Per-file change tracking. DiffSummary.file_changes lists every changed file with its status (added/removed/modified), excluding .SRCINFO and .gitignore.
  • Corpus analysis adapter. analyze_package_text() analyzes raw old/new PKGBUILD text via difflib.unified_diff, enabling the full-AUR corpus pipeline (no git repository required).

Fixed

  • All 3 namcap warnings resolved by removing the tomli dependency and adding optdepends.

Removed

  • watch command. Removed in favour of running trustsight baseline build via cron. The baseline build command already handles incremental updates (diff + process changed) when a prior metadata snapshot exists. Use --json for machine-parseable cron output.
  • src/trustsight/_toml.py removed along with the tomli fallback for Python 3.10.

Stats

  • 38 files changed, +923 / -312
  • 734 tests (19 files), all passing
  • Package version 0.10.0