由于未指定软件包,以下 pkg update 命令将所有软件包更新到允许的最新可用版本。该命令将升级控制软件包更新到最新可用版本,由于更新 upgradectrl 软件包时,upgradectrl 软件包中的 pkg.depend.install-hold 设置将导致 pkg:/entire 软件包升级,因此映像会升级。该映像将升级到在新 upgradectrl incorporation 中指定的 pkg:/entire incorporation 的版本。
$ pkg update --be-name s11u1_10
Packages to remove: 1
Packages to update: 186
Mediators to change: 1
Create boot environment: Yes
Create backup boot environment: No
Planning linked: 0/1 done; 1 working: zone:z1
Linked image 'zone:z1' output:
| Packages to remove: 1
| Packages to install: 3
| Packages to update: 73
| Mediators to change: 1
| Services to change: 3
`
Planning linked: 1/1 done
DOWNLOAD PKGS FILES XFER (MB) SPEED
Completed 187/187 16139/16139 507.9/507.9 562k/s
Downloading linked: 0/1 done; 1 working: zone:z1
Downloading linked: 1/1 done
PHASE ITEMS
Removing old actions 1473/1473
Installing new actions 3451/3451
Updating modified actions 16378/16378
Updating package state database Done
Updating package cache 187/187
Updating image state Done
Creating fast lookup database Done
Reading search index Done
Building new search index 851/851
Executing linked: 0/1 done; 1 working: zone:z1
Executing linked: 1/1 done
A clone of s11u1_0 exists and has been updated and activated.
On the next boot the Boot Environment s11u1_10 will be
mounted on '/'. Reboot when ready to switch to this updated BE.
确认当前 BE 未更改且新 BE 包含更新的软件包。
$ pkg list entire upgradectrl NAME (PUBLISHER) VERSION IFO entire 0.5.11-0.175.1.0.0.24.2 i-- upgradectrl (site) 1.0 i-- $ beadm mount s11u1_10 /mnt $ pkg -R /mnt list entire upgradectrl NAME (PUBLISHER) VERSION IFO entire 0.5.11-0.175.1.10.0.6.0 i-- upgradectrl (site) 1.10 i-- $ beadm unmount s11u1_10