Page MenuHomeFreeBSD

pkg: allow multiple add arguments again
ClosedPublic

Authored by kevans on Feb 18 2021, 3:45 AM.
Tags
None
Referenced Files
F153546556: D28766.id84180.diff
Tue, Apr 21, 7:40 PM
Unknown Object (File)
Sat, Apr 18, 3:16 PM
Unknown Object (File)
Sat, Apr 18, 8:48 AM
Unknown Object (File)
Sun, Apr 12, 4:25 PM
Unknown Object (File)
Sun, Apr 12, 9:30 AM
Unknown Object (File)
Sun, Apr 12, 3:31 AM
Unknown Object (File)
Sat, Apr 11, 3:14 PM
Unknown Object (File)
Fri, Apr 10, 10:35 PM
Subscribers

Details

Summary

While pkg(7) add only handles a single 'add' argument, pkg-add(8) fully
handles multiple arguments.

Stop rejecting it, just turn off local-bootstrap mode and proceed to
remote bootstrap if we need it.

While we're here, check if the first argument to pkg add is even a pkg
package. If it's not, also do remote bootstrap instead. Future work
could improve this altogether by picking out a pkg package out of many
and local bootstrap then pass the rest through to the newly installed
pkg.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 37159
Build 34048: arc lint + arc unit

Event Timeline

This revision is now accepted and ready to land.Feb 18 2021, 8:26 AM

Fix the logic; the previous version would break if one tried to pkg add the
pkg directly produced by make package in ports-mgmt/pkg{,-devel}.

Use the more common variant of chopping off after the last '-'. This catches the
short-form of pkg-devel naturally, and we check for 'pkg.' if there was no
version delimiter to catch the short-form of pkg.

This revision now requires review to proceed.Feb 18 2021, 2:12 PM
This revision is now accepted and ready to land.Feb 26 2021, 3:27 PM
This revision was automatically updated to reflect the committed changes.