Date: Wed, 10 Jun 2020 04:22:32 +0000 (UTC) From: Li-Wen Hsu <lwhsu@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r538369 - in head/sysutils/firstboot-pkgs: . files Message-ID: <202006100422.05A4MWIS044377@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202006100422.05A4MWIS044377>