Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified)) by mollari.NetBSD.org (Postfix) with ESMTPS id 225061A9217 for ; Sat, 9 Jan 2021 19:12:49 +0000 (UTC) Received: by mail.netbsd.org (Postfix, from userid 605) id 30CCF84D6D; Sat, 9 Jan 2021 19:12:48 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by mail.netbsd.org (Postfix) with ESMTP id 694C784D3D for ; Sat, 9 Jan 2021 19:12:47 +0000 (UTC) X-Virus-Scanned: amavisd-new at netbsd.org Received: from mail.netbsd.org ([127.0.0.1]) by localhost (mail.netbsd.org [127.0.0.1]) (amavisd-new, port 10025) with ESMTP id NsXqadQwxFEO for ; Sat, 9 Jan 2021 19:12:46 +0000 (UTC) Received: from cvs.NetBSD.org (ivanova.NetBSD.org [IPv6:2001:470:a085:999:28c:faff:fe03:5984]) by mail.netbsd.org (Postfix) with ESMTP id 8280D84D26 for ; Sat, 9 Jan 2021 19:12:46 +0000 (UTC) Received: by cvs.NetBSD.org (Postfix, from userid 500) id 71484FA9D; Sat, 9 Jan 2021 19:12:46 +0000 (UTC) Content-Transfer-Encoding: 7bit Content-Type: multipart/mixed; boundary="_----------=_1610219566157900" MIME-Version: 1.0 Date: Sat, 9 Jan 2021 19:12:46 +0000 From: "Olaf Seibert" Subject: CVS commit: pkgsrc/pkgtools/pkg_rolling-replace To: pkgsrc-changes@NetBSD.org Reply-To: rhialto@netbsd.org X-Mailer: log_accum Message-Id: <20210109191246.71484FA9D@cvs.NetBSD.org> Sender: pkgsrc-changes-owner@NetBSD.org List-Id: Precedence: bulk List-Unsubscribe: This is a multi-part message in MIME format. --_----------=_1610219566157900 Content-Disposition: inline Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII" Module Name: pkgsrc Committed By: rhialto Date: Sat Jan 9 19:12:46 UTC 2021 Modified Files: pkgsrc/pkgtools/pkg_rolling-replace: Makefile pkgsrc/pkgtools/pkg_rolling-replace/files: pkg_rolling-replace.8 pkg_rolling-replace.sh Log Message: pkgtools/pkg_rolling-replace: Update to 0.24.9 When using the -u option to find mismatched packages, mark each affected package with 'mismatch=YES'. Otherwise, consider such packages as targets to rebuild. ok gdt@. To generate a diff of this commit: cvs rdiff -u -r1.45 -r1.46 pkgsrc/pkgtools/pkg_rolling-replace/Makefile cvs rdiff -u -r1.20 -r1.21 \ pkgsrc/pkgtools/pkg_rolling-replace/files/pkg_rolling-replace.8 cvs rdiff -u -r1.40 -r1.41 \ pkgsrc/pkgtools/pkg_rolling-replace/files/pkg_rolling-replace.sh Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. --_----------=_1610219566157900 Content-Disposition: inline Content-Length: 7538 Content-Transfer-Encoding: binary Content-Type: text/x-diff; charset=us-ascii Modified files: Index: pkgsrc/pkgtools/pkg_rolling-replace/Makefile diff -u pkgsrc/pkgtools/pkg_rolling-replace/Makefile:1.45 pkgsrc/pkgtools/pkg_rolling-replace/Makefile:1.46 --- pkgsrc/pkgtools/pkg_rolling-replace/Makefile:1.45 Tue Aug 27 19:30:36 2019 +++ pkgsrc/pkgtools/pkg_rolling-replace/Makefile Sat Jan 9 19:12:46 2021 @@ -1,6 +1,6 @@ -# $NetBSD: Makefile,v 1.45 2019/08/27 19:30:36 gdt Exp $ +# $NetBSD: Makefile,v 1.46 2021/01/09 19:12:46 rhialto Exp $ -PKGNAME= pkg_rolling-replace-0.24.8 +PKGNAME= pkg_rolling-replace-0.24.9 CATEGORIES= pkgtools MAINTAINER= gdt@NetBSD.org Index: pkgsrc/pkgtools/pkg_rolling-replace/files/pkg_rolling-replace.8 diff -u pkgsrc/pkgtools/pkg_rolling-replace/files/pkg_rolling-replace.8:1.20 pkgsrc/pkgtools/pkg_rolling-replace/files/pkg_rolling-replace.8:1.21 --- pkgsrc/pkgtools/pkg_rolling-replace/files/pkg_rolling-replace.8:1.20 Thu Feb 12 08:22:16 2015 +++ pkgsrc/pkgtools/pkg_rolling-replace/files/pkg_rolling-replace.8 Sat Jan 9 19:12:46 2021 @@ -1,4 +1,4 @@ -.\" $NetBSD: pkg_rolling-replace.8,v 1.20 2015/02/12 08:22:16 abs Exp $ +.\" $NetBSD: pkg_rolling-replace.8,v 1.21 2021/01/09 19:12:46 rhialto Exp $ .Dd February 1, 2010 .Dt PKG_ROLLING-REPLACE 8 .Os @@ -16,9 +16,10 @@ .Nm runs .Dq make replace -on packages that have been marked to have unsafe dependencies or have -been marked to be rebuilt. -Optionally it can replace any outdated packages (as reported by +on packages that have been marked to have unsafe dependencies, +to be mismatched, or marked to be rebuilt. +Optionally it can discover, mark and replace any mismatched packages +(as reported by .Xr pkg_chk 8 ) as well. .Pp @@ -68,13 +69,19 @@ packages). (Usually this results in packages being upgraded to newer versions, assuming the pkgsrc tree is more recent than the currently installed packages.) +The packages discovered this way will be marked as mismatched, so that +in a re-run of +.Nm +you don't need to repeat the +.Fl u +flag. .Ss Options .Bl -tag -width xxxxxxxx .It Fl B Pass .Dq -B to -.Xl pkg_chk 8 +.Xr pkg_chk 8 to also mark any packages with any change in build version data. .It Fl D Ar VARIABLE=VALUE Passes VARIABLE=VALUE to each make call. @@ -122,8 +129,10 @@ This will replace packages more aggressi shared library problems. .It Fl u Use -.Xl pkg_chk 8 -to check for outdated packages, and replace those too. +.Xr pkg_chk 8 +to check for mismatched packages, mark them with 'mismatch=YES', +and replace those too. +Otherwise, consider packages marked 'mismatch=YES' to be mismatched. .It Fl v Verbose output. .It Fl X Ar pkgs @@ -131,11 +140,8 @@ Exclude the comma-separated list of pack from being rebuilt for any reason. .It Fl x Ar pkgs Exclude the comma-separated list of package base names -from the check for outdated packages. -This has no effect if the -.Fl u -flag is not given, -and does not prevent packages from being rebuilt for any other reason +from the check for mismatched packages. +This does not prevent packages from being rebuilt for any other reason (such as being a dependency of another package that is also rebuilt, or having any of the .Xr pkg_admin 1 Index: pkgsrc/pkgtools/pkg_rolling-replace/files/pkg_rolling-replace.sh diff -u pkgsrc/pkgtools/pkg_rolling-replace/files/pkg_rolling-replace.sh:1.40 pkgsrc/pkgtools/pkg_rolling-replace/files/pkg_rolling-replace.sh:1.41 --- pkgsrc/pkgtools/pkg_rolling-replace/files/pkg_rolling-replace.sh:1.40 Tue Aug 27 19:30:36 2019 +++ pkgsrc/pkgtools/pkg_rolling-replace/files/pkg_rolling-replace.sh Sat Jan 9 19:12:46 2021 @@ -1,6 +1,6 @@ #!/bin/sh -# $NetBSD: pkg_rolling-replace.sh,v 1.40 2019/08/27 19:30:36 gdt Exp $ +# $NetBSD: pkg_rolling-replace.sh,v 1.41 2021/01/09 19:12:46 rhialto Exp $ # # Copyright (c) 2006 BBN Technologies Corp. All rights reserved. # @@ -108,12 +108,12 @@ usage() -n Don't actually do make replace -r Just replace, don't create binary packages -s Replace even if the ABIs are still compatible ("strict") - -u Update outdated packages + -u Update mismatched packages -v Verbose -D VAR=VAL Passes given variables and values to make -L Log to path (/pkgdir/pkg) -X exclude from being rebuilt - -x exclude from outdated check + -x exclude from mismatch check pkg_rolling-replace does 'make replace' on one package at a time, tsorting the packages being replaced according to their @@ -126,14 +126,14 @@ pkg_rolling-replace can be used in one o 'pkg_rolling-replace' (no arguments) to rebuild them against the new version. - - 'pkg_chk -u' will delete all your mismatched (outdated) - packages, then reinstall them one at a time, leaving you without - those packages in the meantime. 'pkg_rolling-replace -u' will - instead upgrade them in place, allowing you to keep using your - system in the meantime (maybe...if you're lucky...because - pkg_rolling-replace replaces the \"deepest\" dependency first, - things could still break if that happens to be a fundamental - library whose ABI has changed). + - 'pkg_chk -u' will delete all your mismatched packages (where the + package version does not match the pkgsrc version), then reinstall + them one at a time, leaving you without those packages in the + meantime. 'pkg_rolling-replace -u' will instead upgrade them in + place, allowing you to keep using your system in the meantime + (maybe...if you're lucky...because pkg_rolling-replace replaces + the \"deepest\" dependency first, things could still break if that + happens to be a fundamental library whose ABI has changed). " exit 1 } @@ -158,6 +158,9 @@ check_packages_mismatched() # than category/pkg and remove the version. for word in $line; do if [ "$(echo $word | egrep '^[^/]+-[0-9][^-/]*$')" ]; then + if [ -z "$opt_F" ]; then + pkg_admin set mismatch=YES "$word" 1>&2 + fi echo $word | sed 's/-[0-9][^-]*$//' break #done with this line fi @@ -374,14 +377,18 @@ SUCCEEDED="" FAILED="" MISMATCH_TODO= -if [ -n "$opt_u" -o -n "$opt_F" ]; then +if [ -n "$opt_u" ]; then echo "${OPI} Checking for mismatched installed packages using pkg_chk" MISMATCH_TODO=$(check_packages_mismatched) - echo "${OPI} Excluding the following mismatched packages:" - echo "${OPC} EXCLUDE=[$EXCLUDE]" - MISMATCH_TODO=$(exclude $EXCLUDE --from $MISMATCH_TODO) +else + echo "${OPI} Checking for mismatched installed packages (mismatch=YES)" + MISMATCH_TODO=$(check_packages_w_flag 'mismatch') fi +echo "${OPI} Excluding the following mismatched packages:" +echo "${OPC} EXCLUDE=[$EXCLUDE]" +MISMATCH_TODO=$(exclude $EXCLUDE --from $MISMATCH_TODO) + if [ -z "$opt_F" ]; then echo "${OPI} Checking for rebuild-requested installed packages (rebuild=YES)" REBUILD_TODO=$(check_packages_w_flag 'rebuild') @@ -549,6 +556,8 @@ while [ -n "$REPLACE_TODO" ]; do abort "package $pkg still has unsafe_depends." [ -z "$(${PKG_INFO} -Q rebuild $pkg)" ] || \ abort "package $pkg is still requested to be rebuilt." + [ -z "$(${PKG_INFO} -Q mismatch $pkg)" ] || \ + abort "package $pkg is still a mismatched version." fi # If -r not given, make a binary package. if [ -z "$opt_r" -a -z "$fail" -a -z "$opt_F" ]; then --_----------=_1610219566157900--