diff options
author | Modestas Vainius <modestas@vainius.eu> | 2009-06-28 23:59:06 +0300 |
---|---|---|
committer | Guillem Jover <guillem@debian.org> | 2009-07-08 11:25:16 +0200 |
commit | fd4d99862af837ccf12e83d13da73e8ffb24aa17 (patch) | |
tree | 6da103aca0027545058a40f487ca5bc15be75e02 /scripts | |
parent | 9d0fe91f2291dc5b9ceed8f63a1fc006f20e36ed (diff) | |
download | dpkg-fd4d99862af837ccf12e83d13da73e8ffb24aa17.tar.gz |
Fix wildcard support in symbol files
They were broken due to typo. Also add a test for wildcards.
Signed-off-by: Modestas Vainius <modestas@vainius.eu>
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/Dpkg/Shlibs/SymbolFile.pm | 2 | ||||
-rw-r--r-- | scripts/t/200_Dpkg_Shlibs.t | 13 |
2 files changed, 13 insertions, 2 deletions
diff --git a/scripts/Dpkg/Shlibs/SymbolFile.pm b/scripts/Dpkg/Shlibs/SymbolFile.pm index 1912ac9fb..4355ce4aa 100644 --- a/scripts/Dpkg/Shlibs/SymbolFile.pm +++ b/scripts/Dpkg/Shlibs/SymbolFile.pm @@ -336,7 +336,7 @@ sub symbol_match_wildcard { my $w_sym = $obj->{wildcards}{$version}; return undef unless $w_sym->arch_is_concerned($self->{arch}); $self->{used_wildcards}++; - return $w_sym->clone(symbol => $name . '@' . $version); + return $w_sym->clone(symbol => $name); } return undef; } diff --git a/scripts/t/200_Dpkg_Shlibs.t b/scripts/t/200_Dpkg_Shlibs.t index f49eebb24..48d4a8f7d 100644 --- a/scripts/t/200_Dpkg_Shlibs.t +++ b/scripts/t/200_Dpkg_Shlibs.t @@ -1,6 +1,6 @@ # -*- mode: cperl;-*- -use Test::More tests => 61; +use Test::More tests => 62; use IO::String; use strict; @@ -123,6 +123,17 @@ is_deeply($sym, Dpkg::Shlibs::Symbol->new( 'symbol' => '_errno@GLIBC_2.0', 'deprecated' => '2.6-1', 'depends' => '', 'soname' => 'libc.so.6' ), 'deprecated symbol'); +# Wildcard test +$sym = Dpkg::Shlibs::Symbol->new(symbol => '*@GLIBC_PRIVATE', minver => '2.3.6.wildcard'); +$sym_file_old->add_symbol('libc.so.6', $sym); +$sym_file_old->merge_symbols($obj, "2.6-1"); +$sym = $sym_file_old->lookup_symbol('__nss_services_lookup@GLIBC_PRIVATE', ['libc.so.6']); +is_deeply($sym, Dpkg::Shlibs::Symbol->new( 'symbol' => '__nss_services_lookup@GLIBC_PRIVATE', + 'minver' => '2.3.6.wildcard', 'dep_id' => 0, + 'deprecated' => 0, 'depends' => '', + 'soname' => 'libc.so.6' ), 'wildcarded symbol'); + +# Save -> Load test use File::Temp; my $save_file = new File::Temp; |