From nobody Mon Jan 17 22:19:32 2022 X-Original-To: dev-commits-ports-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id C96E6195ABE2; Mon, 17 Jan 2022 22:19:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Jd5tD5Hqmz4Tx7; Mon, 17 Jan 2022 22:19:32 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1642457972; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Ta5gpccZ8yp08rI+wfbvZYA4Q/ZB9/JwrPxLSw1V0gU=; b=cy5ange2yQ2nSvvVVoqftCPvSsbDIsYZfC+tiAWdPmt1F8AFR3YxFlkTByb23RjeGizUvD DJTVRO4qOpUwr1MuDoCAW+668WeszyBrByHsJRm1/QP9IAAAytSXFE6HpfWRCWdDfojFwq Q6/M/LOGhxUGf4FdEL0pd3otFMV9I88YwqR+Gx9NkILPio71/CM9fBpEjfsVHHSjqmEjry YEyBp7EGnGLrC8u/Q4cMogvkjkj9w2lVkisxigu7d6KegJ3b1lxQGrKIYgvgke26DH0Qid V2XYlgbCIJT9ANQRb93OZdMQdYujYYmY8P95RlwYjrDhVCL+1q24hZRkGqx+ZQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 95B7615B68; Mon, 17 Jan 2022 22:19:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 20HMJWGQ087683; Mon, 17 Jan 2022 22:19:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 20HMJWnK087682; Mon, 17 Jan 2022 22:19:32 GMT (envelope-from git) Date: Mon, 17 Jan 2022 22:19:32 GMT Message-Id: <202201172219.20HMJWnK087682@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Matthias Andree Subject: git: 171f76521e4e - main - Tools/scripts/bump_revision.pl: Minimal update List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-main@freebsd.org X-BeenThere: dev-commits-ports-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mandree X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 171f76521e4ec422dfd44548519f311d153f2bf6 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1642457972; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Ta5gpccZ8yp08rI+wfbvZYA4Q/ZB9/JwrPxLSw1V0gU=; b=fhrPyTYd5uAJ/6sNxmBNvycf8JvggOeb3He1uCXVvdngr36zLoHIHs8zLhpLQIqWTYmP38 +ONH/bZVrMagl0BGJwBxOcJWAIy2R7w13I1o2HH2Uuqa2qI2KxIb8pwIUHPVOg2eJQeZG2 yclnoH8l5MQnCfI6tMYNQXFFus7S39QpTiGgI9yaqLjVCm/ADFbNKjcFU6ftueSkiFTG8m y3cAupcaj1jrdTxOzCMyLusMTPOmVLoW5Puqr3b2v7qDB5xEG3BIIgz2kWyTlARNWpjTcP vsg4f1G9BBr1HcYO8VyKCK3L03mPyp9QcLzHz0M/PFBafVgFO+8p0z2Xqe6YWw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1642457972; a=rsa-sha256; cv=none; b=edZCcqPM3LJT0irSwT1ieusBQhT9MIxqfQ4iau7wNzHylUx6ehyRo1Xb5Xr5V/0TS7aJ3s AlzInDdM9AN4EeQZkEkXiU3SyVgRRbISwg2n8DzWA/GqSWk8JU1RrFS6rA6G9p9tQW+zO/ orOUlWINrfSHULydJOVgyJXxU8T104u0a6gqbqYIylQACPj9jyHSg3q1CblYD7wYNG3Lpi mQGIKy7Za8X1ECWm/xzSfXni5zNwI0Mw1XeSegZB8IiW9JPt9/YPRcG+ry93iG0s3HUT+C p2RwBjTAwiK0tMxiDV2p2sQ1WFUG+1cjykRNRoPYUq5DmsGj8hV//6qIgVG/7g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by mandree: URL: https://cgit.FreeBSD.org/ports/commit/?id=171f76521e4ec422dfd44548519f311d153f2bf6 commit 171f76521e4ec422dfd44548519f311d153f2bf6 Author: Matthias Andree AuthorDate: 2022-01-17 22:19:04 +0000 Commit: Matthias Andree CommitDate: 2022-01-17 22:19:14 +0000 Tools/scripts/bump_revision.pl: Minimal update to deal with ports that have flavors renaming the main port, for instance e2fsprogs-nobootfsck. --- Tools/scripts/bump_revision.pl | 36 ++++++++++++++++++++++++------------ 1 file changed, 24 insertions(+), 12 deletions(-) diff --git a/Tools/scripts/bump_revision.pl b/Tools/scripts/bump_revision.pl index ff7eb5d07e09..33a79c0ce2d7 100755 --- a/Tools/scripts/bump_revision.pl +++ b/Tools/scripts/bump_revision.pl @@ -20,10 +20,13 @@ use strict; use Getopt::Std; use Carp 'verbose'; use Cwd; -use Data::Dumper; use File::Basename; +use Data::Dumper; +$Data::Dumper::Indent = 1; # simple indent +$Data::Dumper::Purity = 1; # Perl syntax +my $debug = 0; -use vars qw/$opt_n $opt_f $opt_i $opt_u $opt_l $opt_g $opt_p/; +use vars qw/$opt_n $opt_f $opt_i $opt_u $opt_l $opt_g $opt_p $opt_h/; # launder environment delete @ENV{'IFS', 'CDPATH', 'ENV', 'BASH_ENV'}; @@ -107,7 +110,9 @@ my ($portsdir, $INDEX); { $opt_i = ""; $opt_u = ""; - getopts("fgi:lnu:p:") or die "Aborting"; + getopts("fghi:lnu:p:") or die "Aborting"; + usage() if $opt_h; + if ($ENV{'DEBUG'}) { $debug = $ENV{'DEBUG'}; } $shallow = $opt_l if $opt_l; if ($opt_l and $opt_g) { die "Options -g and -l given, which are mutually exclusive. Pick either."; @@ -132,8 +137,8 @@ my $TMPDIR = File::Basename::dirname($INDEX); # # Sanity checking # -if (-d "$TMPDIR/.svn" and not $opt_f and not $opt_n) { - die "$TMPDIR/.svn exists, cowardly refusing to proceed.\n"; +if (-d "$TMPDIR/.git" and not $opt_f and not $opt_n) { + die "$TMPDIR/.git exists, cowardly refusing to proceed.\n"; } @@ -160,23 +165,28 @@ my %index = (); my @a; my @b; - my $port; + my $origin; + my $cat_port; map { @a = split(/\|/, $_); @b = split(/\//, $a[1]); - $port = $b[-2]."/".$b[-1]; + $cat_port = $b[-2]."/".$a[0]; + $cat_port =~ s/-[^-]+$//; + $origin = $b[-2]."/".$b[-1]; - @{ $index{$port} }{'portname', 'portnameversion', 'origin', 'comment', 'deps'} - = ($b[-1], $a[0], $port, $a[3], ()); + @{ $index{$cat_port} }{'portname', 'portnameversion', 'origin', 'comment', 'deps'} + = ($b[-1], $a[0], $origin, $a[3], ()); if ($a[8]) { @b = split(" ", $a[8]); - @{ $index{$port}{deps} }{@b} = (1) x @b; + @{ $index{$cat_port}{deps} }{@b} = (1) x @b; } - } @lines; print "- Processed ", scalar keys(%index), " entries.\n"; + if ($debug and $debug > 1) { + print STDERR Dumper(\%index); + } } my %DEPPORTS = (); @@ -225,6 +235,7 @@ foreach my $PORT (@ARGV) { # In shallow mode, strip all those who don't have a direct dependency # sub direct_dependency($@) { + if ($debug) { print STDERR Dumper \@_; } my ($port, @requisites) = @_; open F, '-|', '/usr/bin/make', '-C', $port, qw/-V _RUN_DEPENDS -V _LIB_DEPENDS/ or die "cannot launch make: $!"; my @lines = ; @@ -243,7 +254,7 @@ if ($shallow) { foreach my $p (keys %DEPPORTS) { print "- Checking requisites of port $idx/$n...\r"; ++$idx; - unless (direct_dependency($p, @ARGV)) { + unless (direct_dependency($p, map { $index{$_}{origin} } @ARGV)) { delete $DEPPORTS{$p}; } } @@ -258,6 +269,7 @@ my $ports = join(" ", keys %DEPPORTS); # unless ($opt_f or $opt_n) { $TMPDIR = ".bump_revision_pl_tmpdir.$$"; + die "This code fragment has not been updated for Git yet."; print "svn checkout into $TMPDIR...\n"; mkdir($TMPDIR, 0755); chdir($TMPDIR);