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: Closed Works As Intended    
Severity: Affects Only Me    
Priority: ---    
Version: Latest   
Hardware: Any   
OS: Any   

Description Robert Watson freebsd_committer freebsd_triage 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.
Comment 1 Baptiste Daroussin freebsd_committer freebsd_triage 2021-11-08 13:47:35 UTC
This is what pkg install is meant for. Everyone should only use pkg install