The branch, master has been updated
       via  8baa694e542bc579f205de54b9c5c73768737095 (commit)
      from  294f86c859f6bce82b66861a9dc19c31483df6c0 (commit)


- Shortlog ------------------------------------------------------------
8baa694 update-alternatives: Check for undefined values when reading from the db

Summary of changes:
 ChangeLog                      |    4 ++++
 debian/changelog               |    2 ++
 scripts/update-alternatives.pl |    3 ++-
 3 files changed, 8 insertions(+), 1 deletions(-)
-----------------------------------------------------------------------
Details of changes:

commit 8baa694e542bc579f205de54b9c5c73768737095
Author: Guillem Jover <[EMAIL PROTECTED]>
Date:   Thu Dec 27 06:36:58 2007 +0200

    update-alternatives: Check for undefined values when reading from the db

diff --git a/ChangeLog b/ChangeLog
index a40ccb2..8158fc5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2007-12-27  Guillem Jover  <[EMAIL PROTECTED]>
 
+       * scripts/update-alternatives.pl (gl): Use defined instead of length.
+
+2007-12-27  Guillem Jover  <[EMAIL PROTECTED]>
+
        * scripts/update-alternatives.pl (set_links): New function.
        (config_alternatives): Use set_links instead of duped code.
        (set_alternatives): Likewise.
diff --git a/debian/changelog b/debian/changelog
index d962f66..b2d8186 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -39,6 +39,8 @@ dpkg (1.14.13) UNRELEASED; urgency=low
 
   [ Guillem Jover ]
   * Ignore the man pages when building without NLS support. Closes: #457673
+  * Fix perl warnings:
+    - Check for undefined values when reading from the alternative db.
 
   [ Updated dpkg translations ]
   * Swedish (Peter Karlsson)
diff --git a/scripts/update-alternatives.pl b/scripts/update-alternatives.pl
index 463b61d..9c1089d 100755
--- a/scripts/update-alternatives.pl
+++ b/scripts/update-alternatives.pl
@@ -700,7 +700,8 @@ sub paf {
 }
 sub gl {
     $!=0; $_= <AF>;
-    length($_) || &quit(sprintf(_g("error or eof reading %s for %s (%s)"), 
"$admindir/$name", $_[0], $!));
+    defined($_) || quit(sprintf(_g("error or eof reading %s for %s (%s)"),
+                                "$admindir/$name", $_[0], $!));
     s/\n$// || &badfmt(sprintf(_g("missing newline after %s"), $_[0]));
     $_;
 }

-- 
dpkg's main repository


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

Reply via email to