The following commit has been merged in the master branch:
commit 8ee083c253f510fea4dda7999e0792ee82ab128f
Author: Modestas Vainius <[email protected]>
Date:   Fri Jan 29 19:27:32 2010 +0200

    Dpkg::Shlibs::Symbol: improve set_symbolname().
    
    Now it allows to set symbol template and autodetects if quotes are needed.

diff --git a/scripts/Dpkg/Shlibs/Symbol.pm b/scripts/Dpkg/Shlibs/Symbol.pm
index c3ef562..2fc3346 100644
--- a/scripts/Dpkg/Shlibs/Symbol.pm
+++ b/scripts/Dpkg/Shlibs/Symbol.pm
@@ -197,11 +197,18 @@ sub get_symboltempl {
 }
 
 sub set_symbolname {
-    my ($self, $name, $quoted) = @_;
-    if (defined $name) {
-       $self->{symbol} = $name;
+    my ($self, $name, $templ, $quoted) = @_;
+    unless (defined $name) {
+       $name = $self->{symbol};
     }
-    $self->{symbol_templ} = undef;
+    if (!defined $templ && $name =~ /\s/) {
+       $templ = $name;
+    }
+    if (!defined $quoted && defined $templ && $templ =~ /\s/) {
+       $quoted = '"';
+    }
+    $self->{symbol} = $name;
+    $self->{symbol_templ} = $templ;
     if ($quoted) {
        $self->{symbol_quoted} = $quoted;
     } else {

-- 
dpkg's main repository


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

Reply via email to