From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: X-Spam-Status: No, score=-4.0 required=3.0 tests=ALL_TRUSTED,BAYES_00 shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id 8986C1F8C8; Wed, 29 Sep 2021 00:14:28 +0000 (UTC) Date: Wed, 29 Sep 2021 00:14:28 +0000 From: Eric Wong To: Kyle Meyer Cc: meta@public-inbox.org Subject: [PATCH] inbox: do not vivify {-repo_objs} during cleanup Message-ID: <20210929001428.GA28946@dcvr> References: <87o88cqobd.fsf@kyleam.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <87o88cqobd.fsf@kyleam.com> List-Id: Kyle Meyer wrote: > I've been noticing a good number of these error messages: > > E: BUG {try_gits} empty at /usr/local/share/perl/5.28.1/PublicInbox/SolverGit.pm line 80. Thanks, the following should fix it (though I suppose @INC paths should be cleaned in WWW): ------8<----- Subject: [PATCH] inbox: do not vivify {-repo_objs} during cleanup This caused config->repo_objs to not fill in {-repo_objs} properly before starting solver. Reported-by: Kyle Meyer Link: https://public-inbox.org/meta/87o88cqobd.fsf@kyleam.com/ Fixes: 63d7b8ceee55a34 ("daemons: revamp periodic cleanup task") --- lib/PublicInbox/Inbox.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/PublicInbox/Inbox.pm b/lib/PublicInbox/Inbox.pm index c525f4d1..95467d5a 100644 --- a/lib/PublicInbox/Inbox.pm +++ b/lib/PublicInbox/Inbox.pm @@ -30,7 +30,7 @@ sub do_cleanup { my ($ibx) = @_; my $live = git_cleanup($ibx); $ibx->cleanup_shards and $live = 1; - for my $git (@{$ibx->{-repo_objs}}) { + for my $git (@{$ibx->{-repo_objs} // []}) { $live = 1 if $git->cleanup(1); } delete @$ibx{qw(over mm description cloneurl