This is an automated email from the git hooks/post-receive script.

guillem pushed a commit to branch main
in repository dpkg.

View the commit online:
https://git.dpkg.org/cgit/dpkg/dpkg.git/commit/?id=f89d1e70123eb4aac10cc2484e5f52c9497bde43

commit f89d1e70123eb4aac10cc2484e5f52c9497bde43
Author: Guillem Jover <[email protected]>
AuthorDate: Sat Jan 17 14:50:05 2026 +0100

    Dpkg::Shlibs::Symbol: Emit a warning for the deprecated wildcard syntax
    
    This syntax has been documented as being deprecated for a long time,
    but the code did never emit deprecation warnings, so it is still being
    used in the wild.
    
    Closes: #1125722
---
 scripts/Dpkg/Shlibs/Symbol.pm | 2 ++
 scripts/t/Dpkg_Shlibs.t       | 6 ++++++
 2 files changed, 8 insertions(+)

diff --git a/scripts/Dpkg/Shlibs/Symbol.pm b/scripts/Dpkg/Shlibs/Symbol.pm
index df4243439..69a8844a4 100644
--- a/scripts/Dpkg/Shlibs/Symbol.pm
+++ b/scripts/Dpkg/Shlibs/Symbol.pm
@@ -168,6 +168,8 @@ sub initialize {
     # Support old style wildcard syntax. That is basically a symver with an
     # optional tag.
     if ($self->get_symbolname() =~ /^\*@(.*)$/) {
+        warning(g_('deprecated wildcard syntax in "%s"; use "%s" instead'),
+                $self->get_symbolname(), "(symver|optional)$1");
         $self->add_tag('symver') unless $self->has_tag('symver');
         $self->add_tag('optional') unless $self->has_tag('optional');
         $self->{symbol} = $1;
diff --git a/scripts/t/Dpkg_Shlibs.t b/scripts/t/Dpkg_Shlibs.t
index b321cc0f7..3576a0ba8 100644
--- a/scripts/t/Dpkg_Shlibs.t
+++ b/scripts/t/Dpkg_Shlibs.t
@@ -22,6 +22,8 @@ use Config;
 use Cwd;
 use IPC::Cmd qw(can_run);
 
+use Dpkg::ErrorHandling;
+
 if (! defined $Config{bin_ELF} || $Config{bin_ELF} ne 'define') {
     plan skip_all => 'only ELF is currently supported';
 }
@@ -217,6 +219,7 @@ is_deeply(\%tmp,
 );
 
 # Wildcard test.
+report_options(quiet_warnings => 1);
 my $pat = $sym_file_old->create_symbol('*@GLIBC_PRIVATE 2.3.6.wildcard');
 $sym_file_old->add_symbol($pat, 'libc.so.6');
 $sym_file_old->merge_symbols($obj, '2.6-1');
@@ -239,6 +242,7 @@ is_deeply($sym,
     ),
     'wildcarded symbol',
 );
+report_options(quiet_warnings => 0);
 
 # Save -> Load test.
 use File::Temp;
@@ -992,10 +996,12 @@ 
ok($sym->get_pattern()->equals($sym_file->create_symbol('(c++|symver)SYMVER_1 1.
 
 # Test old style wildcard support.
 load_patterns_symbols();
+report_options(quiet_warnings => 1);
 $sym = $sym_file->create_symbol('*@SYMVEROPT_2 2');
 ok($sym->is_optional(), 'Old style wildcard is optional');
 is($sym->get_alias_type(), 'symver', 'old style wildcard is a symver pattern');
 is($sym->get_symbolname(), 'SYMVEROPT_2', 'wildcard pattern got renamed');
+report_options(quiet_warnings => 0);
 
 $pat = $sym_file->lookup_pattern('(symver|optional)SYMVEROPT_2', 
'libpatterns.so.1');
 $sym->{symbol_templ} = $pat->{symbol_templ};

-- 
Dpkg.Org's dpkg

Reply via email to