Index | Thread | Search

From:
Marc Espie <marc.espie.openbsd@gmail.com>
Subject:
Re: pkg_add: allow reading from standard input
To:
Johannes Thyssen Tishman <johannes@thyssentishman.com>
Cc:
tech@openbsd.org
Date:
Mon, 30 Sep 2024 19:11:42 +0200

Download raw body.

Thread
On Mon, Sep 30, 2024 at 05:19:32PM +0200, Johannes Thyssen Tishman wrote:
> I noticed that pkg_add is not able to read package names from standard
> input, even though it is mentioned in pkg_add(1). The diff below adds
> this functionality. The only issue I found when testing the diff below
> is when interaction is required, e.g. to select a flavour: pkg_add
> mupdf. The options are displayed, but the command doesn't pause to take
> my input, and I'm not sure why. I'd be grateful for any feedback.

Actually, it's not how it worked, and not what the man page implies,
though I admit it's poorly weirded.

A very long time ago, pkg_add was able to install an actual package from
stdin.

This was discontinued long ago for various reasons, mainly because things
like signatures were unpractical.

Passing pkgnames from a file is mostly what -l is for.

If you want to use stdin, you should look into recognizing -l -