[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#192403: [PATCH CVS] Skip empty files



Package: apt
Version: 0.5.5.1
Followup-For: Bug #192403

Hello Folks,

I'm including one trivial patch to solve this issue in current release
and CVS versions of APT. Please apply.

Changelog entry:
 
 * Skip empty files. Closes #192403

Index: apt-pkg/pkgcachegen.cc
===================================================================
RCS file: /cvs/deity/apt/apt-pkg/pkgcachegen.cc,v
retrieving revision 1.53
diff -u -r1.53 pkgcachegen.cc
--- apt-pkg/pkgcachegen.cc      2 Feb 2003 02:44:20 -0000       1.53
+++ apt-pkg/pkgcachegen.cc      21 Jun 2003 22:07:37 -0000
@@ -632,13 +632,16 @@
       if ((*I)->Exists() == false)
         continue;
 
+      if ((*I)->Size() <= 1)
+       continue;
+
       if ((*I)->FindInCache(Gen.GetCache()).end() == false)
       {
         _error->Warning("Duplicate sources.list entry %s",
                         (*I)->Describe().c_str());
         continue;
       }
-      
+
       unsigned long Size = (*I)->Size();
       Progress.OverallProgress(CurrentSize,TotalSize,Size,_("Reading Package Lists"));
       CurrentSize += Size;


-- System Information:
Debian Release: testing/unstable
Architecture: i386
Kernel: Linux retteb.casa 2.4.21-ac1-retteb #1 Sat Jun 14 15:43:51 BRT 2003 i686
Locale: LANG=en_US.ISO-8859-1, LC_CTYPE=en_US.ISO-8859-1

Versions of packages apt depends on:
ii  libc6                         2.3.1-17   GNU C Library: Shared libraries an
ii  libgcc1                       1:3.3-3    GCC support library
ii  libstdc++5                    1:3.3-3    The GNU Standard C++ Library v3

-- no debconf information




Reply to: