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

Bug#203299: /usr/bin/apt-cache: need --no-all-versions from subshell



On Wed, Jul 30, 2003 at 06:28:07AM +0800, Dan Jacobson wrote:

> maybe you only have one mozilla version where all your sources.lists look?
> 
> Filip> What's the actual output from the show commands (rather than counting it)?
> 
> $ apt-cache show mozilla|grep Versi
> Version: 2:1.4-2
> $ sh -c 'apt-cache show mozilla'|grep Versi
> Version: 2:1.4-2
> Version: 2:1.3.1-3
> Version: 2:1.1-1
> $ apt-cache --version
> apt 0.5.8 for linux i386 compiled on Jul 25 2003 20:40:37

Recompile apt with this patch and see if the behaviour changes.

-- 
 - mdz

--- apt-cache.cc.~1.65.~	2003-07-21 23:10:01.000000000 -0400
+++ apt-cache.cc	2003-07-29 22:16:01.000000000 -0400
@@ -1195,7 +1195,7 @@
    Buffer[V.FileList()->Size] = '\n';
    if (PkgF.Seek(V.FileList()->Offset) == false ||
        PkgF.Read(Buffer,V.FileList()->Size) == false ||
-       write(STDOUT_FILENO,Buffer,V.FileList()->Size+1) != V.FileList()->Size+1)
+       fwrite(Buffer,1,V.FileList()->Size+1,stdout) < V.FileList()->Size+1)
    {
       delete [] Buffer;
       return false;



Reply to: