~ubuntu-core-dev/apt/oneiric

« back to all changes in this revision

Viewing changes to apt-pkg/indexcopy.cc

  • Committer: Michael Vogt
  • Date: 2011-08-15 12:14:35 UTC
  • mfrom: (1327.97.57 debian-sid)
  • Revision ID: michael.vogt@ubuntu.com-20110815121435-ya00o0nicb1kiz2y
merged from the debian-sid branch

Show diffs side-by-side

added added

removed removed

Lines of Context:
43
43
                             pkgCdromStatus *log)
44
44
{
45
45
   OpProgress *Progress = NULL;
46
 
   if (List.size() == 0)
 
46
   if (List.empty() == true)
47
47
      return true;
48
48
   
49
49
   if(log) 
54
54
   
55
55
   // Prepare the progress indicator
56
56
   unsigned long TotalSize = 0;
57
 
   for (vector<string>::iterator I = List.begin(); I != List.end(); I++)
 
57
   for (vector<string>::iterator I = List.begin(); I != List.end(); ++I)
58
58
   {
59
59
      struct stat Buf;
60
60
      if (stat(string(*I + GetFileName()).c_str(),&Buf) != 0 &&
68
68
   unsigned int NotFound = 0;
69
69
   unsigned int WrongSize = 0;
70
70
   unsigned int Packages = 0;
71
 
   for (vector<string>::iterator I = List.begin(); I != List.end(); I++)
 
71
   for (vector<string>::iterator I = List.begin(); I != List.end(); ++I)
72
72
   {      
73
73
      string OrigPath = string(*I,CDROM.length());
74
74
      unsigned long FileSize = 0;
583
583
bool SigVerify::CopyAndVerify(string CDROM,string Name,vector<string> &SigList, /*{{{*/
584
584
                              vector<string> PkgList,vector<string> SrcList)
585
585
{
586
 
   if (SigList.size() == 0)
 
586
   if (SigList.empty() == true)
587
587
      return true;
588
588
 
589
589
   bool Debug = _config->FindB("Debug::aptcdrom",false);
590
590
 
591
591
   // Read all Release files
592
 
   for (vector<string>::iterator I = SigList.begin(); I != SigList.end(); I++)
 
592
   for (vector<string>::iterator I = SigList.begin(); I != SigList.end(); ++I)
593
593
   { 
594
594
      if(Debug)
595
595
         cout << "Signature verify for: " << *I << endl;
633
633
      // go over the Indexfiles and see if they verify
634
634
      // if so, remove them from our copy of the lists
635
635
      vector<string> keys = MetaIndex->MetaKeys();
636
 
      for (vector<string>::iterator I = keys.begin(); I != keys.end(); I++)
 
636
      for (vector<string>::iterator I = keys.begin(); I != keys.end(); ++I)
637
637
      { 
638
638
         if(!Verify(prefix,*I, MetaIndex)) {
639
639
            // something went wrong, don't copy the Release.gpg
776
776
                                vector<string> &List, pkgCdromStatus *log)
777
777
{
778
778
   OpProgress *Progress = NULL;
779
 
   if (List.size() == 0)
 
779
   if (List.empty() == true)
780
780
      return true;
781
781
   
782
782
   if(log) 
786
786
   
787
787
   // Prepare the progress indicator
788
788
   unsigned long TotalSize = 0;
789
 
   for (vector<string>::iterator I = List.begin(); I != List.end(); I++)
 
789
   for (vector<string>::iterator I = List.begin(); I != List.end(); ++I)
790
790
   {
791
791
      struct stat Buf;
792
792
      if (stat(string(*I).c_str(),&Buf) != 0 &&
800
800
   unsigned int NotFound = 0;
801
801
   unsigned int WrongSize = 0;
802
802
   unsigned int Packages = 0;
803
 
   for (vector<string>::iterator I = List.begin(); I != List.end(); I++)
 
803
   for (vector<string>::iterator I = List.begin(); I != List.end(); ++I)
804
804
   {      
805
805
      string OrigPath = string(*I,CDROM.length());
806
806
      unsigned long FileSize = 0;
885
885
      this->Section = &Section;
886
886
      string Prefix;
887
887
      unsigned long Hits = 0;
888
 
      unsigned long Chop = 0;
889
888
      while (Parser.Step(Section) == true)
890
889
      {
891
890
         if(Progress)
903
902
      fclose(TargetFl);
904
903
 
905
904
      if (Debug == true)
906
 
         cout << " Processed by using Prefix '" << Prefix << "' and chop " << Chop << endl;
 
905
         cout << " Processed by using Prefix '" << Prefix << "' and chop " << endl;
907
906
         
908
907
      if (_config->FindB("APT::CDROM::NoAct",false) == false)
909
908
      {