On Thu, Jan 14, 2021 at 08:49:36AM -0500, Aaron M. Ucko wrote:
> Mark Hindley <m...@hindley.org.uk> writes:
> 
> >  pdiff_files_regexp = (?:^|[/-])2\d{3}-\d{2}-\d{2}-\d{4}\.\d{2}\.gz$
> 
> Yeah, that may well suffice after all; I just threw together a quick
> tweak on the basis of aptitude's terminal output (which gives nominal
> .pdiff extensions), and wanted to err on the side of inclusiveness.

Thanks.

I am actually going to use the commit below: I prefer having the regexps match
the whole file name as tightly as possible.

Mark

>From 9491b8880d64915e0a03bcaead9ef71007cfa90f Mon Sep 17 00:00:00 2001
From: Mark Hindley <m...@hindley.org.uk>
Date: Thu, 14 Jan 2021 11:02:05 +0000
Subject: [PATCH] Update pdiff_files_regexp to include latest naming scheme.

Suggestion from "Aaron M. Ucko" <u...@debian.org>.
---
 lib/apt-cacher.pl | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/apt-cacher.pl b/lib/apt-cacher.pl
index 7a029b8..2a36b30 100755
--- a/lib/apt-cacher.pl
+++ b/lib/apt-cacher.pl
@@ -180,7 +180,7 @@ sub read_config {
                                                          \.template
                                                        )
                                                      ) .')$',
-                 pdiff_files_regexp => 
'(?:^|/)2\d{3}-\d{2}-\d{2}-\d{4}\.\d{2}\.gz$',
+                 pdiff_files_regexp => 
'(?:^|/)(?:T-2\d{3}-\d{2}-\d{2}-\d{4}\.\d{2}-F-)?2\d{3}-\d{2}-\d{2}-\d{4}\.\d{2}\.gz$',
                  soap_url_regexp => 
'^(?:http://)?bugs\.debian\.org(?::80)?/cgi-bin/soap\.cgi$',
                 );
 
-- 
2.20.1

Reply via email to