Re: "pkg upgrade foo" installs foo if not already installed, bug?
- In reply to: Aleksandr Miroslav : ""pkg upgrade foo" installs foo if not already installed, bug?"
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sun, 02 Apr 2023 03:07:50 UTC
On Sat, Apr 1, 2023 at 9:16 PM Aleksandr Miroslav <alexmiroslav@gmail.com> wrote: > Observe the following: > > $ pkg info|grep -q cowsay && echo installed || echo not installed > not installed > $ sudo pkg upgrade -q -y cowsay > $ pkg info|grep -q cowsay && echo installed || echo not installed > installed > > It looks like when "pkg upgrade" is given an uninstalled package to > upgrade, it installs it. > > (This is on 13.1-RELEASE.) > > I would think the expected behavior would be to throw an error because the > package does not exist, or at least have a switch to control it. > > Am I misunderstanding how "pkg upgrade" should work, or was this > behavior changed recently? > > (I quickly looked through bugzilla, the pkg src tree, and the GitHub > issues for pkg and didn't find anything, but it's possible I may have > missed something.) > > pkg upgrade IS package install w/ the exception that pkg upgrade tries to upgrade dependencies of packages matched. Any packages listed on the command line are added to the list of packages to ensure are available. pkg-upgrade(8) has these details spelt out. ~Paul -- __________________ :(){ :|:& };: