Procházet zdrojové kódy

* cmdline/apt-get.cc: fix bug in FindSrc() (debian #335213)

Michael Vogt před 21 roky
rodič
revize
d5f3810269
2 změnil soubory, kde provedl 3 přidání a 5 odebrání
  1. 1 5
      cmdline/apt-get.cc
  2. 2 0
      debian/changelog

+ 1 - 5
cmdline/apt-get.cc

@@ -1200,7 +1200,7 @@ pkgSrcRecords::Parser *FindSrc(const char *Name,pkgRecords &Recs,
       VerTag = string(TmpSrc.begin() + Slash + 1,TmpSrc.end());
       VerTag = string(TmpSrc.begin() + Slash + 1,TmpSrc.end());
       TmpSrc = string(TmpSrc.begin(),TmpSrc.begin() + Slash);
       TmpSrc = string(TmpSrc.begin(),TmpSrc.begin() + Slash);
    } 
    } 
-   else  if(DefRel.empty() == false)
+   else  if(!Pkg.end() && DefRel.empty() == false)
    {
    {
       // we have a default release, try to locate the pkg. we do it like
       // we have a default release, try to locate the pkg. we do it like
       // this because GetCandidateVer() will not "downgrade", that means
       // this because GetCandidateVer() will not "downgrade", that means
@@ -1211,10 +1211,6 @@ pkgSrcRecords::Parser *FindSrc(const char *Name,pkgRecords &Recs,
 	 for (pkgCache::VerFileIterator VF = Ver.FileList(); VF.end() == false;
 	 for (pkgCache::VerFileIterator VF = Ver.FileList(); VF.end() == false;
 	      VF++)
 	      VF++)
 	 {
 	 {
-	    // extra paranioa
-	    if(VF.File() == NULL)
-	       continue;
-
 	    /* If this is the status file, and the current version is not the
 	    /* If this is the status file, and the current version is not the
 	       version in the status file (ie it is not installed, or somesuch)
 	       version in the status file (ie it is not installed, or somesuch)
 	       then it is not a candidate for installation, ever. This weeds
 	       then it is not a candidate for installation, ever. This weeds

+ 2 - 0
debian/changelog

@@ -2,6 +2,8 @@ apt (0.6.42.2) unstable; urgency=low
 
 
   * Merge bubulle@debian.org--2005/apt--main--0 up to patch-118:
   * Merge bubulle@debian.org--2005/apt--main--0 up to patch-118:
     - patch-118: Russian translation update by Yuri Kozlov (closes: #335164)
     - patch-118: Russian translation update by Yuri Kozlov (closes: #335164)
+  * cmdline/apt-get.cc:
+    - bufix in FindSrc  (closes: #335213)
    
    
  --
  --