diff options
author | Ishan Jayawardena <udeshike@gmail.com> | 2011-07-16 14:08:08 +0530 |
---|---|---|
committer | Ishan Jayawardena <udeshike@gmail.com> | 2011-07-16 14:08:08 +0530 |
commit | 3efe86af099d5a5d05e2e61a571da864676834c7 (patch) | |
tree | 9e49cf64bcec05922a60d28fdf162bf5312e5d9e | |
parent | d981326d00730fb1af2ba5428d9d7557d9b05f9a (diff) | |
download | apt-3efe86af099d5a5d05e2e61a571da864676834c7.tar.gz |
fixed some indentation issues
-rw-r--r-- | apt-pkg/acquire-item.cc | 196 | ||||
-rw-r--r-- | apt-pkg/acquire-worker.cc | 24 | ||||
-rw-r--r-- | apt-pkg/acquire.cc | 12 | ||||
-rw-r--r-- | apt-pkg/algorithms.cc | 12 | ||||
-rw-r--r-- | apt-pkg/cachefile.cc | 44 | ||||
-rw-r--r-- | apt-pkg/contrib/fileutl.cc | 2 | ||||
-rw-r--r-- | apt-pkg/contrib/strutl.cc | 6 | ||||
-rw-r--r-- | apt-pkg/deb/debmetaindex.cc | 2 | ||||
-rw-r--r-- | apt-pkg/init.cc | 2 | ||||
-rw-r--r-- | apt-pkg/sourcelist.cc | 9 | ||||
-rwxr-xr-x | buildproject | 4 |
11 files changed, 141 insertions, 172 deletions
diff --git a/apt-pkg/acquire-item.cc b/apt-pkg/acquire-item.cc index 0224a73fe..2e36e1f2c 100644 --- a/apt-pkg/acquire-item.cc +++ b/apt-pkg/acquire-item.cc @@ -11,7 +11,7 @@ to fetch the other index files because of this. ##################################################################### */ -/*}}}*/ + /*}}}*/ // Include Files /*{{{*/ #include <apt-pkg/acquire-item.h> #include <apt-pkg/configuration.h> @@ -33,7 +33,7 @@ #include <sstream> #include <stdio.h> #include <ctime> -/*}}}*/ + /*}}}*/ using namespace std; @@ -41,13 +41,13 @@ using namespace std; // --------------------------------------------------------------------- /* */ pkgAcquire::Item::Item(pkgAcquire *Owner) : Owner(Owner), FileSize(0), - PartialSize(0), Mode(0), ID(0), Complete(false), - Local(false), QueueCounter(0) + PartialSize(0), Mode(0), ID(0), Complete(false), + Local(false), QueueCounter(0) { Owner->Add(this); Status = StatIdle; } -/*}}}*/ + /*}}}*/ // Acquire::Item::~Item - Destructor /*{{{*/ // --------------------------------------------------------------------- /* */ @@ -55,7 +55,7 @@ pkgAcquire::Item::~Item() { Owner->Remove(this); } -/*}}}*/ + /*}}}*/ // Acquire::Item::Failed - Item failed to download /*{{{*/ // --------------------------------------------------------------------- /* We return to an idle state if there are still other queues that could @@ -89,7 +89,7 @@ void pkgAcquire::Item::Failed(string Message,pkgAcquire::MethodConfig *Cnf) else ReportMirrorFailure(ErrorText); } -/*}}}*/ + /*}}}*/ // Acquire::Item::Start - Item has begun to download /*{{{*/ // --------------------------------------------------------------------- /* Stash status and the file size. Note that setting Complete means @@ -100,7 +100,7 @@ void pkgAcquire::Item::Start(string /*Message*/,unsigned long Size) if (FileSize == 0 && Complete == false) FileSize = Size; } -/*}}}*/ + /*}}}*/ // Acquire::Item::Done - Item downloaded OK /*{{{*/ // --------------------------------------------------------------------- /* */ @@ -122,7 +122,7 @@ void pkgAcquire::Item::Done(string Message,unsigned long Size,string Hash, ErrorText = string(); Owner->Dequeue(this); } -/*}}}*/ + /*}}}*/ // Acquire::Item::Rename - Rename a file /*{{{*/ // --------------------------------------------------------------------- /* This helper function is used by alot of item methods as thier final @@ -133,12 +133,12 @@ void pkgAcquire::Item::Rename(string From,string To) { char S[300]; snprintf(S,sizeof(S),_("rename failed, %s (%s -> %s)."),strerror(errno), - From.c_str(),To.c_str()); + From.c_str(),To.c_str()); Status = StatError; ErrorText = S; } } -/*}}}*/ + /*}}}*/ // Acquire::Item::ReportMirrorFailure /*{{{*/ // --------------------------------------------------------------------- void pkgAcquire::Item::ReportMirrorFailure(string FailCode) @@ -182,15 +182,15 @@ void pkgAcquire::Item::ReportMirrorFailure(string FailCode) _config->Find("Methods::Mirror::ProblemReporting").c_str()); } } -/*}}}*/ + /*}}}*/ // AcqSubIndex::AcqSubIndex - Constructor /*{{{*/ // --------------------------------------------------------------------- /* Get the Index file first and see if there are languages available * If so, create a pkgAcqIndexTrans for the found language(s). */ pkgAcqSubIndex::pkgAcqSubIndex(pkgAcquire *Owner, string const &URI, - string const &URIDesc, string const &ShortDesc, - HashString const &ExpectedHash) + string const &URIDesc, string const &ShortDesc, + HashString const &ExpectedHash) : Item(Owner), ExpectedHash(ExpectedHash) { Debug = _config->FindB("Debug::pkgAcquire::SubIndex",false); @@ -208,7 +208,7 @@ pkgAcqSubIndex::pkgAcqSubIndex(pkgAcquire *Owner, string const &URI, if(Debug) std::clog << "pkgAcqSubIndex: " << Desc.URI << std::endl; } -/*}}}*/ + /*}}}*/ // AcqSubIndex::Custom600Headers - Insert custom request headers /*{{{*/ // --------------------------------------------------------------------- /* The only header we use is the last-modified header. */ @@ -222,7 +222,7 @@ string pkgAcqSubIndex::Custom600Headers() return "\nIndex-File: true\nFail-Ignore: true\n"; return "\nIndex-File: true\nFail-Ignore: true\nLast-Modified: " + TimeRFC1123(Buf.st_mtime); } -/*}}}*/ + /*}}}*/ void pkgAcqSubIndex::Failed(string Message,pkgAcquire::MethodConfig *Cnf) /*{{{*/ { if(Debug) @@ -240,13 +240,13 @@ void pkgAcqSubIndex::Failed(string Message,pkgAcquire::MethodConfig *Cnf) /*{{{* if (*l == "none") continue; string const file = "Translation-" + *l; new pkgAcqIndexTrans(Owner, Desc.URI.substr(0, Desc.URI.rfind('/')+1).append(file), - Desc.Description.erase(Desc.Description.rfind(' ')+1).append(file), - file); + Desc.Description.erase(Desc.Description.rfind(' ')+1).append(file), + file); } } -/*}}}*/ + /*}}}*/ void pkgAcqSubIndex::Done(string Message,unsigned long Size,string Md5Hash, /*{{{*/ - pkgAcquire::MethodConfig *Cnf) + pkgAcquire::MethodConfig *Cnf) { if(Debug) std::clog << "pkgAcqSubIndex::Done(): " << Desc.URI << std::endl; @@ -287,7 +287,7 @@ void pkgAcqSubIndex::Done(string Message,unsigned long Size,string Md5Hash, /*{{ Dequeue(); return; } -/*}}}*/ + /*}}}*/ bool pkgAcqSubIndex::ParseIndex(string const &IndexFile) /*{{{*/ { indexRecords SubIndexParser; @@ -327,7 +327,7 @@ bool pkgAcqSubIndex::ParseIndex(string const &IndexFile) /*{{{*/ } return true; } -/*}}}*/ + /*}}}*/ // AcqDiffIndex::AcqDiffIndex - Constructor /*{{{*/ // --------------------------------------------------------------------- /* Get the DiffIndex file first and see if there are patches availabe @@ -379,7 +379,7 @@ pkgAcqDiffIndex::pkgAcqDiffIndex(pkgAcquire *Owner, QueueURI(Desc); } -/*}}}*/ + /*}}}*/ // AcqIndex::Custom600Headers - Insert custom request headers /*{{{*/ // --------------------------------------------------------------------- /* The only header we use is the last-modified header. */ @@ -397,7 +397,7 @@ string pkgAcqDiffIndex::Custom600Headers() return "\nIndex-File: true\nLast-Modified: " + TimeRFC1123(Buf.st_mtime); } -/*}}}*/ + /*}}}*/ bool pkgAcqDiffIndex::ParseDiffIndex(string IndexDiffFile) /*{{{*/ { if(Debug) @@ -454,6 +454,7 @@ bool pkgAcqDiffIndex::ParseDiffIndex(string IndexDiffFile) /*{{{*/ found=true; else if (found == false) continue; + if(Debug) std::clog << "Need to get diff: " << d.file << std::endl; available_patches.push_back(d); @@ -467,7 +468,7 @@ bool pkgAcqDiffIndex::ParseDiffIndex(string IndexDiffFile) /*{{{*/ { if (Debug) std::clog << "Need " << available_patches.size() << " diffs (Limit is " << fileLimit - << ") so fallback to complete download" << std::endl; + << ") so fallback to complete download" << std::endl; return false; } @@ -491,7 +492,7 @@ bool pkgAcqDiffIndex::ParseDiffIndex(string IndexDiffFile) /*{{{*/ { if (Debug) std::clog << "Need " << patchesSize << " bytes (Limit is " << sizeLimit/100 - << ") so fallback to complete download" << std::endl; + << ") so fallback to complete download" << std::endl; return false; } } @@ -520,7 +521,7 @@ bool pkgAcqDiffIndex::ParseDiffIndex(string IndexDiffFile) /*{{{*/ std::clog << "Can't find a patch in the index file" << std::endl; return false; } -/*}}}*/ + /*}}}*/ void pkgAcqDiffIndex::Failed(string Message,pkgAcquire::MethodConfig *Cnf) /*{{{*/ { if(Debug) @@ -534,7 +535,7 @@ void pkgAcqDiffIndex::Failed(string Message,pkgAcquire::MethodConfig *Cnf) /*{{{ Status = StatDone; Dequeue(); } -/*}}}*/ + /*}}}*/ void pkgAcqDiffIndex::Done(string Message,unsigned long Size,string Md5Hash, /*{{{*/ pkgAcquire::MethodConfig *Cnf) { @@ -564,7 +565,7 @@ void pkgAcqDiffIndex::Done(string Message,unsigned long Size,string Md5Hash, /*{ Dequeue(); return; } -/*}}}*/ + /*}}}*/ // AcqIndexDiffs::AcqIndexDiffs - Constructor /*{{{*/ // --------------------------------------------------------------------- /* The package diff is added to the queue. one object is constructed @@ -599,7 +600,7 @@ pkgAcqIndexDiffs::pkgAcqIndexDiffs(pkgAcquire *Owner, QueueNextDiff(); } } -/*}}}*/ + /*}}}*/ void pkgAcqIndexDiffs::Failed(string Message,pkgAcquire::MethodConfig *Cnf) /*{{{*/ { if(Debug) @@ -609,7 +610,7 @@ void pkgAcqIndexDiffs::Failed(string Message,pkgAcquire::MethodConfig *Cnf) /*{{ ExpectedHash); Finish(); } -/*}}}*/ + /*}}}*/ // Finish - helper that cleans the item out of the fetcher queue /*{{{*/ void pkgAcqIndexDiffs::Finish(bool allDone) { @@ -645,7 +646,7 @@ void pkgAcqIndexDiffs::Finish(bool allDone) Dequeue(); return; } -/*}}}*/ + /*}}}*/ bool pkgAcqIndexDiffs::QueueNextDiff() /*{{{*/ { @@ -694,11 +695,12 @@ bool pkgAcqIndexDiffs::QueueNextDiff() /*{{{*/ if(Debug) std::clog << "pkgAcqIndexDiffs::QueueNextDiff(): " << Desc.URI << std::endl; + QueueURI(Desc); return true; } -/*}}}*/ + /*}}}*/ void pkgAcqIndexDiffs::Done(string Message,unsigned long Size,string Md5Hash, /*{{{*/ pkgAcquire::MethodConfig *Cnf) { @@ -709,7 +711,7 @@ void pkgAcqIndexDiffs::Done(string Message,unsigned long Size,string Md5Hash, /* string FinalFile; FinalFile = _config->FindDir("Dir::State::lists")+URItoFileName(RealURI); - + // sucess in downloading a diff, enter ApplyDiff state if(State == StateFetchDiff) { @@ -751,7 +753,7 @@ void pkgAcqIndexDiffs::Done(string Message,unsigned long Size,string Md5Hash, /* return Finish(true); } } -/*}}}*/ + /*}}}*/ // AcqIndex::AcqIndex - Constructor /*{{{*/ // --------------------------------------------------------------------- /* The package file is added to the queue and a second class is @@ -797,7 +799,7 @@ pkgAcqIndex::pkgAcqIndex(pkgAcquire *Owner, IndexTarget const *Target, Init(Target->URI, Target->Description, Target->ShortDesc); } -/*}}}*/ + /*}}}*/ // AcqIndex::Init - defered Constructor /*{{{*/ void pkgAcqIndex::Init(string const &URI, string const &URIDesc, string const &ShortDesc) { Decompression = false; @@ -818,7 +820,7 @@ void pkgAcqIndex::Init(string const &URI, string const &URIDesc, string const &S QueueURI(Desc); } -/*}}}*/ + /*}}}*/ // AcqIndex::Custom600Headers - Insert custom request headers /*{{{*/ // --------------------------------------------------------------------- /* The only header we use is the last-modified header. */ @@ -840,7 +842,7 @@ string pkgAcqIndex::Custom600Headers() return msg; } -/*}}}*/ + /*}}}*/ void pkgAcqIndex::Failed(string Message,pkgAcquire::MethodConfig *Cnf) /*{{{*/ { size_t const nextExt = CompressionExtension.find(' '); @@ -860,7 +862,7 @@ void pkgAcqIndex::Failed(string Message,pkgAcquire::MethodConfig *Cnf) /*{{{*/ Item::Failed(Message,Cnf); } -/*}}}*/ + /*}}}*/ // AcqIndex::Done - Finished a fetch /*{{{*/ // --------------------------------------------------------------------- /* This goes through a number of states.. On the initial fetch the @@ -936,11 +938,11 @@ void pkgAcqIndex::Done(string Message,unsigned long Size,string Hash, // The files timestamp matches if (StringToBool(LookupTag(Message,"IMS-Hit"),false) == true) { - if (_config->FindB("Acquire::GzipIndexes",false) && compExt == "gz") - // Update DestFile for .gz suffix so that the clean operation keeps it - DestFile += ".gz"; + if (_config->FindB("Acquire::GzipIndexes",false) && compExt == "gz") + // Update DestFile for .gz suffix so that the clean operation keeps it + DestFile += ".gz"; return; - } + } if (FileName == DestFile) Erase = true; @@ -960,7 +962,7 @@ void pkgAcqIndex::Done(string Message,unsigned long Size,string Hash, DestFile = _config->FindDir("Dir::State::lists") + "partial/"; DestFile += URItoFileName(RealURI) + ".gz"; return; - } + } // get the binary name for your used compression type decompProg = _config->Find(string("Acquire::CompressionTypes::").append(compExt),""); @@ -978,21 +980,21 @@ void pkgAcqIndex::Done(string Message,unsigned long Size,string Hash, QueueURI(Desc); Mode = decompProg.c_str(); } -/*}}}*/ + /*}}}*/ // AcqIndexTrans::pkgAcqIndexTrans - Constructor /*{{{*/ // --------------------------------------------------------------------- /* The Translation file is added to the queue */ pkgAcqIndexTrans::pkgAcqIndexTrans(pkgAcquire *Owner, - string URI,string URIDesc,string ShortDesc) - : pkgAcqIndex(Owner, URI, URIDesc, ShortDesc, HashString(), "") + string URI,string URIDesc,string ShortDesc) + : pkgAcqIndex(Owner, URI, URIDesc, ShortDesc, HashString(), "") { } pkgAcqIndexTrans::pkgAcqIndexTrans(pkgAcquire *Owner, IndexTarget const *Target, - HashString const &ExpectedHash, indexRecords const *MetaIndexParser) - : pkgAcqIndex(Owner, Target, ExpectedHash, MetaIndexParser) + HashString const &ExpectedHash, indexRecords const *MetaIndexParser) + : pkgAcqIndex(Owner, Target, ExpectedHash, MetaIndexParser) { } -/*}}}*/ + /*}}}*/ // AcqIndexTrans::Custom600Headers - Insert custom request headers /*{{{*/ // --------------------------------------------------------------------- string pkgAcqIndexTrans::Custom600Headers() @@ -1005,7 +1007,7 @@ string pkgAcqIndexTrans::Custom600Headers() return "\nFail-Ignore: true\nIndex-File: true"; return "\nFail-Ignore: true\nIndex-File: true\nLast-Modified: " + TimeRFC1123(Buf.st_mtime); } -/*}}}*/ + /*}}}*/ // AcqIndexTrans::Failed - Silence failure messages for missing files /*{{{*/ // --------------------------------------------------------------------- /* */ @@ -1032,7 +1034,7 @@ void pkgAcqIndexTrans::Failed(string Message,pkgAcquire::MethodConfig *Cnf) Item::Failed(Message,Cnf); } -/*}}}*/ + /*}}}*/ pkgAcqMetaSig::pkgAcqMetaSig(pkgAcquire *Owner, /*{{{*/ string URI,string URIDesc,string ShortDesc, string MetaIndexURI, string MetaIndexURIDesc, @@ -1073,7 +1075,7 @@ pkgAcqMetaSig::pkgAcqMetaSig(pkgAcquire *Owner, /*{{{*/ QueueURI(Desc); } -/*}}}*/ + /*}}}*/ // pkgAcqMetaSig::Custom600Headers - Insert custom request headers /*{{{*/ // --------------------------------------------------------------------- /* The only header we use is the last-modified header. */ @@ -1122,7 +1124,7 @@ void pkgAcqMetaSig::Done(string Message,unsigned long Size,string MD5, MetaIndexParser); } -/*}}}*/ + /*}}}*/ void pkgAcqMetaSig::Failed(string Message,pkgAcquire::MethodConfig *Cnf)/*{{{*/ { string Final = _config->FindDir("Dir::State::lists") + URItoFileName(RealURI); @@ -1159,7 +1161,7 @@ void pkgAcqMetaSig::Failed(string Message,pkgAcquire::MethodConfig *Cnf)/*{{{*/ Item::Failed(Message,Cnf); } -/*}}}*/ + /*}}}*/ pkgAcqMetaIndex::pkgAcqMetaIndex(pkgAcquire *Owner, /*{{{*/ string URI,string URIDesc,string ShortDesc, string SigFile, @@ -1179,7 +1181,7 @@ pkgAcqMetaIndex::pkgAcqMetaIndex(pkgAcquire *Owner, /*{{{*/ QueueURI(Desc); } -/*}}}*/ + /*}}}*/ // pkgAcqMetaIndex::Custom600Headers - Insert custom request headers /*{{{*/ // --------------------------------------------------------------------- /* The only header we use is the last-modified header. */ @@ -1194,7 +1196,7 @@ string pkgAcqMetaIndex::Custom600Headers() return "\nIndex-File: true\nLast-Modified: " + TimeRFC1123(Buf.st_mtime); } -/*}}}*/ + /*}}}*/ void pkgAcqMetaIndex::Done(string Message,unsigned long Size,string Hash, /*{{{*/ pkgAcquire::MethodConfig *Cfg) { @@ -1251,7 +1253,7 @@ void pkgAcqMetaIndex::Done(string Message,unsigned long Size,string Hash, /*{{{* DestFile = FinalFile; } } -/*}}}*/ + /*}}}*/ void pkgAcqMetaIndex::RetrievalDone(string Message) /*{{{*/ { // We have just finished downloading a Release file (it is not @@ -1285,7 +1287,7 @@ void pkgAcqMetaIndex::RetrievalDone(string Message) /*{{{*/ } Complete = true; } -/*}}}*/ + /*}}}*/ void pkgAcqMetaIndex::AuthDone(string Message) /*{{{*/ { // At this point, the gpgv method has succeeded, so there is a @@ -1322,7 +1324,7 @@ void pkgAcqMetaIndex::AuthDone(string Message) /*{{{*/ Rename(SigFile,VerifiedSigFile); chmod(VerifiedSigFile.c_str(),0644); } -/*}}}*/ + /*}}}*/ void pkgAcqMetaIndex::QueueIndexes(bool verify) /*{{{*/ { for (vector <struct IndexTarget*>::const_iterator Target = IndexTargets->begin(); @@ -1363,7 +1365,7 @@ void pkgAcqMetaIndex::QueueIndexes(bool verify) /*{{{*/ { if ((*Target)->IsSubIndex() == true) new pkgAcqSubIndex(Owner, (*Target)->URI, (*Target)->Description, - (*Target)->ShortDesc, ExpectedIndexHash); + (*Target)->ShortDesc, ExpectedIndexHash); else new pkgAcqIndexTrans(Owner, *Target, ExpectedIndexHash, MetaIndexParser); continue; @@ -1374,14 +1376,14 @@ void pkgAcqMetaIndex::QueueIndexes(bool verify) /*{{{*/ in the Meta-Index file. Ideal would be if pkgAcqDiffIndex would test this instead, but passing the required info to it is to much hassle */ if(_config->FindB("Acquire::PDiffs",true) == true && (verify == false || - MetaIndexParser->Exists(string((*Target)->MetaKey).append(".diff/Index")) == true)) + MetaIndexParser->Exists(string((*Target)->MetaKey).append(".diff/Index")) == true)) new pkgAcqDiffIndex(Owner, (*Target)->URI, (*Target)->Description, (*Target)->ShortDesc, ExpectedIndexHash); else new pkgAcqIndex(Owner, *Target, ExpectedIndexHash, MetaIndexParser); } } -/*}}}*/ + /*}}}*/ bool pkgAcqMetaIndex::VerifyVendor(string Message) /*{{{*/ { string::size_type pos; @@ -1456,7 +1458,7 @@ bool pkgAcqMetaIndex::VerifyVendor(string Message) /*{{{*/ return true; } -/*}}}*/ + /*}}}*/ // pkgAcqMetaIndex::Failed - no Release file present or no signature file present /*{{{*/ // --------------------------------------------------------------------- /* */ @@ -1476,7 +1478,7 @@ void pkgAcqMetaIndex::Failed(string Message,pkgAcquire::MethodConfig *Cnf) if (DestFile != SigFile) { string VerifiedSigFile = _config->FindDir("Dir::State::lists") + - URItoFileName(RealURI) + ".gpg"; + URItoFileName(RealURI) + ".gpg"; Rename(LastGoodSigFile,VerifiedSigFile); } Status = StatTransientNetworkError; @@ -1506,7 +1508,7 @@ void pkgAcqMetaIndex::Failed(string Message,pkgAcquire::MethodConfig *Cnf) * they would be considered as trusted later on */ if (SigFile == DestFile) { RealURI = RealURI.replace(RealURI.rfind("InRelease"), 9, - "Release"); + "Release"); FinalFile = FinalFile.replace(FinalFile.rfind("InRelease"), 9, "Release"); SigFile = FinalFile; @@ -1521,20 +1523,20 @@ void pkgAcqMetaIndex::Failed(string Message,pkgAcquire::MethodConfig *Cnf) // back to queueing Packages files without verification QueueIndexes(false); } -/*}}}*/ + /*}}}*/ pkgAcqMetaClearSig::pkgAcqMetaClearSig(pkgAcquire *Owner, /*{{{*/ - string const &URI, string const &URIDesc, string const &ShortDesc, - string const &MetaIndexURI, string const &MetaIndexURIDesc, string const &MetaIndexShortDesc, - string const &MetaSigURI, string const &MetaSigURIDesc, string const &MetaSigShortDesc, - const vector<struct IndexTarget*>* IndexTargets, - indexRecords* MetaIndexParser) : - pkgAcqMetaIndex(Owner, URI, URIDesc, ShortDesc, "", IndexTargets, MetaIndexParser), - MetaIndexURI(MetaIndexURI), MetaIndexURIDesc(MetaIndexURIDesc), MetaIndexShortDesc(MetaIndexShortDesc), - MetaSigURI(MetaSigURI), MetaSigURIDesc(MetaSigURIDesc), MetaSigShortDesc(MetaSigShortDesc) + string const &URI, string const &URIDesc, string const &ShortDesc, + string const &MetaIndexURI, string const &MetaIndexURIDesc, string const &MetaIndexShortDesc, + string const &MetaSigURI, string const &MetaSigURIDesc, string const &MetaSigShortDesc, + const vector<struct IndexTarget*>* IndexTargets, + indexRecords* MetaIndexParser) : + pkgAcqMetaIndex(Owner, URI, URIDesc, ShortDesc, "", IndexTargets, MetaIndexParser), + MetaIndexURI(MetaIndexURI), MetaIndexURIDesc(MetaIndexURIDesc), MetaIndexShortDesc(MetaIndexShortDesc), + MetaSigURI(MetaSigURI), MetaSigURIDesc(MetaSigURIDesc), MetaSigShortDesc(MetaSigShortDesc) { SigFile = DestFile; } -/*}}}*/ + /*}}}*/ // pkgAcqMetaClearSig::Custom600Headers - Insert custom request headers /*{{{*/ // --------------------------------------------------------------------- // FIXME: this can go away once the InRelease file is used widely @@ -1549,7 +1551,7 @@ string pkgAcqMetaClearSig::Custom600Headers() return "\nIndex-File: true\nFail-Ignore: true\nLast-Modified: " + TimeRFC1123(Buf.st_mtime); } -/*}}}*/ + /*}}}*/ void pkgAcqMetaClearSig::Failed(string Message,pkgAcquire::MethodConfig *Cnf) /*{{{*/ { if (AuthPass == false) @@ -1565,7 +1567,7 @@ void pkgAcqMetaClearSig::Failed(string Message,pkgAcquire::MethodConfig *Cnf) /* else pkgAcqMetaIndex::Failed(Message, Cnf); } -/*}}}*/ + /*}}}*/ // AcqArchive::AcqArchive - Constructor /*{{{*/ // --------------------------------------------------------------------- /* This just sets up the initial fetch environment and queues the first @@ -1573,9 +1575,9 @@ void pkgAcqMetaClearSig::Failed(string Message,pkgAcquire::MethodConfig *Cnf) /* pkgAcqArchive::pkgAcqArchive(pkgAcquire *Owner,pkgSourceList *Sources, pkgRecords *Recs,pkgCache::VerIterator const &Version, string &StoreFilename) : - Item(Owner), Version(Version), Sources(Sources), Recs(Recs), - StoreFilename(StoreFilename), Vf(Version.FileList()), - Trusted(false) + Item(Owner), Version(Version), Sources(Sources), Recs(Recs), + StoreFilename(StoreFilename), Vf(Version.FileList()), + Trusted(false) { Retries = _config->FindI("Acquire::Retries",0); @@ -1609,9 +1611,9 @@ pkgAcqArchive::pkgAcqArchive(pkgAcquire *Owner,pkgSourceList *Sources, // Generate the final file name as: package_version_arch.foo StoreFilename = QuoteString(Version.ParentPkg().Name(),"_:") + '_' + - QuoteString(Version.VerStr(),"_:") + '_' + - QuoteString(Version.Arch(),"_:.") + - "." + flExtension(Parse.FileName()); + QuoteString(Version.VerStr(),"_:") + '_' + + QuoteString(Version.Arch(),"_:.") + + "." + flExtension(Parse.FileName()); } // check if we have one trusted source for the package. if so, switch @@ -1641,10 +1643,10 @@ pkgAcqArchive::pkgAcqArchive(pkgAcquire *Owner,pkgSourceList *Sources, // Select a source if (QueueNext() == false && _error->PendingError() == false) _error->Error(_("I wasn't able to locate a file for the %s package. " - "This might mean you need to manually fix this package."), + "This might mean you need to manually fix this package."), Version.ParentPkg().Name()); } -/*}}}*/ + /*}}}*/ // AcqArchive::QueueNext - Queue the next file source /*{{{*/ // --------------------------------------------------------------------- /* This queues the next available file version for download. It checks if @@ -1662,7 +1664,7 @@ bool pkgAcqArchive::QueueNext() // Try to cross match against the source list pkgIndexFile *Index; if (Sources->FindIndex(Vf.File(),Index) == false) - continue; + continue; // only try to get a trusted package from another source if that source // is also trusted @@ -1696,7 +1698,7 @@ bool pkgAcqArchive::QueueNext() } if (PkgFile.empty() == true) return _error->Error(_("The package index files are corrupted. No Filename: " - "field for package %s."), + "field for package %s."), Version.ParentPkg().Name()); Desc.URI = Index->ArchiveURI(PkgFile); @@ -1769,7 +1771,7 @@ bool pkgAcqArchive::QueueNext() } return false; } -/*}}}*/ + /*}}}*/ // AcqArchive::Done - Finished fetching /*{{{*/ // --------------------------------------------------------------------- /* */ @@ -1823,7 +1825,7 @@ void pkgAcqArchive::Done(string Message,unsigned long Size,string CalcHash, StoreFilename = DestFile = FinalFile; Complete = true; } -/*}}}*/ + /*}}}*/ // AcqArchive::Failed - Failure handler /*{{{*/ // --------------------------------------------------------------------- /* Here we try other sources */ @@ -1861,14 +1863,14 @@ void pkgAcqArchive::Failed(string Message,pkgAcquire::MethodConfig *Cnf) Item::Failed(Message,Cnf); } } -/*}}}*/ + /*}}}*/ // AcqArchive::IsTrusted - Determine whether this archive comes from a trusted source /*{{{*/ // --------------------------------------------------------------------- bool pkgAcqArchive::IsTrusted() { return Trusted; } -/*}}}*/ + /*}}}*/ // AcqArchive::Finished - Fetching has finished, tidy up /*{{{*/ // --------------------------------------------------------------------- /* */ @@ -1879,7 +1881,7 @@ void pkgAcqArchive::Finished() return; StoreFilename = string(); } -/*}}}*/ + /*}}}*/ // AcqFile::pkgAcqFile - Constructor /*{{{*/ // --------------------------------------------------------------------- /* The file is added to the queue */ @@ -1887,7 +1889,7 @@ pkgAcqFile::pkgAcqFile(pkgAcquire *Owner,string URI,string Hash, unsigned long Size,string Dsc,string ShortDesc, const string &DestDir, const string &DestFilename, bool IsIndexFile) : - Item(Owner), ExpectedHash(Hash), IsIndexFile(IsIndexFile) + Item(Owner), ExpectedHash(Hash), IsIndexFile(IsIndexFile) { Retries = _config->FindI("Acquire::Retries",0); @@ -1920,7 +1922,7 @@ pkgAcqFile::pkgAcqFile(pkgAcquire *Owner,string URI,string Hash, QueueURI(Desc); } -/*}}}*/ + /*}}}*/ // AcqFile::Done - Item downloaded OK /*{{{*/ // --------------------------------------------------------------------- /* */ @@ -1981,7 +1983,7 @@ void pkgAcqFile::Done(string Message,unsigned long Size,string CalcHash, } } } -/*}}}*/ + /*}}}*/ // AcqFile::Failed - Failure handler /*{{{*/ // --------------------------------------------------------------------- /* Here we try other sources */ @@ -2001,7 +2003,7 @@ void pkgAcqFile::Failed(string Message,pkgAcquire::MethodConfig *Cnf) Item::Failed(Message,Cnf); } -/*}}}*/ + /*}}}*/ // AcqIndex::Custom600Headers - Insert custom request headers /*{{{*/ // --------------------------------------------------------------------- /* The only header we use is the last-modified header. */ diff --git a/apt-pkg/acquire-worker.cc b/apt-pkg/acquire-worker.cc index e110be0a2..1a17dfa5c 100644 --- a/apt-pkg/acquire-worker.cc +++ b/apt-pkg/acquire-worker.cc @@ -123,6 +123,7 @@ bool pkgAcquire::Worker::Start() } for (int I = 0; I != 4; I++) SetCloseExec(Pipes[I],true); + // Fork off the process Process = ExecFork(); if (Process == 0) @@ -160,7 +161,7 @@ bool pkgAcquire::Worker::Start() RunMessages(); if (OwnerQ != 0) SendConfiguration(); - + return true; } /*}}}*/ @@ -171,7 +172,6 @@ bool pkgAcquire::Worker::ReadMessages() { if (::ReadMessages(InFd,MessageQueue) == false) return MethodFailure(); - //std::cerr << " MessageQueue {" << MessageQueue[0] << "}" << std::endl; return true; } /*}}}*/ @@ -216,25 +216,25 @@ bool pkgAcquire::Worker::RunMessages() { // 100 Capabilities case 100: - if (Capabilities(Message) == false) + if (Capabilities(Message) == false) return _error->Error("Unable to process Capabilities message from %s",Access.c_str()); break; // 101 Log case 101: - if (Debug == true) + if (Debug == true) clog << " <- (log) " << LookupTag(Message,"Message") << endl; break; // 102 Status case 102: - Status = LookupTag(Message,"Message"); + Status = LookupTag(Message,"Message"); break; // 103 Redirect case 103: { - if (Itm == 0) + if (Itm == 0) { _error->Error("Method gave invalid 103 Redirect message"); break; @@ -395,7 +395,7 @@ bool pkgAcquire::Worker::Capabilities(string Message) Config->LocalOnly = StringToBool(LookupTag(Message,"Local-Only"),false); Config->NeedsCleanup = StringToBool(LookupTag(Message,"Needs-Cleanup"),false); Config->Removable = StringToBool(LookupTag(Message,"Removable"),false); - //std::cerr << "----Capabilities()" << std::endl; + // Some debug text if (Debug == true) { @@ -408,7 +408,7 @@ bool pkgAcquire::Worker::Capabilities(string Message) " NeedsCleanup: " << Config->NeedsCleanup << " Removable: " << Config->Removable << endl; } - //std::cerr << "----Capabilities()" << std::endl; + return true; } /*}}}*/ @@ -461,8 +461,6 @@ bool pkgAcquire::Worker::MediaChange(string Message) /* */ bool pkgAcquire::Worker::SendConfiguration() { - std::cerr << "pkgAcquire::Worker::SendConfiguration() -> [Worker::OutQueue]" << std::endl; - std::cerr << " Sending 601 Configuration message to the method." << std::endl; if (Config->SendConfig == false) return true; @@ -501,7 +499,7 @@ bool pkgAcquire::Worker::SendConfiguration() clog << " -> " << Access << ':' << QuoteString(Message,"\n") << endl; OutQueue += Message; OutReady = true; - //std::cerr << " OutQueue {" << Message.length() <<"}"<< std::endl; + return true; } /*}}}*/ @@ -524,7 +522,7 @@ bool pkgAcquire::Worker::QueueItem(pkgAcquire::Queue::QItem *Item) clog << " -> " << Access << ':' << QuoteString(Message,"\n") << endl; OutQueue += Message; OutReady = true; - + return true; } /*}}}*/ @@ -533,12 +531,10 @@ bool pkgAcquire::Worker::QueueItem(pkgAcquire::Queue::QItem *Item) /* */ bool pkgAcquire::Worker::OutFdReady() { - //std::cerr << "pkgAcquire::Worker::OutFdReady()." << std::endl; int Res; do { Res = write(OutFd,OutQueue.c_str(),OutQueue.length()); - //std::cerr << " writing the OutQueue to the OutFd " << OutFd << std::endl; } while (Res < 0 && errno == EINTR); diff --git a/apt-pkg/acquire.cc b/apt-pkg/acquire.cc index 43d5b6b52..7596aa956 100644 --- a/apt-pkg/acquire.cc +++ b/apt-pkg/acquire.cc @@ -208,7 +208,6 @@ void pkgAcquire::Enqueue(ItemDesc &Item) for (; I != 0 && I->Name != Name; I = I->Next); if (I == 0) { - //std::cerr << " Creating a new queue for the name: " << Name << std::endl; I = new Queue(Name,this); I->Next = Queues; Queues = I; @@ -282,7 +281,6 @@ string pkgAcquire::QueueName(string Uri,MethodConfig const *&Config) pkgAcquire::MethodConfig *pkgAcquire::GetConfig(string Access) { // Search for an existing config - //std::cerr << "pkgAcquire::GetConfig()" << std::endl; MethodConfig *Conf; for (Conf = Configs; Conf != 0; Conf = Conf->Next) if (Conf->Access == Access) @@ -295,7 +293,6 @@ pkgAcquire::MethodConfig *pkgAcquire::GetConfig(string Access) Configs = Conf; // Create the worker to fetch the configuration - //std::cerr <<" creating a new worker to fetch the configuration" << std::endl; Worker Work(Conf); if (Work.Start() == false) return 0; @@ -353,11 +350,9 @@ void pkgAcquire::RunFds(fd_set *RSet,fd_set *WSet) pkgAcquire::RunResult pkgAcquire::Run(int PulseIntervall) { Running = true; - //std::cerr << "pkgAcquire::Run(): Running." << std::endl; - //std::cerr << " starting up the queues." << std::endl; + for (Queue *I = Queues; I != 0; I = I->Next) I->Startup(); - //std::cerr << "\npkgAcquire::Run(): started queues.\n" << std::endl; if (Log != 0) Log->Start(); @@ -646,6 +641,7 @@ bool pkgAcquire::Queue::Startup() pkgAcquire::MethodConfig *Cnf = Owner->GetConfig(U.Access); if (Cnf == 0) return false; + Workers = new Worker(this,Cnf,Owner->Log); Owner->Add(Workers); if (Workers->Start() == false) @@ -726,7 +722,6 @@ bool pkgAcquire::Queue::ItemDone(QItem *Itm) is enabled then it keeps the pipe full. */ bool pkgAcquire::Queue::Cycle() { - //std::cerr << "pkgAcquire::Queue::Cycle():" << std::endl; if (Items == 0 || Workers == 0) return true; @@ -744,7 +739,7 @@ bool pkgAcquire::Queue::Cycle() // Nothing to do, queue is idle. if (I == 0) return true; - //std::cerr << " Found an Item to queue. " << I->ShortDesc << " " << I->URI << std::endl; + I->Worker = Workers; I->Owner->Status = pkgAcquire::Item::StatFetching; PipeDepth++; @@ -882,7 +877,6 @@ bool pkgAcquireStatus::Pulse(pkgAcquire *Owner) /* We just reset the counters */ void pkgAcquireStatus::Start() { - //std::cerr << "pkgAcquireStatus::Start():" << std::endl; gettimeofday(&Time,0); gettimeofday(&StartTime,0); LastBytes = 0; diff --git a/apt-pkg/algorithms.cc b/apt-pkg/algorithms.cc index 871d377a2..2dae4258a 100644 --- a/apt-pkg/algorithms.cc +++ b/apt-pkg/algorithms.cc @@ -391,7 +391,7 @@ bool pkgAllUpgrade(pkgDepCache &Cache) { if (Cache[I].Install() == true) Fix.Protect(I); - + if (_config->FindB("APT::Ignore-Hold",false) == false) if (I->SelectedState == pkgCache::State::Hold) continue; @@ -1372,25 +1372,19 @@ bool ListUpdate(pkgAcquireStatus &Stat, pkgSourceList &List, int PulseInterval) { - //std::cerr << "ListUpdate(): Starting." << std::endl; pkgAcquire::RunResult res; pkgAcquire Fetcher; - //std::cerr << "ListUpdate(): Setting up the fetcher..." << std::endl; if (Fetcher.Setup(&Stat, _config->FindDir("Dir::State::Lists")) == false) return false; // Populate it with the source selection - //std::cerr << "ListUpdate(): Populating the fetcher with the indexes." << std::endl; if (List.GetIndexes(&Fetcher) == false) return false; // Run scripts - //std::cerr << "\nListUpdate(): Running the Pre-Invoke scripts..." << std::endl; RunScripts("APT::Update::Pre-Invoke"); // check arguments - //std::cerr << "ListUpdate(): PulseInterval: " << PulseInterval << std::endl; - //std::cerr << "ListUpdate(): Running the Fetcher.\n" << std::endl; if(PulseInterval>0) res = Fetcher.Run(PulseInterval); else @@ -1398,14 +1392,12 @@ bool ListUpdate(pkgAcquireStatus &Stat, if (res == pkgAcquire::Failed) return false; - //std::cerr << "ListUpdate(): Res of the Fetcher is ok." << std::endl; + bool Failed = false; bool TransientNetworkFailure = false; - //std::cerr << "ListUpdate(): Iterating through the Items that Fetcher fetched. Is this a failed set of items?" << std::endl; for (pkgAcquire::ItemIterator I = Fetcher.ItemsBegin(); I != Fetcher.ItemsEnd(); I++) { - //std::cerr << " (*I)->DescURI() " << (*I)->DescURI() << std::endl; if ((*I)->Status == pkgAcquire::Item::StatDone) continue; diff --git a/apt-pkg/cachefile.cc b/apt-pkg/cachefile.cc index 932f5be03..a253f17f6 100644 --- a/apt-pkg/cachefile.cc +++ b/apt-pkg/cachefile.cc @@ -23,7 +23,7 @@ #include <apt-pkg/fileutl.h> #include <apti18n.h> -using namespace std; /*}}}*/ + /*}}}*/ // CacheFile::CacheFile - Constructor /*{{{*/ // --------------------------------------------------------------------- /* */ @@ -68,29 +68,29 @@ bool pkgCacheFile::BuildCaches(OpProgress *Progress, bool WithLock) if (_system->Lock() == false) return false; - if (_config->FindB("Debug::NoLocking",false) == true) - WithLock = false; + if (_config->FindB("Debug::NoLocking",false) == true) + WithLock = false; - if (_error->PendingError() == true) - return false; + if (_error->PendingError() == true) + return false; - BuildSourceList(Progress); + BuildSourceList(Progress); - // Read the caches - bool Res = pkgCacheGenerator::MakeStatusCache(*SrcList,Progress,&Map,!WithLock); - if (Progress != NULL) - Progress->Done(); - if (Res == false) - return _error->Error(_("The package lists or status file could not be parsed or opened.")); + // Read the caches + bool Res = pkgCacheGenerator::MakeStatusCache(*SrcList,Progress,&Map,!WithLock); + if (Progress != NULL) + Progress->Done(); + if (Res == false) + return _error->Error(_("The package lists or status file could not be parsed or opened.")); - /* This sux, remove it someday */ - if (ErrorWasEmpty == true && _error->empty() == false) - _error->Warning(_("You may want to run apt-get update to correct these problems")); + /* This sux, remove it someday */ + if (ErrorWasEmpty == true && _error->empty() == false) + _error->Warning(_("You may want to run apt-get update to correct these problems")); - Cache = new pkgCache(Map); - if (_error->PendingError() == true) - return false; - return true; + Cache = new pkgCache(Map); + if (_error->PendingError() == true) + return false; + return true; } /*}}}*/ // CacheFile::BuildSourceList - Open and build all relevant sources.list/*{{{*/ @@ -98,13 +98,9 @@ bool pkgCacheFile::BuildCaches(OpProgress *Progress, bool WithLock) /* */ bool pkgCacheFile::BuildSourceList(OpProgress *Progress) { - //std::cerr << "BuildSourceList(): Starting..." << std::endl; - if (SrcList != NULL) { - //std::cerr << " SrcList is not null. Returning." << std::endl; + if (SrcList != NULL) return true; - } - //std::cerr << " making a new SrcList." << std::endl; SrcList = new pkgSourceList(); if (SrcList->ReadMainList() == false) return _error->Error(_("The list of sources could not be read.")); diff --git a/apt-pkg/contrib/fileutl.cc b/apt-pkg/contrib/fileutl.cc index b1724971f..0b7d91d3b 100644 --- a/apt-pkg/contrib/fileutl.cc +++ b/apt-pkg/contrib/fileutl.cc @@ -587,7 +587,6 @@ void SetNonBlock(int Fd,bool Block) in seconds. */ bool WaitFd(int Fd,bool write,unsigned long timeout) { - //std::cerr << "WaitFd()" << std::endl; fd_set Set; struct timeval tv; FD_ZERO(&Set); @@ -618,7 +617,6 @@ bool WaitFd(int Fd,bool write,unsigned long timeout) if (Res <= 0) return false; } - //std::cerr << " waited for FD " << Fd << std::endl; return true; } /*}}}*/ diff --git a/apt-pkg/contrib/strutl.cc b/apt-pkg/contrib/strutl.cc index a452f65f3..072dda3ac 100644 --- a/apt-pkg/contrib/strutl.cc +++ b/apt-pkg/contrib/strutl.cc @@ -442,7 +442,6 @@ std::string OutputInDepth(const unsigned long Depth, const char* Separator) string URItoFileName(const string &URI) { // Nuke 'sensitive' items - //std::cerr << "\n>>>>URItoFileName():\n URI: " << URI << std::endl; ::URI U(URI); U.User.clear(); U.Password.clear(); @@ -451,7 +450,6 @@ string URItoFileName(const string &URI) // "\x00-\x20{}|\\\\^\\[\\]<>\"\x7F-\xFF"; string NewURI = QuoteString(U,"\\|{}[]<>\"^~_=!@#$%^&*"); replace(NewURI.begin(),NewURI.end(),'/','_'); - //std::cerr << " NewUri: " << NewURI << std::endl; return NewURI; } /*}}}*/ @@ -725,7 +723,6 @@ string TimeRFC1123(time_t Date) */ bool ReadMessages(int Fd, vector<string> &List) { - //std::cerr << "ReadMessages() Reading from Fd " << Fd << std::endl; char Buffer[64000]; char *End = Buffer; // Represents any left-over from the previous iteration of the @@ -768,7 +765,6 @@ bool ReadMessages(int Fd, vector<string> &List) I = Buffer; List.push_back(PartialMessage); - //std::cerr << " pushed back message:" << PartialMessage << std::endl; PartialMessage.clear(); } if (End != Buffer) @@ -794,7 +790,7 @@ bool ReadMessages(int Fd, vector<string> &List) // -- dburrows 2008-04-02 return true; } - //std::cerr << " calling WaidFd again." << std::endl; + if (WaitFd(Fd) == false) return false; } diff --git a/apt-pkg/deb/debmetaindex.cc b/apt-pkg/deb/debmetaindex.cc index 5c4a591f1..b9946bc16 100644 --- a/apt-pkg/deb/debmetaindex.cc +++ b/apt-pkg/deb/debmetaindex.cc @@ -448,4 +448,4 @@ public: debSLTypeDeb _apt_DebType; debSLTypeDebSrc _apt_DebSrcType; -debSLTypeDebdelta _apt_DebdeltaType; +debSLTypeDebdelta _apt_DebdeltaType;
\ No newline at end of file diff --git a/apt-pkg/init.cc b/apt-pkg/init.cc index d3f573356..0bb106ac8 100644 --- a/apt-pkg/init.cc +++ b/apt-pkg/init.cc @@ -32,7 +32,6 @@ const char *pkgLibVersion = Stringfy(APT_PKG_MAJOR) "." is prepended, this allows a fair degree of flexability. */ bool pkgInitConfig(Configuration &Cnf) { - std::cerr << "pkgInitConfig()" << std::endl; // General APT things Cnf.Set("APT::Architecture", COMMON_ARCH); Cnf.Set("APT::Build-Essential::", "build-essential"); @@ -143,7 +142,6 @@ bool pkgInitSystem(Configuration &Cnf,pkgSystem *&Sys) { Sys = 0; string Label = Cnf.Find("Apt::System",""); - std::cerr << "pkgInitSystem() " << Label.c_str() << std::endl; if (Label.empty() == false) { Sys = pkgSystem::GetSystem(Label.c_str()); diff --git a/apt-pkg/sourcelist.cc b/apt-pkg/sourcelist.cc index 3559c1160..851eefdfe 100644 --- a/apt-pkg/sourcelist.cc +++ b/apt-pkg/sourcelist.cc @@ -183,12 +183,10 @@ pkgSourceList::~pkgSourceList() /* */ bool pkgSourceList::ReadMainList() { - //std::cerr << "ReadMainList(): Starting." << std::endl; // CNC:2003-03-03 - Multiple sources list support. bool Res = true; #if 0 Res = ReadVendors(); - std::cerr << " ReadVendors " << Res << std::endl; if (Res == false) return false; #endif @@ -198,8 +196,7 @@ bool pkgSourceList::ReadMainList() // entries in sources.list.d. string Main = _config->FindFile("Dir::Etc::sourcelist"); string Parts = _config->FindDir("Dir::Etc::sourceparts"); - //std::cerr << " Main: " << Main << std::endl; - //std::cerr << " Parts: " << Parts << std::endl; + if (RealFileExists(Main) == true) Res &= ReadAppend(Main); else if (DirectoryExists(Parts) == false) @@ -221,7 +218,6 @@ bool pkgSourceList::ReadMainList() /* */ void pkgSourceList::Reset() { - std::cerr << "Reset(): Clear the sourcelist contents." << std::endl; for (const_iterator I = SrcList.begin(); I != SrcList.end(); I++) delete *I; SrcList.erase(SrcList.begin(),SrcList.end()); @@ -242,7 +238,6 @@ bool pkgSourceList::Read(string File) /* */ bool pkgSourceList::ReadAppend(string File) { - std::cerr << "ReadAppend(): File " << File << std::endl; // Open the stream for reading ifstream F(File.c_str(),ios::in /*| ios::nocreate*/); if (!F != 0) @@ -260,7 +255,6 @@ bool pkgSourceList::ReadAppend(string File) while (F.eof() == false) { F.getline(Buffer,sizeof(Buffer)); - //std::cerr << " Buffer " << Buffer << std::endl; CurLine++; _strtabexpand(Buffer,sizeof(Buffer)); if (F.fail() && !F.eof()) @@ -324,7 +318,6 @@ bool pkgSourceList::FindIndex(pkgCache::PkgFileIterator File, /* */ bool pkgSourceList::GetIndexes(pkgAcquire *Owner, bool GetAll) const { - //std::cerr << "GetIndexes(): Loading the index files into the downloader." << std::endl; for (const_iterator I = SrcList.begin(); I != SrcList.end(); I++) if ((*I)->GetIndexes(Owner,GetAll) == false) return false; diff --git a/buildproject b/buildproject new file mode 100755 index 000000000..7b6e98281 --- /dev/null +++ b/buildproject @@ -0,0 +1,4 @@ +#!/bin/bash + +sudo rm -Rf /home/ishan/devel/debian-squeeze/home/apt-test/apt/* +sudo cp -r /home/ishan/devel/apt-ishan/build/bin/* /home/ishan/devel/debian-squeeze/home/apt-test/apt/ |