~ubuntu-branches/ubuntu/oneiric/apt/oneiric-updates

« back to all changes in this revision

Viewing changes to apt-pkg/pkgcachegen.cc

  • Committer: Bazaar Package Importer
  • Author(s): Michael Vogt, Julian Andres Klode, Michael Vogt
  • Date: 2010-08-11 12:01:30 UTC
  • Revision ID: james.westby@ubuntu.com-20100811120130-b03fjhapn7b1kc82
Tags: 0.7.26~exp12ubuntu4
[ Julian Andres Klode ]
* apt-pkg/contrib/fileutl.cc:
  - Add WriteAtomic mode.
  - Revert WriteEmpty to old behavior (LP: #613211)
* apt-pkg, methods:
  - Convert users of WriteEmpty to WriteAtomic.
* apt-pkg/depcache.cc:
  - Only try upgrade for Breaks if there is a newer version, otherwise
    handle it as Conflicts (by removing it) (helps for #591882).

[ Michael Vogt ]
* debian/control:
  - Add recommends on gnupg to apt, apt-key uses it.
    (changed from debian)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1192
1192
   if (Writeable == true && CacheFile.empty() == false)
1193
1193
   {
1194
1194
      unlink(CacheFile.c_str());
1195
 
      CacheF = new FileFd(CacheFile,FileFd::WriteEmpty);
 
1195
      CacheF = new FileFd(CacheFile,FileFd::WriteAtomic);
1196
1196
      fchmod(CacheF->Fd(),0644);
1197
1197
      Map = CreateDynamicMMap(CacheF, MMap::Public);
1198
1198
      if (_error->PendingError() == true)
1254
1254
      // Write it back
1255
1255
      if (Writeable == true && SrcCacheFile.empty() == false)
1256
1256
      {
1257
 
         FileFd SCacheF(SrcCacheFile,FileFd::WriteEmpty);
 
1257
         FileFd SCacheF(SrcCacheFile,FileFd::WriteAtomic);
1258
1258
         if (_error->PendingError() == true)
1259
1259
            return false;
1260
1260