Upstream for texinfo does not see the changing headline as a problem, and
they consider it's not really a marker for info file.

So use a different approach (10 is very conservative, largely enough in
practice)


This fixes ports like halibut, for instance.

Can someone commit this ?

Index: FS2.pm
===================================================================
RCS file: /build/data/openbsd/cvs/ports/infrastructure/lib/OpenBSD/FS2.pm,v
diff -u -p -r1.42 FS2.pm
--- FS2.pm      5 Jul 2023 15:07:54 -0000       1.42
+++ FS2.pm      11 Dec 2025 15:47:29 -0000
@@ -345,17 +345,12 @@ sub recognize($class, $filename, $fs, $)
        return 0 unless $filename =~ m/\.info$/ or $filename =~ 
m/info\/[^\/]+$/;
        $filename = $fs->resolve_link($filename);
        open my $fh, '<', $filename or return 0;
-       my $tag = <$fh>;
-       return 0 unless defined $tag;
-       my $tag2 = <$fh>;
-       $tag .= $tag2 if defined $tag2;
-       close $fh;
-       if ($tag =~ 
/^This\sis\s.*,\sproduced\sby\sg?[Mm]akeinfo(?:\sversion\s|\-)?.*[\d\s]from/s ||
-           $tag =~ 
/^Dies\sist\s.*,\shergestellt\svon\sg?[Mm]akeinfo(?:\sVersion\s|\-)?.*[\d\s]aus/s)
 {
-               return 1;
-       } else {
-               return 0;
+       while (<$fh>) {
+               chomp;
+               return 1 if m/^START-INFO-DIR-ENTRY$/;
+               last if $. >= 10;
        }
+       return 0;
 }
 
 sub element_class($)

Reply via email to