Bläddra i källkod

Dpkg::Arch: Force a sane input record separator for file parsing functions

Guillem Jover 18 år sedan
förälder
incheckning
4bb7dbb89a
2 ändrade filer med 10 tillägg och 0 borttagningar
  1. 7 0
      ChangeLog
  2. 3 0
      scripts/Dpkg/Arch.pm

+ 7 - 0
ChangeLog

@@ -1,3 +1,10 @@
+2007-11-15  Guillem Jover  <guillem@debian.org>
+
+	* scripts/Dpkg/Arch.pm (read_cputable): Force a sane input record
+	separator.
+	(read_ostable): Likewise.
+	(read_triplettable): Likewise.
+
 2007-11-04  Guillem Jover  <guillem@debian.org>
 
 	* scripts/Makefile.am (clean): Set PERL5LIB to force use of shipped

+ 3 - 0
scripts/Dpkg/Arch.pm

@@ -104,6 +104,7 @@ sub get_valid_arches()
 sub read_cputable
 {
     local $_;
+    local $/ = "\n";
 
     open CPUTABLE, "$pkgdatadir/cputable"
 	or syserr(_g("unable to open cputable"));
@@ -120,6 +121,7 @@ sub read_cputable
 sub read_ostable
 {
     local $_;
+    local $/ = "\n";
 
     open OSTABLE, "$pkgdatadir/ostable"
 	or syserr(_g("unable to open ostable"));
@@ -138,6 +140,7 @@ sub read_triplettable()
     read_cputable() if (!@cpu);
 
     local $_;
+    local $/ = "\n";
 
     open TRIPLETTABLE, "$pkgdatadir/triplettable"
 	or syserr(_g("unable to open triplettable"));