Skip to content

Add "pkgwrap doctor" for diagnostics and bug reports #16

Description

@trmxvibs

Context

Every bug report needs the same information: OS, detected backend, whether
the cache is in play, Python version, pkgwrap version. Right now reporters
assemble that by hand, and the issue template asks for it piece by piece.

Proposal

$ pkgwrap doctor
pkgwrap 0.2.0 (Python 3.12.3, Linux 6.8.0)
Detected backend: apt (/usr/bin/apt)
Detection source: cache (~/.config/pkgwrap/backend.json, version 2)
Root: no    sudo: available
Colour: enabled    Unicode: enabled
Supported operations: install, remove, refresh, upgrade, search, list, info, clean

Rules: read-only, no sudo, never runs a package manager command, prints no
personal paths beyond the config directory.

Acceptance criteria

  • pkgwrap doctor prints the report above
  • Reports which operations the detected backend actually supports
  • Says whether detection came from PKGWRAP_BACKEND, the cache, or a probe
  • Tests for the detected-vs-cached and supported-operations logic
  • Bug report template points at it

Pointers

  • src/pkgwrap/detector.py — detection sources
  • src/pkgwrap/backends/base.py — _unsupported() marks unsupported ops
  • src/pkgwrap/ui.py — supports_color(), supports_unicode()

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions