]> git.saurik.com Git - apt.git/blobdiff - ftparchive/writer.cc
* apt-pkg/depcache.cc:
[apt.git] / ftparchive / writer.cc
index 0b68d0bbf74569ea0ae780e53ea9fe5f88d6064a..fc9ea27d7e52af22d10f5a8d8b46e6c21edead2e 100644 (file)
@@ -581,8 +581,6 @@ bool SourcesWriter::DoPackage(string FileName)
         auto_ptr<Override::Item> Itm(BOver.GetItem(BinList[I]));
         if (Itm.get() == 0)
            continue;
-        if (OverItem.get() == 0)
-           OverItem = Itm;
 
         unsigned char NewPrioV = debListParser::GetPrio(Itm->Priority);
         if (NewPrioV < BestPrioV || BestPrio.empty() == true)
@@ -590,6 +588,9 @@ bool SourcesWriter::DoPackage(string FileName)
            BestPrioV = NewPrioV;
            BestPrio = Itm->Priority;
         }       
+
+        if (OverItem.get() == 0)
+           OverItem = Itm;
       }
    }