Hello, On pirmadienis 11 Sausis 2010 20:33:39 Raphael Hertzog wrote: > Hi, > > On Sun, 10 Jan 2010, Modestas Vainius wrote: > > Remote branch [1] has been updated. Notes: > > I cleaned up your branch and added some changes of mine, it's here: > http://git.debian.org/?p=users/hertzog/dpkg.git;a=shortlog;h=refs/heads/pu/ > symbol-patterns > > I squashed some small fixes in some of your commits (small typos in the > man page, and a bug in save_load_test()), I hope you don't mind.
Sure. > Feel free to review. I'm going to merge this soon if you don't see any > problem. You will need testsuite-fix.diff patch to make the code pass the testsuite. I suggest --amend it to your old-style wildcards commit because the later changed cosmetic behaviour a bit (save_load_test() fails because diff is no longer the same due to wildcards etc.) In addition (save_load_test_shifts.diff), double "shift"s are back in save_load_test() because @_ is later passed to save() call. I don't know how you prefer to handle this type of cases in your style though. Otherwise, full ACK from me. -- Modestas Vainius <[email protected]>
diff --git a/scripts/t/200_Dpkg_Shlibs.t b/scripts/t/200_Dpkg_Shlibs.t
index ba084a6..cc3307b 100644
--- a/scripts/t/200_Dpkg_Shlibs.t
+++ b/scripts/t/200_Dpkg_Shlibs.t
@@ -159,7 +159,8 @@ use File::Temp;
use File::Basename qw(basename);
sub save_load_test {
- my ($symfile, $comment) = @_;
+ my $symfile = shift;
+ my $comment = shift;
my $save_file = new File::Temp;
$symfile->save($save_file->filename, @_);
diff --git a/scripts/t/200_Dpkg_Shlibs.t b/scripts/t/200_Dpkg_Shlibs.t index ba084a6..b6933a9 100644 --- a/scripts/t/200_Dpkg_Shlibs.t +++ b/scripts/t/200_Dpkg_Shlibs.t @@ -13,7 +13,7 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -use Test::More tests => 104; +use Test::More tests => 105; use Cwd; use IO::String; @@ -152,6 +152,7 @@ $sym = $sym_file_old->lookup_symbol('__nss_services_loo...@glibc_private', ['lib is_deeply($sym, Dpkg::Shlibs::Symbol->new( 'symbol' => '__nss_services_loo...@glibc_private', 'minver' => '2.3.6.wildcard', 'dep_id' => 0, 'deprecated' => 0, 'depends' => '', + 'tags' => { 'symver' => undef, optional => undef }, 'tagorder' => [ 'symver', 'optional' ], 'soname' => 'libc.so.6', 'matching_pattern' => $pat ), 'wildcarded symbol'); # Save -> Load test @@ -457,9 +458,14 @@ ok ( $sym->get_pattern()->equals($sym_file->create_symbol('(c++|symver)SYMVER_1 # Test old style wildcard support load_patterns_symbols(); -$pat = $sym_file->lookup_pattern($sym_file->create_symbol('*...@symveropt_2 2'), ['libpatterns.so.1']); -ok ( $pat->is_optional(), "Old style wildcard is optional"); -is ( $pat->get_alias_type(), "symver", "old style wildcard is a symver pattern" ); +$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" ); + +$pat = $sym_file->lookup_pattern($sym_file->create_symbol('(symver|optional)SYMVEROPT_2 2'), ['libpatterns.so.1']); +$sym->{symbol_templ} = $pat->{symbol_templ}; +is_deeply( $pat, $sym, "old style wildcard is the same as (symver|optional)" ); # Get rid of all SymverOptional symbols foreach my $tmp (keys %{$obj->{dynsyms}}) { diff --git a/scripts/t/200_Dpkg_Shlibs/patterns.symbols b/scripts/t/200_Dpkg_Shlibs/patterns.symbols index f626eae..bacf799 100644 --- a/scripts/t/200_Dpkg_Shlibs/patterns.symbols +++ b/scripts/t/200_Dpkg_Shlibs/patterns.symbols @@ -1,7 +1,7 @@ libpatterns.so.1 libpatterns1 #MINVER# - *...@symveropt_2 2 (c++|regex|optional)NSA::ClassA::Private(::.*)?...@base 1.private (c++)NSB::Symver::symver_method2()@SYMVER_1 1.method2 + (symver|optional)SYMVEROPT_2 2 symverop...@symveropt_2 2 (c++|symver)SYMVER_1 1.generic symve...@symver_1 1
signature.asc
Description: This is a digitally signed message part.

