Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package perl-File-MimeInfo for openSUSE:Factory checked in at 2026-06-11 17:29:58 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/perl-File-MimeInfo (Old) and /work/SRC/openSUSE:Factory/.perl-File-MimeInfo.new.1981 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "perl-File-MimeInfo" Thu Jun 11 17:29:58 2026 rev:10 rq:1358719 version:0.370.0 Changes: -------- --- /work/SRC/openSUSE:Factory/perl-File-MimeInfo/perl-File-MimeInfo.changes 2024-05-16 17:19:23.337085296 +0200 +++ /work/SRC/openSUSE:Factory/.perl-File-MimeInfo.new.1981/perl-File-MimeInfo.changes 2026-06-11 17:31:22.796442986 +0200 @@ -1,0 +2,22 @@ +Thu May 21 10:02:10 UTC 2026 - Tina Müller <[email protected]> + +- updated to 0.370.0 (0.37) + see /usr/share/doc/packages/perl-File-MimeInfo/Changes + + 0.37 2026-05-19 + - Honor XDG_DATA_HOME precedence for extension globs, so a glob entry + from a higher-priority data dir overrides one from a lower-priority + dir instead of being silently shadowed (#62, liujianqiang-niu). + - Fix open() precedence and stale filehandle bugs in + File::MimeInfo::default and File::MimeInfo::Magic. + - Don't die when @ARGV contains bytes that are invalid in the current + locale; decode leniently and continue. + - Refactor resolvelink to use Cwd::abs_path instead of a hand-rolled + loop. + - mimetype/mimeopen: quote filenames in diagnostic output via + B::cstring so unusual characters render unambiguously. + + 0.36 2026-01-11 + - Move to Codeberg + +------------------------------------------------------------------- Old: ---- File-MimeInfo-0.35.tar.gz New: ---- File-MimeInfo-0.37.tar.gz README.md _scmsync.obsinfo build.specials.obscpio ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ perl-File-MimeInfo.spec ++++++ --- /var/tmp/diff_new_pack.95smnk/_old 2026-06-11 17:31:23.440469998 +0200 +++ /var/tmp/diff_new_pack.95smnk/_new 2026-06-11 17:31:23.444470166 +0200 @@ -1,7 +1,7 @@ # # spec file for package perl-File-MimeInfo # -# Copyright (c) 2024 SUSE LLC +# Copyright (c) 2026 SUSE LLC and contributors # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -18,25 +18,26 @@ %define cpan_name File-MimeInfo Name: perl-File-MimeInfo -Version: 0.350.0 +Version: 0.370.0 Release: 0 -# 0.35 -> normalize -> 0.350.0 -%define cpan_version 0.35 +# 0.37 -> normalize -> 0.370.0 +%define cpan_version 0.37 License: Artistic-1.0 OR GPL-1.0-or-later Summary: Determine file types URL: https://metacpan.org/release/%{cpan_name} Source0: https://cpan.metacpan.org/authors/id/M/MI/MICHIELB/%{cpan_name}-%{cpan_version}.tar.gz Source1: cpanspec.yml +Source100: README.md BuildArch: noarch BuildRequires: perl BuildRequires: perl-macros BuildRequires: perl(Encode::Locale) -BuildRequires: perl(File::BaseDir) >= 0.03 -BuildRequires: perl(File::DesktopEntry) >= 0.04 +BuildRequires: perl(File::BaseDir) >= 0.30 +BuildRequires: perl(File::DesktopEntry) >= 0.40 BuildRequires: perl(Test::More) >= 0.88 Requires: perl(Encode::Locale) -Requires: perl(File::BaseDir) >= 0.03 -Requires: perl(File::DesktopEntry) >= 0.04 +Requires: perl(File::BaseDir) >= 0.30 +Requires: perl(File::DesktopEntry) >= 0.40 Provides: perl(File::MimeInfo) = %{version} Provides: perl(File::MimeInfo::Applications) = %{version} Provides: perl(File::MimeInfo::Magic) = %{version} @@ -65,7 +66,7 @@ data earlier see the 'rehash' methods below. %prep -%autosetup -n %{cpan_name}-%{cpan_version} +%autosetup -n %{cpan_name}-%{cpan_version} -p1 find . -type f ! -path "*/t/*" ! -name "*.pl" ! -path "*/bin/*" ! -path "*/script/*" ! -path "*/scripts/*" ! -name "configure" -print0 | xargs -0 chmod 644 ++++++ File-MimeInfo-0.35.tar.gz -> File-MimeInfo-0.37.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/File-MimeInfo-0.35/Changes new/File-MimeInfo-0.37/Changes --- old/File-MimeInfo-0.35/Changes 2024-04-25 20:15:14.000000000 +0200 +++ new/File-MimeInfo-0.37/Changes 2026-05-19 22:31:39.000000000 +0200 @@ -2,15 +2,31 @@ Versions up to 0.15 by Jaap Karssenberg <[email protected]> Versions starting 0.16 by Michiel Beijen <[email protected]> +0.37 2026-05-19 + - Honor XDG_DATA_HOME precedence for extension globs, so a glob entry + from a higher-priority data dir overrides one from a lower-priority + dir instead of being silently shadowed (#62, liujianqiang-niu). + - Fix open() precedence and stale filehandle bugs in + File::MimeInfo::default and File::MimeInfo::Magic. + - Don't die when @ARGV contains bytes that are invalid in the current + locale; decode leniently and continue. + - Refactor resolvelink to use Cwd::abs_path instead of a hand-rolled + loop. + - mimetype/mimeopen: quote filenames in diagnostic output via + B::cstring so unusual characters render unambiguously. + +0.36 2026-01-11 + - Move to Codeberg + 0.35 2024-04-25 - Fix exit code issue for `mimeopen` - Closes https://github.com/mbeijen/File-MimeInfo/issues/54 + Closes https://codeberg.org/michielb/File-MimeInfo/issues/54 fix provided by slatian 0.34 2023-12-03 - Let `mimeopen` use File::DesktopEntrys run() instead of exec() to make sure the application is started in the background. - Closes https://github.com/mbeijen/File-MimeInfo/issues/53 + Closes https://codeberg.org/michielb/File-MimeInfo/issues/53 0.33 2022-07-12 - Fix uninitialized value warning in File::MimeInfo::Applications, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/File-MimeInfo-0.35/META.json new/File-MimeInfo-0.37/META.json --- old/File-MimeInfo-0.35/META.json 2024-04-25 21:14:19.000000000 +0200 +++ new/File-MimeInfo-0.37/META.json 2026-05-19 22:50:06.000000000 +0200 @@ -51,13 +51,13 @@ "release_status" : "stable", "resources" : { "bugtracker" : { - "web" : "https://github.com/mbeijen/File-MimeInfo/issues" + "web" : "https://codeberg.org/michielb/File-MimeInfo/issues" }, "repository" : { - "url" : "https://github.com/mbeijen/File-MimeInfo" + "url" : "https://codeberg.org/michielb/File-MimeInfo" } }, - "version" : "0.35", + "version" : "0.37", "x_contributors" : [ "Bernhard Rosenkränzer <[email protected]>", "Christian Ludwig <[email protected]>", @@ -78,7 +78,8 @@ "Stefan Seifert <[email protected]>", "brian m. carlson <[email protected]>", "gregor herrmann <[email protected]>", - "mazunki <[email protected]>" + "mazunki <[email protected]>", + "zhumengu <[email protected]>" ], "x_serialization_backend" : "JSON::PP version 4.16" } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/File-MimeInfo-0.35/META.yml new/File-MimeInfo-0.37/META.yml --- old/File-MimeInfo-0.35/META.yml 2024-04-25 21:14:19.000000000 +0200 +++ new/File-MimeInfo-0.37/META.yml 2026-05-19 22:50:06.000000000 +0200 @@ -28,9 +28,9 @@ Pod::Usage: '0' perl: '5.006001' resources: - bugtracker: https://github.com/mbeijen/File-MimeInfo/issues - repository: https://github.com/mbeijen/File-MimeInfo -version: '0.35' + bugtracker: https://codeberg.org/michielb/File-MimeInfo/issues + repository: https://codeberg.org/michielb/File-MimeInfo +version: '0.37' x_contributors: - 'Bernhard Rosenkränzer <[email protected]>' - 'Christian Ludwig <[email protected]>' @@ -52,4 +52,5 @@ - 'brian m. carlson <[email protected]>' - 'gregor herrmann <[email protected]>' - 'mazunki <[email protected]>' + - 'zhumengu <[email protected]>' x_serialization_backend: 'CPAN::Meta::YAML version 0.018' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/File-MimeInfo-0.35/Makefile.PL new/File-MimeInfo-0.37/Makefile.PL --- old/File-MimeInfo-0.35/Makefile.PL 2024-04-25 21:03:59.000000000 +0200 +++ new/File-MimeInfo-0.37/Makefile.PL 2026-05-19 19:57:25.000000000 +0200 @@ -39,8 +39,8 @@ }, META_MERGE => { resources => { - repository => 'https://github.com/mbeijen/File-MimeInfo', - bugtracker => 'https://github.com/mbeijen/File-MimeInfo/issues', + repository => 'https://codeberg.org/michielb/File-MimeInfo', + bugtracker => 'https://codeberg.org/michielb/File-MimeInfo/issues', }, # a list of our awesome contributors generated from git # using the command: @@ -66,6 +66,7 @@ 'brian m. carlson <[email protected]>', 'gregor herrmann <[email protected]>', 'mazunki <[email protected]>', + 'zhumengu <[email protected]>', ], }, ); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/File-MimeInfo-0.35/lib/File/MimeInfo/Applications.pm new/File-MimeInfo-0.37/lib/File/MimeInfo/Applications.pm --- old/File-MimeInfo-0.35/lib/File/MimeInfo/Applications.pm 2024-04-25 21:06:22.000000000 +0200 +++ new/File-MimeInfo-0.37/lib/File/MimeInfo/Applications.pm 2026-05-19 22:43:05.000000000 +0200 @@ -9,7 +9,7 @@ use File::DesktopEntry; require Exporter; -our $VERSION = '0.35'; +our $VERSION = '0.37'; our @ISA = qw(Exporter); our @EXPORT = qw( @@ -103,6 +103,7 @@ $Carp::CarpLevel++; my @paths = grep defined, ($mimetype, $user, $system, $deprecated, $distro, $legacy); my @list = _read_list(@paths); + return undef if @list == 0; my $desktop_file = _find_file(reverse @list); $Carp::CarpLevel--; @@ -311,6 +312,7 @@ =head1 COPYRIGHT Copyright (c) 2005, 2012 Jaap G Karssenberg. All rights reserved. +Copyright (c) 2013-2026 Michiel W. Beijen. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/File-MimeInfo-0.35/lib/File/MimeInfo/Magic.pm new/File-MimeInfo-0.37/lib/File/MimeInfo/Magic.pm --- old/File-MimeInfo-0.35/lib/File/MimeInfo/Magic.pm 2024-04-25 21:06:22.000000000 +0200 +++ new/File-MimeInfo-0.37/lib/File/MimeInfo/Magic.pm 2026-05-19 22:43:01.000000000 +0200 @@ -17,7 +17,7 @@ our @ISA = qw(Exporter File::MimeInfo); our @EXPORT = qw(mimetype); our @EXPORT_OK = qw(extensions describe globs inodetype magic); -our $VERSION = '0.35'; +our $VERSION = '0.37'; our $DEBUG; our $_hashed = 0; @@ -145,7 +145,7 @@ my $file = shift; open MAGIC, '<', $file - || croak "Could not open file '$file' for reading"; + or croak "Could not open file '$file' for reading"; binmode MAGIC; <MAGIC> eq "MIME-Magic\x00\n" or carp "Magic file '$file' doesn't seem to be a magic file"; @@ -348,5 +348,6 @@ =head1 COPYRIGHT Copyright (c) 2003, 2012 Jaap G Karssenberg. All rights reserved. +Copyright (c) 2013-2026 Michiel W. Beijen. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/File-MimeInfo-0.35/lib/File/MimeInfo/Rox.pm new/File-MimeInfo-0.37/lib/File/MimeInfo/Rox.pm --- old/File-MimeInfo-0.35/lib/File/MimeInfo/Rox.pm 2024-04-25 21:06:22.000000000 +0200 +++ new/File-MimeInfo-0.37/lib/File/MimeInfo/Rox.pm 2026-05-19 22:43:09.000000000 +0200 @@ -11,7 +11,7 @@ our @EXPORT = qw(mime_exec mime_system); our @EXPORT_OK = qw(suggest_script_name); our %EXPORT_TAGS = (magic => \@EXPORT); -our $VERSION = '0.35'; +our $VERSION = '0.37'; our @choicespath = ( config_home('rox.sourceforge.net'), File::Spec->catdir($ENV{HOME}, 'Choices'), @@ -168,6 +168,7 @@ =head1 COPYRIGHT Copyright (c) 2003, 2012 Jaap G Karssenberg. All rights reserved. +Copyright (c) 2013-2026 Michiel W. Beijen. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/File-MimeInfo-0.35/lib/File/MimeInfo.pm new/File-MimeInfo-0.37/lib/File/MimeInfo.pm --- old/File-MimeInfo-0.35/lib/File/MimeInfo.pm 2024-04-25 21:06:22.000000000 +0200 +++ new/File-MimeInfo-0.37/lib/File/MimeInfo.pm 2026-05-19 22:42:58.000000000 +0200 @@ -11,7 +11,7 @@ our @ISA = qw(Exporter); our @EXPORT = qw(mimetype); our @EXPORT_OK = qw(extensions describe globs inodetype mimetype_canon mimetype_isa); -our $VERSION = '0.35'; +our $VERSION = '0.37'; our $DEBUG; our ($_hashed, $_hashed_aliases, $_hashed_subclasses, $_has_mimeinfo_database); @@ -115,7 +115,7 @@ print STDERR "> File is Path::Tiny object and exists, " . "trying default method\n" if $DEBUG; open my $fh, '<', $file or return undef; - binmode FILE, ':utf8' unless $] < 5.008; + binmode $fh, ':utf8' unless $] < 5.008; read $fh, $line, 32; close $fh; } @@ -165,21 +165,31 @@ sub _hash_globs { my $file = shift; - open GLOB, '<', $file || croak "Could not open file '$file' for reading" ; + open GLOB, '<', $file or croak "Could not open file '$file' for reading" ; binmode GLOB, ':utf8' unless $] < 5.008; my ($string, $glob); + my %seen_extension; while (<GLOB>) { next if /^\s*#/ or ! /\S/; # skip comments and empty lines chomp; ($string, $glob) = split /:/, $_, 2; unless ($glob =~ /[\?\*\[]/) { $literal{$glob} = $string } elsif ($glob =~ /^\*\.(\w+(\.\w+)*)$/) { - $extension{$1} = $string unless exists $extension{$1}; + next if $seen_extension{$1}++; + if (exists $extension{$1} && $extension{$1} ne $string) { + my $old = $extension{$1}; + if (defined $mime2ext{$old}) { + @{$mime2ext{$old}} = grep { $_ ne $1 } @{$mime2ext{$old}}; + delete $mime2ext{$old} unless @{$mime2ext{$old}}; + } + } + $extension{$1} = $string; $mime2ext{$string} = [] if !defined($mime2ext{$string}); - push @{$mime2ext{$string}}, $1; + push @{$mime2ext{$string}}, $1 + unless grep { $_ eq $1 } @{$mime2ext{$string}}; } else { unshift @globs, [$glob, _glob_to_regexp($glob), $string] } } - close GLOB || croak "Could not open file '$file' for reading" ; + close GLOB or croak "Could not open file '$file' for reading" ; } sub _glob_to_regexp { @@ -216,14 +226,14 @@ : ( reverse data_files('mime', split '/', "$mt.xml") ) ; for my $file (@descfiles) { $desc = ''; # if a file was found, return at least empty string - open XML, '<', $file || croak "Could not open file '$file' for reading"; + open XML, '<', $file or croak "Could not open file '$file' for reading"; binmode XML, ':utf8' unless $] < 5.008; while (<XML>) { next unless m!<comment\s*$att>(.*?)</comment>!; $desc = $1; last; } - close XML || croak "Could not open file '$file' for reading"; + close XML or croak "Could not open file '$file' for reading"; last if $desc; } return $desc; @@ -249,7 +259,7 @@ my (@done, %map); for my $file (@files) { next if grep {$_ eq $file} @done; - open MAP, '<', $file || croak "Could not open file '$file' for reading"; + open MAP, '<', $file or croak "Could not open file '$file' for reading"; binmode MAP, ':utf8' unless $] < 5.008; while (my $line = <MAP>) { next unless $line =~ m/\S/; # skip empty lines @@ -487,6 +497,7 @@ =head1 COPYRIGHT Copyright (c) 2003, 2012 Jaap G Karssenberg. All rights reserved. +Copyright (c) 2013-2026 Michiel W. Beijen. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/File-MimeInfo-0.35/mimeopen new/File-MimeInfo-0.37/mimeopen --- old/File-MimeInfo-0.35/mimeopen 2024-04-25 21:06:22.000000000 +0200 +++ new/File-MimeInfo-0.37/mimeopen 2026-05-19 22:42:51.000000000 +0200 @@ -2,7 +2,7 @@ use strict; use warnings; -our $VERSION = '0.35'; +our $VERSION = '0.37'; $|++; # ########## # @@ -10,7 +10,15 @@ # ########## # use Encode::Locale; use Encode; -@ARGV = map { decode(locale => $_, 1) } @ARGV; +use B qw(cstring); +@ARGV = map { my $d = eval { decode(locale => $_, 1) }; defined $d ? $d : $_ } @ARGV; + + +if (-t) { + binmode(STDIN, ":encoding(console_in)"); + binmode(STDOUT, ":encoding(console_out)"); + binmode(STDERR, ":encoding(console_out)"); +} my %args = (); my %opts = ( @@ -71,6 +79,7 @@ if ($args{version}) { print "mimeopen $VERSION\n\n", << 'EOV'; Copyright (c) 2005, 2012 Jaap G Karssenberg. All rights reserved. +Copyright (c) 2013-2026 Michiel W. Beijen. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl. @@ -145,7 +154,8 @@ : mimetype($f) ; unless (length $mimetype) { - print STDERR "Could not determine mimetype for file: $file\n"; + my $q = -t STDERR ? cstring($file) : $file; + print STDERR "Could not determine mimetype for file: $q\n"; exit 5; } @@ -170,7 +180,8 @@ exit 6; } -print 'Opening '.join(', ', map qq{"$_"}, @ARGV) +my $q = -t STDOUT ? \&cstring : sub { qq{"$_[0]"} }; +print 'Opening '.join(', ', map $q->($_), @ARGV) . ' with '.$default->get_value('Name')." ($mimetype)\n"; #print STDERR "exec string: ".$default->parse_Exec(@ARGV)."\n"; if (@ARGV == 1 or $default->wants_list) { @@ -258,11 +269,8 @@ sub resolvelink { # --dereference my $file = shift; - my $link = readlink($file) || return $file; - my (undef, $dir, undef) = File::Spec->splitpath($file); - $link = File::Spec->rel2abs($link, $dir); - $link = resolvelink($link) if -l $link; # recurs - return $link; + require Cwd; + return Cwd::abs_path($file) // $file; # undef on cycles } __END__ @@ -347,7 +355,7 @@ =head1 BUGS If you find bugs, please file them in our Github -issue tracker at L<https://github.com/mbeijen/File-MimeInfo/issues>. +issue tracker at L<https://codeberg.org/michielb/File-MimeInfo/issues>. See File::MimeInfo::Applications(3) and File::DesktopEntry(3) for some limitations. @@ -360,6 +368,7 @@ =head1 COPYRIGHT Copyright (c) 2002, 2012 Jaap G Karssenberg. All rights reserved. +Copyright (c) 2013-2026 Michiel W. Beijen. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/File-MimeInfo-0.35/mimetype new/File-MimeInfo-0.37/mimetype --- old/File-MimeInfo-0.35/mimetype 2024-04-25 21:06:22.000000000 +0200 +++ new/File-MimeInfo-0.37/mimetype 2026-05-19 22:42:54.000000000 +0200 @@ -2,7 +2,7 @@ use strict; use warnings; -our $VERSION = '0.35'; +our $VERSION = '0.37'; $|++; # ########## # @@ -10,7 +10,15 @@ # ########## # use Encode::Locale; use Encode; -@ARGV = map { decode(locale => $_, 1) } @ARGV; +use B qw(cstring); +@ARGV = map { my $d = eval { decode(locale => $_, 1) }; defined $d ? $d : $_ } @ARGV; + +# Set up output encoding +if (-t) { + binmode(STDIN, ":encoding(console_in)"); + binmode(STDOUT, ":encoding(console_out)"); + binmode(STDERR, ":encoding(console_out)"); +} my %args = (); my %opts = ( @@ -81,6 +89,7 @@ if ($args{version}) { print "mimetype $VERSION\n\n", << 'EOV'; Copyright (c) 2003, 2012 Jaap G Karssenberg. All rights reserved. +Copyright (c) 2013-2026 Michiel W. Beijen. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl. @@ -133,8 +142,8 @@ # --namefile if ($args{namefile}) { - open IN, $args{namefile} - || die "Couldn't open file: $args{namefile}\n"; + open IN, '<', $args{namefile} + or die "Couldn't open file: $args{namefile}\n"; unshift @ARGV, map {chomp; $_} (<IN>); close IN; } @@ -146,9 +155,10 @@ } # Formatting stuff +my $name_of = -t STDOUT ? sub { cstring($_[0]) } : sub { $_[0] }; my $l = 5; # "STDIN" unless ($args{brief} || $args{noalign}) { - for (@ARGV) { $l = length($_) if $l < length($_) } + for (@ARGV) { my $n = length $name_of->($_); $l = $n if $l < $n } } $args{separator} = ':' unless defined $args{separator}; @@ -195,19 +205,20 @@ foreach my $file (@ARGV) { # --dereference my $f = ($args{dereference} && -l $file) ? resolvelink($file) : $file; + my $name = $name_of->($file); # --magic-only if ($args{'magic-only'}) { - print $format->($file, magic($f) || default($f)), "\n"; + print $format->($name, magic($f) || default($f)), "\n"; } # --all elsif ($args{all}) { for (qw#inodetype globs magic default#) { my $m = eval "$_(\$f)"; - print $format->($file, $m), "\n" if $m; + print $format->($name, $m), "\n" if $m; } } else { - print $format->($file, mimetype($f)), "\n" + print $format->($name, mimetype($f)), "\n" } } @@ -244,11 +255,8 @@ sub resolvelink { # --dereference my $file = shift; - my $link = readlink($file) || return $file; - my (undef, $dir, undef) = File::Spec->splitpath($file); - $link = File::Spec->rel2abs($link, $dir); - $link = resolvelink($link) if -l $link; # recurs - return $link; + require Cwd; + return Cwd::abs_path($file) // $file; # undef on cycles } sub desc { # Cache description @@ -459,7 +467,7 @@ =head1 BUGS If you find bugs, please file them in our Github -issue tracker at L<https://github.com/mbeijen/File-MimeInfo/issues>. +issue tracker at L<https://codeberg.org/michielb/File-MimeInfo/issues>. B<mimetype> doesn't provide a switch for looking inside compressed files because it seems to me that this can only be done by un-compressing the file, @@ -475,6 +483,7 @@ =head1 COPYRIGHT Copyright (c) 2003, 2012 Jaap G Karssenberg. All rights reserved. +Copyright (c) 2013-2026 Michiel W. Beijen. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/File-MimeInfo-0.35/t/02_magic.t new/File-MimeInfo-0.37/t/02_magic.t --- old/File-MimeInfo-0.35/t/02_magic.t 2024-04-25 21:03:59.000000000 +0200 +++ new/File-MimeInfo-0.37/t/02_magic.t 2026-05-19 19:57:25.000000000 +0200 @@ -1,22 +1,27 @@ -require Test::More; +use strict; +use warnings; -no warnings; -@File::MimeInfo::DIRS = ('./t/mime'); # forceing non default value -#$File::MimeInfo::DEBUG = 1; +use Test::More; + + +{ + no warnings 'once'; + @File::MimeInfo::DIRS = ('./t/mime'); # forceing non default value +} opendir MAGIC, 't/magic/'; my @files = grep {$_ !~ /^\./} readdir MAGIC; closedir MAGIC; -Test::More->import( tests => (2 * scalar(@files) + 1) ); - use_ok('File::MimeInfo::Magic', qw/mimetype magic/); for (@files) { - $type = $_; + my $type = $_; $type =~ tr#_#/#; $type =~ s#\.\w+$##; - ok( mimetype("t/magic/$_") eq $type, "complete (magic) typing of $_"); + is( mimetype("t/magic/$_"), $type, "complete (magic) typing of $_"); undef $type if $type eq "text/plain" || $type eq "application/octet-stream"; - ok( magic("t/magic/$_") eq $type, "magic typing of $_" ); + is( magic("t/magic/$_"), $type, "magic typing of $_" ); } + +done_testing; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/File-MimeInfo-0.35/t/04_IO_objects.t new/File-MimeInfo-0.37/t/04_IO_objects.t --- old/File-MimeInfo-0.35/t/04_IO_objects.t 2024-04-25 21:03:59.000000000 +0200 +++ new/File-MimeInfo-0.37/t/04_IO_objects.t 2026-05-19 19:57:25.000000000 +0200 @@ -1,16 +1,15 @@ use strict; use warnings; + use Test::More; $ENV{XDG_DATA_HOME} = './t/'; -$ENV{XDG_DATA_DIRS} = './t/'; # forceing non default value +$ENV{XDG_DATA_DIRS} = './t/'; # forcing non default value opendir MAGIC, 't/magic/'; my @files = grep {$_ !~ /\./ and $_ ne 'CVS'} readdir MAGIC; closedir MAGIC; -Test::More->import( tests => scalar(@files) ); - eval "use File::MimeInfo::Magic"; # force runtime evaluation die $@ if $@; @@ -31,15 +30,4 @@ } } -__END__ - -# Not all platforms seem to support <:encoding(latin2) :( - -unless (eval 'require IO::File') { - ok(1, 'Skip - no IO::File found'); - exit 0; -} - -my $io = new IO::File; -$io->open('t/text_plain_czech', '<:encoding(latin2)'); -ok( mimetype($io) eq 'text/plain', "czech (ISO 8859-2) encoded text" ); +done_testing; \ No newline at end of file diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/File-MimeInfo-0.35/t/11mimeinfo.t new/File-MimeInfo-0.37/t/11mimeinfo.t --- old/File-MimeInfo-0.35/t/11mimeinfo.t 2024-04-25 21:03:59.000000000 +0200 +++ new/File-MimeInfo-0.37/t/11mimeinfo.t 2026-05-19 19:57:25.000000000 +0200 @@ -33,7 +33,7 @@ "$test (stdin)"); }; # with empty mimetype dirs, should exit non-zero - `$^X $mimetype_file --database "$empty_dir" --noalign $test`; + `$^X $mimetype_file --database "$empty_dir" --noalign $test 2>&1`; cmp_ok($?, '>', 0); } ++++++ README.md ++++++ ## Build Results Current state of perl in openSUSE:Factory is  The current state of perl in the devel project build (devel:languages:perl)  ++++++ _scmsync.obsinfo ++++++ mtime: 1779357731 commit: 8f5711c25789327d04e917e9871581e2fc884669b3320c8445f6d5052ad72b36 url: https://src.opensuse.org/perl/perl-File-MimeInfo revision: 8f5711c25789327d04e917e9871581e2fc884669b3320c8445f6d5052ad72b36 projectscmsync: https://src.opensuse.org/perl/_ObsPrj ++++++ build.specials.obscpio ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/.gitignore new/.gitignore --- old/.gitignore 1970-01-01 01:00:00.000000000 +0100 +++ new/.gitignore 2026-05-21 12:02:11.000000000 +0200 @@ -0,0 +1 @@ +.osc
