[Bug 267657] pkg upgrade prompts to install if package is missing

From: <bugzilla-noreply_at_freebsd.org>
Date: Wed, 09 Nov 2022 02:59:16 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=267657

--- Comment #1 from Ryan <freebsd@haraschak.com> ---
This becomes a problem when calling the following command from Ansible:
`pkg upgrade -y [pkg name]`
As this will now install the missing package(s) instead of only upgrading
existing packages.

Example command invocation directly on a test server (FreeBSD 13.1-RELEASE-p3
GENERIC amd64):

(pts/4)[root@server1:~]# pkg info nginx
pkg: No package(s) matching nginx

(pts/4)[root@server1:~]# pkg upgrade nginx
Updating FreeBSD repository catalogue...
FreeBSD repository is up to date.
All repositories are up to date.
The following 2 package(s) will be affected (of 0 checked):

New packages to be INSTALLED:
        nginx: 1.22.1_1,3

Installed packages to be UPGRADED:
        pcre: 8.45_1 -> 8.45_3

Number of packages to be installed: 1
Number of packages to be upgraded: 1

The process will require 1 MiB more space.
2 MiB to be downloaded.

Proceed with this action? [y/N]:

-- 
You are receiving this mail because:
You are the assignee for the bug.