The branch, dpkg-shlibdeps-buxy has been updated
       via  2c9ec8dcf5a6e58d92750a8ae19d202f86aa868d (commit)
      from  3d4a0d08f72807fe2fc47c66a91a65b4f9b49b14 (commit)


- Shortlog ------------------------------------------------------------
2c9ec8d Extend SymbolFile API to be able to dump it while leaving deprecated 
symbols out

Summary of changes:
 scripts/Dpkg/Shlibs/SymbolFile.pm |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)
-----------------------------------------------------------------------
Details of changes:

commit 2c9ec8dcf5a6e58d92750a8ae19d202f86aa868d
Author: Raphael Hertzog <[EMAIL PROTECTED]>
Date:   Tue Sep 25 20:06:37 2007 +0200

    Extend SymbolFile API to be able to dump it while leaving deprecated 
symbols out

diff --git a/scripts/Dpkg/Shlibs/SymbolFile.pm 
b/scripts/Dpkg/Shlibs/SymbolFile.pm
index 6489bd1..64448a1 100644
--- a/scripts/Dpkg/Shlibs/SymbolFile.pm
+++ b/scripts/Dpkg/Shlibs/SymbolFile.pm
@@ -151,7 +151,7 @@ sub load {
 }
 
 sub save {
-    my ($self, $file) = @_;
+    my ($self, $file, $with_deprecated) = @_;
     $file = $self->{file} unless defined($file);
     my $fh;
     if ($file eq "-") {
@@ -160,17 +160,19 @@ sub save {
        open($fh, ">", $file)
            || syserr(sprintf(_g("Can't open %s for writing: %s"), $file, $!));
     }
-    $self->dump($fh);
+    $self->dump($fh, $with_deprecated);
     close($fh) if ($file ne "-");
 }
 
 sub dump {
-    my ($self, $fh) = @_;
+    my ($self, $fh, $with_deprecated) = @_;
+    $with_deprecated = 1 unless defined($with_deprecated);
     foreach my $soname (sort keys %{$self->{objects}}) {
        print $fh "$soname $self->{objects}{$soname}{deps}[0]\n";
        print $fh "| $_" foreach (@{$self->{objects}{$soname}{deps}}[ 1 .. -1 
]);
        foreach my $sym (sort keys %{$self->{objects}{$soname}{syms}}) {
            my $info = $self->{objects}{$soname}{syms}{$sym};
+           next if $info->{deprecated} and not $with_deprecated;
            print $fh "#DEPRECATED: $info->{deprecated}#" if 
$info->{deprecated};
            print $fh " $sym $info->{minver}";
            print $fh " $info->{dep_id}" if $info->{dep_id};

-- 
dpkg's main repository


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to