svn commit: r538369 - in head/sysutils/firstboot-pkgs: . files
Li-Wen Hsu
lwhsu at FreeBSD.org
Wed Jun 10 04:22:33 UTC 2020
Author: lwhsu
Date: Wed Jun 10 04:22:32 2020
New Revision: 538369
URL: https://svnweb.freebsd.org/changeset/ports/538369
Log:
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
Modified:
head/sysutils/firstboot-pkgs/Makefile
head/sysutils/firstboot-pkgs/files/firstboot_pkgs.in
Modified: head/sysutils/firstboot-pkgs/Makefile
==============================================================================
--- head/sysutils/firstboot-pkgs/Makefile Wed Jun 10 04:07:19 2020 (r538368)
+++ head/sysutils/firstboot-pkgs/Makefile Wed Jun 10 04:22:32 2020 (r538369)
@@ -1,7 +1,7 @@
# $FreeBSD$
PORTNAME= firstboot-pkgs
-PORTVERSION= 1.5
+PORTVERSION= 1.6
CATEGORIES= sysutils
MASTER_SITES= # none
DISTFILES= # none
Modified: head/sysutils/firstboot-pkgs/files/firstboot_pkgs.in
==============================================================================
--- head/sysutils/firstboot-pkgs/files/firstboot_pkgs.in Wed Jun 10 04:07:19 2020 (r538368)
+++ head/sysutils/firstboot-pkgs/files/firstboot_pkgs.in Wed Jun 10 04:22:32 2020 (r538369)
@@ -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
More information about the svn-ports-head
mailing list