mirror of
https://git.FreeBSD.org/ports.git
synced 2024-10-19 19:59:43 +00:00
sysutils/firstboot-pkgs: Bootstrap and update pkg unconditionally
The background of this patch is available at: https://lists.freebsd.org/pipermail/freebsd-cloud/2020-April/000234.html Even a `pkg -N` success, the following `pkg install` may still fail because of the repository version doesn't match between client and server. Therefore, unconditionally bootstrap and update pkg at firstboot to ensure pkg and local metadata are update-to-date. Approved by: cperciva (maintainer) MFH: 2020Q2 Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D24517
This commit is contained in:
parent
c512bbb43b
commit
a41c064fb8
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=538369
@ -1,7 +1,7 @@
|
||||
# $FreeBSD$
|
||||
|
||||
PORTNAME= firstboot-pkgs
|
||||
PORTVERSION= 1.5
|
||||
PORTVERSION= 1.6
|
||||
CATEGORIES= sysutils
|
||||
MASTER_SITES= # none
|
||||
DISTFILES= # none
|
||||
|
@ -30,11 +30,9 @@ firstboot_pkgs_run()
|
||||
# Count rc.d scripts
|
||||
nscriptso=`ls /usr/local/etc/rc.d | wc -l`
|
||||
|
||||
# Bootstrap if necessary
|
||||
if ! pkg -N 2>/dev/null; then
|
||||
env ASSUME_ALWAYS_YES=YES pkg bootstrap |
|
||||
cat
|
||||
fi
|
||||
# Bootstrap and update pkg to ensure synchronization with the repository
|
||||
env ASSUME_ALWAYS_YES=YES pkg bootstrap -f | cat
|
||||
env ASSUME_ALWAYS_YES=YES pkg update -f | cat
|
||||
|
||||
# Install requested packages, if any
|
||||
for package in ${firstboot_pkgs_list}; do
|
||||
|
Loading…
Reference in New Issue
Block a user