]> git.saurik.com Git - apt.git/blobdiff - cmdline/apt-cache.cc
* merged with the apt--mvo branch
[apt.git] / cmdline / apt-cache.cc
index 94cfab14f743ad10d20103b813fa74a9632c73a4..cc4c1559e2f74dc1bc35d6f1f7180d24ea32fe13 100644 (file)
@@ -102,13 +102,15 @@ bool UnMet(CommandLine &CmdL)
            if (End->Type != pkgCache::Dep::PreDepends &&
                End->Type != pkgCache::Dep::Depends && 
                End->Type != pkgCache::Dep::Suggests &&
-               End->Type != pkgCache::Dep::Recommends)
+               End->Type != pkgCache::Dep::Recommends &&
+               End->Type != pkgCache::Dep::DpkgBreaks)
               continue;
 
            // Important deps only
            if (Important == true)
               if (End->Type != pkgCache::Dep::PreDepends &&
-                  End->Type != pkgCache::Dep::Depends)
+                  End->Type != pkgCache::Dep::Depends &&
+                  End->Type != pkgCache::Dep::DpkgBreaks)
                  continue;
            
            // Verify the or group
@@ -869,6 +871,7 @@ bool XVcg(CommandLine &CmdL)
                     then show the relation but do not recurse */
                  if (Hit == false && 
                      (D->Type == pkgCache::Dep::Conflicts ||
+                      D->Type == pkgCache::Dep::DpkgBreaks ||
                       D->Type == pkgCache::Dep::Obsoletes))
                  {
                     if (Show[D.TargetPkg()->ID] == None && 
@@ -890,6 +893,9 @@ bool XVcg(CommandLine &CmdL)
                  case pkgCache::Dep::Conflicts:
                    printf("label: \"conflicts\" color: lightgreen }\n");
                    break;
+                 case pkgCache::Dep::DpkgBreaks:
+                   printf("label: \"breaks\" color: lightgreen }\n");
+                   break;
                  case pkgCache::Dep::Obsoletes:
                    printf("label: \"obsoletes\" color: lightgreen }\n");
                    break;
@@ -1229,7 +1235,7 @@ bool DisplayRecord(pkgCache::VerIterator V)
    const unsigned char *DescP = (unsigned char*)strstr((char*)Buffer, "Description:");
 
    // Write all but Description
-   if (fwrite(Buffer,1,DescP - Buffer-1,stdout) < (size_t)(DescP - Buffer-1))
+   if (fwrite(Buffer,1,DescP - Buffer,stdout) < (size_t)(DescP - Buffer))
    {
       delete [] Buffer;
       return false;
@@ -1237,13 +1243,7 @@ bool DisplayRecord(pkgCache::VerIterator V)
 
    // Show the right description
    pkgRecords Recs(*GCache);
-   pkgCache::DescIterator DescDefault = V.DescriptionList();
-   pkgCache::DescIterator Desc = DescDefault;
-   for (; Desc.end() == false; Desc++)
-      if (pkgIndexFile::LanguageCode() == Desc.LanguageCode())
-        break;
-   if (Desc.end() == true) Desc = DescDefault;
-
+   pkgCache::DescIterator Desc = V.TranslatedDescription();
    pkgRecords::Parser &P = Recs.Lookup(Desc.FileList());
    cout << "Description" << ( (strcmp(Desc.LanguageCode(),"") != 0) ? "-" : "" ) << Desc.LanguageCode() << ": " << P.LongDesc();
 
@@ -1636,10 +1636,11 @@ bool Madison(CommandLine &CmdL)
 
    pkgCache &Cache = *GCache;
 
-   // Create the text record parsers
+   // Create the src text record parsers and ignore errors about missing
+   // deb-src lines that are generated from pkgSrcRecords::pkgSrcRecords
    pkgSrcRecords SrcRecs(*SrcList);
    if (_error->PendingError() == true)
-      return false;
+      _error->Discard();
 
    for (const char **I = CmdL.FileList + 1; *I != 0; I++)
    {