Skip to content

pkgcheck scan of non-existence target doesn't raise errors #721

Open

Description

@kuraga
$ pkgcheck --debug --verbose scan some-random-string

reports nothing.

But there is an error on

$ pkgcheck --debug --verbose scan --net media-libs/mesa-24.3.0

(note absence of =)

Docs doesn't say what's TARGET though.

Activity

  1. ferringb commented on Dec 15, 2025

    @ferringb
    Contributor

    Re-opening since I think there is something to change here.

    pkgcheck --debug --verbose scan some-random-string

    You're running a scan against any package that matches the pattern; no packages, no scans. I updated the --help to be clearer on this.

    Admittedly it may be surprising if you tell it "scan these non-existant atoms" and it doesn't scan anything. It's doing what was asked.

    @mgorny, @thesamesam what's your thoughts on tweaking pkgcheck scan to give a unique non zero exit code if nothing could possibly be scanned?

  2. radhermit commented on Dec 15, 2025

    @radhermit
    Contributor

    @mgorny, @thesamesam what's your thoughts on tweaking pkgcheck scan to give a unique non zero exit code if nothing could possibly be scanned?

    If you want to match pkgcruft (or use it for inspiration):

    $ pkgcruft scan nonexistent/pkg
    pkgcruft scan: error: no match: nonexistent/pkg
    $ echo $?
    2

    Note that the error is actually handled generically in the shared CLI support so it's consistent across all tools if they parse arguments using the same underlying functionality.

  3. added a commit that references this issue on Jan 5, 2026
    2d91176
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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions