Просмотр исходного кода

* apt-pkg/depcache.cc:
- close the outfile properly (thanks to kamion)
* cmdline/apt-get.cc:
- unbreak dselect-upgrade by adding a ActionGroup around it

Michael Vogt лет назад: 20
Родитель
Сommit
a4decc40b3
2 измененных файлов с 3 добавлено и 0 удалено
  1. 1 0
      apt-pkg/depcache.cc
  2. 2 0
      cmdline/apt-get.cc

+ 1 - 0
apt-pkg/depcache.cc

@@ -251,6 +251,7 @@ bool pkgDepCache::writeStateFile(OpProgress *prog)
 	 fprintf(OutFile,"\n");
 	 fprintf(OutFile,"\n");
       }
       }
    }
    }
+   fclose(OutFile);
 
 
    // move the outfile over the real file
    // move the outfile over the real file
    rename(outfile.c_str(), state.c_str());
    rename(outfile.c_str(), state.c_str());

+ 2 - 0
cmdline/apt-get.cc

@@ -1771,6 +1771,8 @@ bool DoDSelectUpgrade(CommandLine &CmdL)
    if (Cache.OpenForInstall() == false || Cache.CheckDeps() == false)
    if (Cache.OpenForInstall() == false || Cache.CheckDeps() == false)
       return false;
       return false;
    
    
+   pkgDepCache::ActionGroup group(Cache);
+
    // Install everything with the install flag set
    // Install everything with the install flag set
    pkgCache::PkgIterator I = Cache->PkgBegin();
    pkgCache::PkgIterator I = Cache->PkgBegin();
    for (;I.end() != true; I++)
    for (;I.end() != true; I++)