Bug 253190

Summary: Feature request: pkg add variant accepting multiple files, and sorting them into the right installation order
Product: Ports & Packages Reporter: Robert Watson <rwatson>
Component: Package InfrastructureAssignee: Port Management Team <portmgr>
Status: New ---    
Severity: Affects Only Me    
Priority: ---    
Version: Latest   
Hardware: Any   
OS: Any   

Description Robert Watson freebsd_committer 2021-02-02 23:26:34 UTC
I sometimes end up with a pile of packages built from ports, or extracted from an existing machine, which I want to bulk install. Currently, pkg(8) has an "add" command that excepts a single package. It would be really useful to have one (or both) of:

  pkg add-bulk [file1 file2 ...]

Install a set of packages, first sorting them by dependencies so that things are installed in a suitable order.

  pkg sort [file1 file2 ...]

Sort packages by dependencies, returning the filename list in an order suitable to pass via a script iteratively running "pkg add".

Ideally if there were missing dependencies, the command would fail and tell you the list of missing packages, so that you could go find them if needed.