]> git.saurik.com Git - apt.git/blobdiff - apt-private/private-cachefile.cc
store Release files data in the Cache
[apt.git] / apt-private / private-cachefile.cc
index c822b9badf9a3995c0298541ecf9b655ce89a692..29e665245f5544065cb9bfc3718e93f33ba2cc32 100644 (file)
@@ -4,11 +4,17 @@
 #include <apt-pkg/algorithms.h>
 #include <apt-pkg/upgrade.h>
 #include <apt-pkg/error.h>
+#include <apt-pkg/configuration.h>
+#include <apt-pkg/depcache.h>
+#include <apt-pkg/pkgcache.h>
+#include <apt-pkg/cacheiterators.h>
 
-#include <cstdlib>
+#include <apt-private/private-output.h>
+#include <apt-private/private-cachefile.h>
 
-#include "private-output.h"
-#include "private-cachefile.h"
+#include <string.h>
+#include <ostream>
+#include <cstdlib>
 
 #include <apti18n.h>
                                                                        /*}}}*/
@@ -26,8 +32,10 @@ int CacheFile::NameComp(const void *a,const void *b)
    
    const pkgCache::Package &A = **(pkgCache::Package **)a;
    const pkgCache::Package &B = **(pkgCache::Package **)b;
+   const pkgCache::Group * const GA = SortCache->GrpP + A.Group;
+   const pkgCache::Group * const GB = SortCache->GrpP + B.Group;
 
-   return strcmp(SortCache->StrP + A.Name,SortCache->StrP + B.Name);
+   return strcmp(SortCache->StrP + GA->Name,SortCache->StrP + GB->Name);
 }
                                                                        /*}}}*/
 // CacheFile::Sort - Sort by name                                      /*{{{*/