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

« back to all changes in this revision

Viewing changes to apt-pkg/indexcopy.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:
134
134
      TargetF += URItoFileName(S);
135
135
      if (_config->FindB("APT::CDROM::NoAct",false) == true)
136
136
         TargetF = "/dev/null";
137
 
      FileFd Target(TargetF,FileFd::WriteEmpty);
 
137
      FileFd Target(TargetF,FileFd::WriteAtomic);
138
138
      FILE *TargetFl = fdopen(dup(Target.Fd()),"w");
139
139
      if (_error->PendingError() == true)
140
140
         return false;
565
565
 
566
566
      FileFd Target;
567
567
      FileFd Rel;
568
 
      Target.Open(TargetF,FileFd::WriteEmpty);
 
568
      Target.Open(TargetF,FileFd::WriteAtomic);
569
569
      Rel.Open(prefix + file,FileFd::ReadOnly);
570
570
      if (_error->PendingError() == true)
571
571
         return false;
840
840
      TargetF += URItoFileName(S);
841
841
      if (_config->FindB("APT::CDROM::NoAct",false) == true)
842
842
         TargetF = "/dev/null";
843
 
      FileFd Target(TargetF,FileFd::WriteEmpty);
 
843
      FileFd Target(TargetF,FileFd::WriteAtomic);
844
844
      FILE *TargetFl = fdopen(dup(Target.Fd()),"w");
845
845
      if (_error->PendingError() == true)
846
846
         return false;