svn commit: r538375 - in branches/2020Q2/sysutils/firstboot-pkgs: . files

Li-Wen Hsu lwhsu at FreeBSD.org
Wed Jun 10 06:14:27 UTC 2020


Author: lwhsu
Date: Wed Jun 10 06:14:26 2020
New Revision: 538375
URL: https://svnweb.freebsd.org/changeset/ports/538375

Log:
  MFH: r538369
  
  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)
  Sponsored by:	The FreeBSD Foundation
  Differential Revision:	https://reviews.freebsd.org/D24517
  
  Approved by:	ports-secteam (joneum)

Modified:
  branches/2020Q2/sysutils/firstboot-pkgs/Makefile
  branches/2020Q2/sysutils/firstboot-pkgs/files/firstboot_pkgs.in
Directory Properties:
  branches/2020Q2/   (props changed)

Modified: branches/2020Q2/sysutils/firstboot-pkgs/Makefile
==============================================================================
--- branches/2020Q2/sysutils/firstboot-pkgs/Makefile	Wed Jun 10 05:59:42 2020	(r538374)
+++ branches/2020Q2/sysutils/firstboot-pkgs/Makefile	Wed Jun 10 06:14:26 2020	(r538375)
@@ -1,7 +1,7 @@
 # $FreeBSD$
 
 PORTNAME=	firstboot-pkgs
-PORTVERSION=	1.5
+PORTVERSION=	1.6
 CATEGORIES=	sysutils
 MASTER_SITES=	# none
 DISTFILES=	# none

Modified: branches/2020Q2/sysutils/firstboot-pkgs/files/firstboot_pkgs.in
==============================================================================
--- branches/2020Q2/sysutils/firstboot-pkgs/files/firstboot_pkgs.in	Wed Jun 10 05:59:42 2020	(r538374)
+++ branches/2020Q2/sysutils/firstboot-pkgs/files/firstboot_pkgs.in	Wed Jun 10 06:14:26 2020	(r538375)
@@ -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-all mailing list