]> git.saurik.com Git - apt.git/blobdiff - apt-private/private-cachefile.cc
Merge branch 'debian/sid' into debian/experimental
[apt.git] / apt-private / private-cachefile.cc
index 25f65ef09a0454e21e554204a2359c9fd2ea1461..29e665245f5544065cb9bfc3718e93f33ba2cc32 100644 (file)
@@ -2,12 +2,19 @@
 #include<config.h>
 
 #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>
                                                                        /*}}}*/
@@ -25,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                                      /*{{{*/