From: Michael Vogt Date: Fri, 8 Jun 2007 21:37:27 +0000 (+0200) Subject: * Removed the more leftover #pragma interface/implementation X-Git-Tag: 0.7.21~279 X-Git-Url: https://git.saurik.com/apt.git/commitdiff_plain/d22bcfc4b0b2d0056126a1c690f778b1c3ddaf17?hp=-c * Removed the more leftover #pragma interface/implementation closes: #306937 (thanks to Andreas Henriksson for the patch) --- d22bcfc4b0b2d0056126a1c690f778b1c3ddaf17 diff --combined apt-pkg/acquire-worker.cc index 8ab67778b,063aa5ed7..25d40ef54 --- a/apt-pkg/acquire-worker.cc +++ b/apt-pkg/acquire-worker.cc @@@ -12,9 -12,6 +12,6 @@@ ##################################################################### */ /*}}}*/ // Include Files /*{{{*/ - #ifdef __GNUG__ - #pragma implementation "apt-pkg/acquire-worker.h" - #endif #include #include #include @@@ -307,13 -304,6 +304,13 @@@ bool pkgAcquire::Worker::RunMessages( pkgAcquire::Item *Owner = Itm->Owner; pkgAcquire::ItemDesc Desc = *Itm; OwnerQ->ItemDone(Itm); + + // set some status + if(LookupTag(Message,"FailReason") == "Timeout" || + LookupTag(Message,"FailReason") == "TmpResolveFailure" || + LookupTag(Message,"FailReason") == "ConnectionRefused") + Owner->Status = pkgAcquire::Item::StatTransientNetworkError; + Owner->Failed(Message,Config); ItemDone(); diff --combined apt-pkg/acquire.cc index e1dccf25a,ed78ec971..cbd67055d --- a/apt-pkg/acquire.cc +++ b/apt-pkg/acquire.cc @@@ -13,9 -13,6 +13,6 @@@ ##################################################################### */ /*}}}*/ // Include Files /*{{{*/ - #ifdef __GNUG__ - #pragma implementation "apt-pkg/acquire.h" - #endif #include #include #include @@@ -193,9 -190,9 +190,9 @@@ void pkgAcquire::Enqueue(ItemDesc &Item Item.Owner->Status = Item::StatIdle; // Queue it into the named queue - I->Enqueue(Item); - ToFetch++; - + if(I->Enqueue(Item)) + ToFetch++; + // Some trace stuff if (Debug == true) { @@@ -549,17 -546,11 +546,17 @@@ pkgAcquire::Queue::~Queue( // Queue::Enqueue - Queue an item to the queue /*{{{*/ // --------------------------------------------------------------------- /* */ -void pkgAcquire::Queue::Enqueue(ItemDesc &Item) +bool pkgAcquire::Queue::Enqueue(ItemDesc &Item) { QItem **I = &Items; - for (; *I != 0; I = &(*I)->Next); - + // move to the end of the queue and check for duplicates here + for (; *I != 0; I = &(*I)->Next) + if (Item.URI == (*I)->URI) + { + Item.Owner->Status = Item::StatDone; + return false; + } + // Create a new item QItem *Itm = new QItem; *Itm = Item; @@@ -569,7 -560,6 +566,7 @@@ Item.Owner->QueueCounter++; if (Items->Next == 0) Cycle(); + return true; } /*}}}*/ // Queue::Dequeue - Remove an item from the queue /*{{{*/ diff --combined apt-pkg/algorithms.cc index 93e26c7c6,3ac98216b..b21fcbb2f --- a/apt-pkg/algorithms.cc +++ b/apt-pkg/algorithms.cc @@@ -14,20 -14,13 +14,17 @@@ ##################################################################### */ /*}}}*/ // Include Files /*{{{*/ - #ifdef __GNUG__ - #pragma implementation "apt-pkg/algorithms.h" - #endif #include #include #include +#include #include + #include - +#include +#include +#include #include /*}}}*/ using namespace std; @@@ -104,7 -97,6 +101,7 @@@ bool pkgSimulate::Install(PkgIterator i DepIterator End; D.GlobOr(Start,End); if (Start->Type == pkgCache::Dep::Conflicts || + Start->Type == pkgCache::Dep::DpkgBreaks || Start->Type == pkgCache::Dep::Obsoletes || End->Type == pkgCache::Dep::PreDepends) { @@@ -154,8 -146,6 +151,8 @@@ bool pkgSimulate::Configure(PkgIterato cout << " Obsoletes:" << D.TargetPkg().Name(); else if (D->Type == pkgCache::Dep::Conflicts) cout << " Conflicts:" << D.TargetPkg().Name(); + else if (D->Type == pkgCache::Dep::DpkgBreaks) + cout << " Breaks:" << D.TargetPkg().Name(); else cout << " Depends:" << D.TargetPkg().Name(); } @@@ -227,8 -217,6 +224,8 @@@ void pkgSimulate::ShortBreaks( the necessary calculations to deal with the problems. */ bool pkgApplyStatus(pkgDepCache &Cache) { + pkgDepCache::ActionGroup group(Cache); + for (pkgCache::PkgIterator I = Cache.PkgBegin(); I.end() == false; I++) { if (I->VersionList == 0) @@@ -239,13 -227,13 +236,13 @@@ I->InstState == pkgCache::State::HoldReInstReq) { if (I->CurrentVer != 0 && I.CurrentVer().Downloadable() == true) - Cache.MarkKeep(I); + Cache.MarkKeep(I, false, false); else { // Is this right? Will dpkg choke on an upgrade? if (Cache[I].CandidateVer != 0 && Cache[I].CandidateVerIter(Cache).Downloadable() == true) - Cache.MarkInstall(I); + Cache.MarkInstall(I, false, 0, false); else return _error->Error(_("The package %s needs to be reinstalled, " "but I can't find an archive for it."),I.Name()); @@@ -262,12 -250,12 +259,12 @@@ case pkgCache::State::HalfConfigured: if ((I->CurrentVer != 0 && I.CurrentVer().Downloadable() == true) || I.State() != pkgCache::PkgIterator::NeedsUnpack) - Cache.MarkKeep(I); + Cache.MarkKeep(I, false, false); else { if (Cache[I].CandidateVer != 0 && Cache[I].CandidateVerIter(Cache).Downloadable() == true) - Cache.MarkInstall(I); + Cache.MarkInstall(I, true, 0, false); else Cache.MarkDelete(I); } @@@ -293,12 -281,10 +290,12 @@@ on the result. */ bool pkgFixBroken(pkgDepCache &Cache) { + pkgDepCache::ActionGroup group(Cache); + // Auto upgrade all broken packages for (pkgCache::PkgIterator I = Cache.PkgBegin(); I.end() == false; I++) if (Cache[I].NowBroken() == true) - Cache.MarkInstall(I,true); + Cache.MarkInstall(I, true, 0, false); /* Fix packages that are in a NeedArchive state but don't have a downloadable install version */ @@@ -311,7 -297,7 +308,7 @@@ if (Cache[I].InstVerIter(Cache).Downloadable() == false) continue; - Cache.MarkInstall(I,true); + Cache.MarkInstall(I, true, 0, false); } pkgProblemResolver Fix(&Cache); @@@ -328,25 -314,23 +325,25 @@@ */ bool pkgDistUpgrade(pkgDepCache &Cache) { + pkgDepCache::ActionGroup group(Cache); + /* Auto upgrade all installed packages, this provides the basis for the installation */ for (pkgCache::PkgIterator I = Cache.PkgBegin(); I.end() == false; I++) if (I->CurrentVer != 0) - Cache.MarkInstall(I,true); + Cache.MarkInstall(I, true, 0, false); /* Now, auto upgrade all essential packages - this ensures that the essential packages are present and working */ for (pkgCache::PkgIterator I = Cache.PkgBegin(); I.end() == false; I++) if ((I->Flags & pkgCache::Flag::Essential) == pkgCache::Flag::Essential) - Cache.MarkInstall(I,true); + Cache.MarkInstall(I, true, 0, false); /* We do it again over all previously installed packages to force conflict resolution on them all. */ for (pkgCache::PkgIterator I = Cache.PkgBegin(); I.end() == false; I++) if (I->CurrentVer != 0) - Cache.MarkInstall(I,false); + Cache.MarkInstall(I, false, 0, false); pkgProblemResolver Fix(&Cache); @@@ -358,7 -342,7 +355,7 @@@ if (I->SelectedState == pkgCache::State::Hold) { Fix.Protect(I); - Cache.MarkKeep(I); + Cache.MarkKeep(I, false, false); } } } @@@ -373,8 -357,6 +370,8 @@@ to install packages not marked for install */ bool pkgAllUpgrade(pkgDepCache &Cache) { + pkgDepCache::ActionGroup group(Cache); + pkgProblemResolver Fix(&Cache); if (Cache.BrokenCount() != 0) @@@ -391,7 -373,7 +388,7 @@@ continue; if (I->CurrentVer != 0 && Cache[I].InstallVer != 0) - Cache.MarkInstall(I,false); + Cache.MarkInstall(I, false, 0, false); } return Fix.ResolveByKeep(); @@@ -404,8 -386,6 +401,8 @@@ the package is restored. */ bool pkgMinimizeUpgrade(pkgDepCache &Cache) { + pkgDepCache::ActionGroup group(Cache); + if (Cache.BrokenCount() != 0) return false; @@@ -422,9 -402,9 +419,9 @@@ continue; // Keep it and see if that is OK - Cache.MarkKeep(I); + Cache.MarkKeep(I, false, false); if (Cache.BrokenCount() != 0) - Cache.MarkInstall(I,false); + Cache.MarkInstall(I, false, 0, false); else { // If keep didnt actually do anything then there was no change.. @@@ -511,10 -491,8 +508,10 @@@ void pkgProblemResolver::MakeScores( Score += PrioMap[Cache[I].InstVerIter(Cache)->Priority]; /* This helps to fix oddball problems with conflicting packages - on the same level. We enhance the score of installed packages */ - if (I->CurrentVer != 0) + on the same level. We enhance the score of installed packages + if those are not obsolete + */ + if (I->CurrentVer != 0 && Cache[I].CandidateVer != 0 && Cache[I].CandidateVerIter(Cache).Downloadable()) Score += 1; } @@@ -584,8 -562,6 +581,8 @@@ installable */ bool pkgProblemResolver::DoUpgrade(pkgCache::PkgIterator Pkg) { + pkgDepCache::ActionGroup group(Cache); + if ((Flags[Pkg->ID] & Upgradable) == 0 || Cache[Pkg].Upgradable() == false) return false; if ((Flags[Pkg->ID] & Protected) == Protected) @@@ -594,7 -570,7 +591,7 @@@ Flags[Pkg->ID] &= ~Upgradable; bool WasKept = Cache[Pkg].Keep(); - Cache.MarkInstall(Pkg,false); + Cache.MarkInstall(Pkg, false, 0, false); // This must be a virtual package or something like that. if (Cache[Pkg].InstVerIter(Cache).end() == true) @@@ -658,7 -634,6 +655,7 @@@ /* We let the algorithm deal with conflicts on its next iteration, it is much smarter than us */ if (Start->Type == pkgCache::Dep::Conflicts || + Start->Type == pkgCache::Dep::DpkgBreaks || Start->Type == pkgCache::Dep::Obsoletes) break; @@@ -680,7 -655,7 +677,7 @@@ if (Fail == true) { if (WasKept == true) - Cache.MarkKeep(Pkg); + Cache.MarkKeep(Pkg, false, false); else Cache.MarkDelete(Pkg); return false; @@@ -707,8 -682,6 +704,8 @@@ upgrade packages to advoid problems. */ bool pkgProblemResolver::Resolve(bool BrokenFix) { + pkgDepCache::ActionGroup group(Cache); + unsigned long Size = Cache.Head().PackageCount; // Record which packages are marked for install @@@ -724,7 -697,7 +721,7 @@@ { if (Cache[I].InstBroken() == true && BrokenFix == true) { - Cache.MarkInstall(I,false); + Cache.MarkInstall(I, false, 0, false); if (Cache[I].Install() == true) Again = true; } @@@ -790,14 -763,14 +787,14 @@@ pkgCache::Version *OldVer = Cache[I].InstallVer; Flags[I->ID] &= ReInstateTried; - Cache.MarkInstall(I,false); + Cache.MarkInstall(I, false, 0, false); if (Cache[I].InstBroken() == true || OldBreaks < Cache.BrokenCount()) { if (OldVer == 0) Cache.MarkDelete(I); else - Cache.MarkKeep(I); + Cache.MarkKeep(I, false, false); } else if (Debug == true) @@@ -808,7 -781,7 +805,7 @@@ continue; if (Debug == true) - cout << "Investigating " << I.Name() << endl; + clog << "Investigating " << I.Name() << endl; // Isolate the problem dependency PackageKill KillList[100]; @@@ -842,7 -815,7 +839,7 @@@ { if (Debug == true) clog << " Or group keep for " << I.Name() << endl; - Cache.MarkKeep(I); + Cache.MarkKeep(I, false, false); Change = true; } } @@@ -863,12 -836,7 +860,12 @@@ OldEnd = LEnd; } else + { Start++; + // We only worry about critical deps. + if (Start.IsCritical() != true) + continue; + } // Dep is ok if ((Cache[End] & pkgDepCache::DepGInstall) == pkgDepCache::DepGInstall) @@@ -886,7 -854,6 +883,7 @@@ SPtrArray VList = Start.AllTargets(); if (*VList == 0 && (Flags[I->ID] & Protected) != Protected && Start->Type != pkgCache::Dep::Conflicts && + Start->Type != pkgCache::Dep::DpkgBreaks && Start->Type != pkgCache::Dep::Obsoletes && Cache[I].NowBroken() == false) { @@@ -898,7 -865,7 +895,7 @@@ } Change = true; - Cache.MarkKeep(I); + Cache.MarkKeep(I, false, false); break; } @@@ -917,7 -884,6 +914,7 @@@ if (Scores[I->ID] <= Scores[Pkg->ID] || ((Cache[Start] & pkgDepCache::DepNow) == 0 && End->Type != pkgCache::Dep::Conflicts && + End->Type != pkgCache::Dep::DpkgBreaks && End->Type != pkgCache::Dep::Obsoletes)) { // Try a little harder to fix protected packages.. @@@ -936,7 -902,7 +933,7 @@@ /* See if a keep will do, unless the package is protected, then installing it will be necessary */ bool Installed = Cache[I].Install(); - Cache.MarkKeep(I); + Cache.MarkKeep(I, false, false); if (Cache[I].InstBroken() == false) { // Unwind operation will be keep now @@@ -945,7 -911,7 +942,7 @@@ // Restore if (InOr == true && Installed == true) - Cache.MarkInstall(I,false); + Cache.MarkInstall(I, false, 0, false); if (Debug == true) clog << " Holding Back " << I.Name() << " rather than change " << Start.TargetPkg().Name() << endl; @@@ -983,22 -949,7 +980,22 @@@ (Start->Type == pkgCache::Dep::Conflicts || Start->Type == pkgCache::Dep::Obsoletes)) continue; - + + if (Start->Type == pkgCache::Dep::DpkgBreaks) + { + /* Would it help if we upgraded? */ + if (Cache[End] & pkgDepCache::DepGCVer) { + if (Debug) + clog << " Upgrading " << Pkg.Name() << " due to Breaks field in " << I.Name() << endl; + Cache.MarkInstall(Pkg, false, 0, false); + continue; + } + if (Debug) + clog << " Will not break " << Pkg.Name() << " as stated in Breaks field in " << I.Name() <ID] & Protected) != 0) continue; @@@ -1019,7 -970,6 +1016,7 @@@ // Hm, nothing can possibly satisify this dep. Nuke it. if (VList[0] == 0 && Start->Type != pkgCache::Dep::Conflicts && + Start->Type != pkgCache::Dep::DpkgBreaks && Start->Type != pkgCache::Dep::Obsoletes && (Flags[I->ID] & Protected) != Protected) { @@@ -1033,7 -983,7 +1030,7 @@@ // Restore if (InOr == true && Installed == true) - Cache.MarkInstall(I,false); + Cache.MarkInstall(I, false, 0, false); if (Debug == true) clog << " Holding Back " << I.Name() << " because I can't find " << Start.TargetPkg().Name() << endl; @@@ -1078,7 -1028,7 +1075,7 @@@ { if (Debug == true) clog << " Fixing " << I.Name() << " via keep of " << J->Pkg.Name() << endl; - Cache.MarkKeep(J->Pkg); + Cache.MarkKeep(J->Pkg, false, false); } if (Counter > 1) @@@ -1108,20 -1058,6 +1105,20 @@@ return _error->Error(_("Unable to correct problems, you have held broken packages.")); } + // set the auto-flags (mvo: I'm not sure if we _really_ need this, but + // I didn't managed + pkgCache::PkgIterator I = Cache.PkgBegin(); + for (;I.end() != true; I++) { + if (Cache[I].NewInstall() && !(Flags[I->ID] & PreInstalled)) { + if(_config->FindI("Debug::pkgAutoRemove",false)) { + std::clog << "Resolve installed new pkg: " << I.Name() + << " (now marking it as auto)" << std::endl; + } + Cache[I].Flags |= pkgCache::Flag::Auto; + } + } + + return true; } /*}}}*/ @@@ -1132,8 -1068,6 +1129,8 @@@ system was non-broken previously. */ bool pkgProblemResolver::ResolveByKeep() { + pkgDepCache::ActionGroup group(Cache); + unsigned long Size = Cache.Head().PackageCount; if (Debug == true) @@@ -1167,7 -1101,7 +1164,7 @@@ { if (Debug == true) clog << "Keeping package " << I.Name() << endl; - Cache.MarkKeep(I); + Cache.MarkKeep(I, false, false); if (Cache[I].InstBroken() == false) { K = PList - 1; @@@ -1215,7 -1149,7 +1212,7 @@@ { if (Debug == true) clog << " Keeping Package " << Pkg.Name() << " due to dep" << endl; - Cache.MarkKeep(Pkg); + Cache.MarkKeep(Pkg, false, false); } if (Cache[I].InstBroken() == false) @@@ -1252,21 -1186,14 +1249,21 @@@ /* This is used to make sure protected packages are installed */ void pkgProblemResolver::InstallProtect() { + pkgDepCache::ActionGroup group(Cache); + for (pkgCache::PkgIterator I = Cache.PkgBegin(); I.end() == false; I++) { if ((Flags[I->ID] & Protected) == Protected) { if ((Flags[I->ID] & ToRemove) == ToRemove) Cache.MarkDelete(I); - else - Cache.MarkInstall(I,false); + else + { + // preserver the information if the package was auto + // or manual installed + bool autoInst = (Cache[I].Flags & pkgCache::Flag::Auto); + Cache.MarkInstall(I, false, 0, !autoInst); + } } } } @@@ -1302,4 -1229,3 +1299,4 @@@ void pkgPrioSortList(pkgCache &Cache,pk qsort(List,Count,sizeof(*List),PrioComp); } /*}}}*/ + diff --combined apt-pkg/cdrom.cc index afa99bc73,9b0568d8f..4a688a5e1 --- a/apt-pkg/cdrom.cc +++ b/apt-pkg/cdrom.cc @@@ -1,9 -1,6 +1,6 @@@ /* */ - #ifdef __GNUG__ - #pragma implementation "apt-pkg/cdrom.h" - #endif #include #include #include @@@ -18,7 -15,6 +15,7 @@@ #include #include #include +#include #include "indexcopy.h" @@@ -31,16 -27,12 +28,16 @@@ using namespace std search that short circuits when it his a package file in the dir. This speeds it up greatly as the majority of the size is in the binary-* sub dirs. */ -bool pkgCdrom::FindPackages(string CD,vector &List, - vector &SList, vector &SigList, +bool pkgCdrom::FindPackages(string CD, + vector &List, + vector &SList, + vector &SigList, + vector &TransList, string &InfoDir, pkgCdromStatus *log, unsigned int Depth) { static ino_t Inodes[9]; + DIR *D; // if we have a look we "pulse" now if(log) @@@ -95,28 -87,8 +92,28 @@@ if (_config->FindB("APT::CDROM::Thorough",false) == false) return true; } + + // see if we find translatin indexes + if (stat("i18n",&Buf) == 0) + { + D = opendir("i18n"); + for (struct dirent *Dir = readdir(D); Dir != 0; Dir = readdir(D)) + { + if(strstr(Dir->d_name,"Translation") != NULL) + { + if (_config->FindB("Debug::aptcdrom",false) == true) + std::clog << "found translations: " << Dir->d_name << "\n"; + string file = Dir->d_name; + if(file.substr(file.size()-3,file.size()) == ".gz") + file = file.substr(0,file.size()-3); + TransList.push_back(CD+"i18n/"+ file); + } + } + closedir(D); + } + - DIR *D = opendir("."); + D = opendir("."); if (D == 0) return _error->Errno("opendir","Unable to read %s",CD.c_str()); @@@ -152,7 -124,7 +149,7 @@@ Inodes[Depth] = Buf.st_ino; // Descend - if (FindPackages(CD + Dir->d_name,List,SList,SigList,InfoDir,log,Depth+1) == false) + if (FindPackages(CD + Dir->d_name,List,SList,SigList,TransList,InfoDir,log,Depth+1) == false) break; if (chdir(CD.c_str()) != 0) @@@ -637,10 -609,9 +634,10 @@@ bool pkgCdrom::Add(pkgCdromStatus *log vector List; vector SourceList; vector SigList; + vector TransList; string StartDir = SafeGetCWD(); string InfoDir; - if (FindPackages(CDROM,List,SourceList, SigList,InfoDir,log) == false) + if (FindPackages(CDROM,List,SourceList, SigList,TransList,InfoDir,log) == false) { log->Update("\n"); return false; @@@ -668,20 -639,17 +665,20 @@@ DropRepeats(List,"Packages"); DropRepeats(SourceList,"Sources"); DropRepeats(SigList,"Release.gpg"); + DropRepeats(TransList,""); if(log) { msg.str(""); - ioprintf(msg, _("Found %i package indexes, %i source indexes and " - "%i signatures\n"), - List.size(), SourceList.size(), SigList.size()); + ioprintf(msg, _("Found %i package indexes, %i source indexes, " + "%i translation indexes and %i signatures\n"), + List.size(), SourceList.size(), TransList.size(), + SigList.size()); log->Update(msg.str(), STEP_SCAN); } if (List.size() == 0 && SourceList.size() == 0) { - UnmountCdrom(CDROM); + if (_config->FindB("APT::CDROM::NoMount",false) == false) + UnmountCdrom(CDROM); return _error->Error("Unable to locate any package files, perhaps this is not a Debian Disc"); } @@@ -708,7 -676,7 +705,7 @@@ if(log) { msg.str(""); - ioprintf(msg, "Found label '%s'\n", Name.c_str()); + ioprintf(msg, _("Found label '%s'\n"), Name.c_str()); log->Update(msg.str()); } Database.Set("CD::" + ID + "::Label",Name); @@@ -720,8 -688,7 +717,8 @@@ { if(!log) { - UnmountCdrom(CDROM); + if (_config->FindB("APT::CDROM::NoMount",false) == false) + UnmountCdrom(CDROM); return _error->Error("No disc name found and no way to ask for it"); } @@@ -766,10 -733,8 +763,10 @@@ // Copy the package files to the state directory PackageCopy Copy; SourceCopy SrcCopy; + TranslationsCopy TransCopy; if (Copy.CopyPackages(CDROM,Name,List, log) == false || - SrcCopy.CopyPackages(CDROM,Name,SourceList, log) == false) + SrcCopy.CopyPackages(CDROM,Name,SourceList, log) == false || + TransCopy.CopyTranslations(CDROM,Name,TransList, log) == false) return false; // reduce the List so that it takes less space in sources.list @@@ -799,8 -764,7 +796,8 @@@ string::size_type Space = (*I).find(' '); if (Space == string::npos) { - UnmountCdrom(CDROM); + if (_config->FindB("APT::CDROM::NoMount",false) == false) + UnmountCdrom(CDROM); return _error->Error("Internal error"); } @@@ -817,8 -781,7 +814,8 @@@ string::size_type Space = (*I).find(' '); if (Space == string::npos) { - UnmountCdrom(CDROM); + if (_config->FindB("APT::CDROM::NoMount",false) == false) + UnmountCdrom(CDROM); return _error->Error("Internal error"); } @@@ -834,7 -797,7 +831,7 @@@ // Unmount and finish if (_config->FindB("APT::CDROM::NoMount",false) == false) { - log->Update(_("Unmounting CD-ROM..."), STEP_LAST); + log->Update(_("Unmounting CD-ROM...\n"), STEP_LAST); UnmountCdrom(CDROM); } diff --combined apt-pkg/contrib/fileutl.cc index 5d294c36a,70ac52e30..d19a92e62 --- a/apt-pkg/contrib/fileutl.cc +++ b/apt-pkg/contrib/fileutl.cc @@@ -14,9 -14,6 +14,6 @@@ ##################################################################### */ /*}}}*/ // Include Files /*{{{*/ - #ifdef __GNUG__ - #pragma implementation "apt-pkg/fileutl.h" - #endif #include #include #include @@@ -24,7 -21,6 +21,7 @@@ #include +#include #include #include #include diff --combined apt-pkg/contrib/progress.cc index e3db9a45a,ffd1191e5..6ce6e950a --- a/apt-pkg/contrib/progress.cc +++ b/apt-pkg/contrib/progress.cc @@@ -8,9 -8,6 +8,6 @@@ ##################################################################### */ /*}}}*/ // Include Files /*{{{*/ - #ifdef __GNUG__ - #pragma implementation "apt-pkg/progress.h" - #endif #include #include #include @@@ -115,8 -112,6 +112,8 @@@ bool OpProgress::CheckChange(float Inte if ((int)LastPercent == (int)Percent) return false; + + LastPercent = Percent; if (Interval == 0) return false; @@@ -128,6 -123,7 +125,6 @@@ if (Diff < Interval) return false; LastTime = Now; - LastPercent = Percent; return true; } /*}}}*/ diff --combined apt-pkg/contrib/strutl.cc index 14ead61e1,aa37a099a..006452af4 --- a/apt-pkg/contrib/strutl.cc +++ b/apt-pkg/contrib/strutl.cc @@@ -15,10 -15,6 +15,6 @@@ ##################################################################### */ /*}}}*/ // Includes /*{{{*/ - #ifdef __GNUG__ - #pragma implementation "apt-pkg/strutl.h" - #endif - #include #include #include @@@ -28,60 -24,16 +24,60 @@@ #include #include #include +#include #include #include #include #include +#include #include "config.h" using namespace std; /*}}}*/ +// UTF8ToCodeset - Convert some UTF-8 string for some codeset /*{{{*/ +// --------------------------------------------------------------------- +/* This is handy to use before display some information for enduser */ +bool UTF8ToCodeset(const char *codeset, const string &orig, string *dest) +{ + iconv_t cd; + const char *inbuf; + char *inptr, *outbuf, *outptr; + size_t insize, outsize; + + cd = iconv_open(codeset, "UTF-8"); + if (cd == (iconv_t)(-1)) { + // Something went wrong + if (errno == EINVAL) + _error->Error("conversion from 'UTF-8' to '%s' not available", + codeset); + else + perror("iconv_open"); + + // Clean the destination string + *dest = ""; + + return false; + } + + insize = outsize = orig.size(); + inbuf = orig.data(); + inptr = (char *)inbuf; + outbuf = new char[insize+1]; + outptr = outbuf; + + iconv(cd, &inptr, &insize, &outptr, &outsize); + *outptr = '\0'; + + *dest = outbuf; + delete[] outbuf; + + iconv_close(cd); + + return true; +} + /*}}}*/ // strstrip - Remove white space from the front and back of a string /*{{{*/ // --------------------------------------------------------------------- /* This is handy to use when parsing a file. It also removes \n's left diff --combined apt-pkg/deb/debindexfile.cc index 9f435bba5,2d52f7c45..ed7633803 --- a/apt-pkg/deb/debindexfile.cc +++ b/apt-pkg/deb/debindexfile.cc @@@ -9,10 -9,6 +9,6 @@@ ##################################################################### */ /*}}}*/ // Include Files /*{{{*/ - #ifdef __GNUG__ - #pragma implementation "apt-pkg/debindexfile.h" - #endif - #include #include #include @@@ -305,7 -301,7 +301,7 @@@ pkgCache::PkgFileIterator debPackagesIn pkgCache::PkgFileIterator File = Cache.FileBegin(); for (; File.end() == false; File++) { - if (FileName != File.FileName()) + if (File.FileName() == NULL || FileName != File.FileName()) continue; struct stat St; @@@ -320,170 -316,6 +316,170 @@@ } /*}}}*/ +// TranslationsIndex::debTranslationsIndex - Contructor /*{{{*/ +// --------------------------------------------------------------------- +/* */ +debTranslationsIndex::debTranslationsIndex(string URI,string Dist,string Section) : + pkgIndexFile(true), URI(URI), Dist(Dist), Section(Section) +{ +} + /*}}}*/ +// TranslationIndex::Trans* - Return the URI to the translation files /*{{{*/ +// --------------------------------------------------------------------- +/* */ +inline string debTranslationsIndex::IndexFile(const char *Type) const +{ + return _config->FindDir("Dir::State::lists") + URItoFileName(IndexURI(Type)); +} +string debTranslationsIndex::IndexURI(const char *Type) const +{ + string Res; + if (Dist[Dist.size() - 1] == '/') + { + if (Dist != "/") + Res = URI + Dist; + else + Res = URI; + } + else + Res = URI + "dists/" + Dist + '/' + Section + + "/i18n/Translation-"; + + Res += Type; + return Res; +} + /*}}}*/ +// TranslationsIndex::GetIndexes - Fetch the index files /*{{{*/ +// --------------------------------------------------------------------- +/* */ +bool debTranslationsIndex::GetIndexes(pkgAcquire *Owner) const +{ + if (TranslationsAvailable()) { + string TranslationFile = "Translation-" + LanguageCode(); + new pkgAcqIndexTrans(Owner, IndexURI(LanguageCode().c_str()), + Info(TranslationFile.c_str()), + TranslationFile); + } + + return true; +} + /*}}}*/ +// TranslationsIndex::Describe - Give a descriptive path to the index /*{{{*/ +// --------------------------------------------------------------------- +/* This should help the user find the index in the sources.list and + in the filesystem for problem solving */ +string debTranslationsIndex::Describe(bool Short) const +{ + char S[300]; + if (Short == true) + snprintf(S,sizeof(S),"%s",Info(TranslationFile().c_str()).c_str()); + else + snprintf(S,sizeof(S),"%s (%s)",Info(TranslationFile().c_str()).c_str(), + IndexFile(LanguageCode().c_str()).c_str()); + return S; +} + /*}}}*/ +// TranslationsIndex::Info - One liner describing the index URI /*{{{*/ +// --------------------------------------------------------------------- +/* */ +string debTranslationsIndex::Info(const char *Type) const +{ + string Info = ::URI::SiteOnly(URI) + ' '; + if (Dist[Dist.size() - 1] == '/') + { + if (Dist != "/") + Info += Dist; + } + else + Info += Dist + '/' + Section; + Info += " "; + Info += Type; + return Info; +} + /*}}}*/ +bool debTranslationsIndex::HasPackages() const +{ + if(!TranslationsAvailable()) + return false; + + return FileExists(IndexFile(LanguageCode().c_str())); +} + +// TranslationsIndex::Exists - Check if the index is available /*{{{*/ +// --------------------------------------------------------------------- +/* */ +bool debTranslationsIndex::Exists() const +{ + return FileExists(IndexFile(LanguageCode().c_str())); +} + /*}}}*/ +// TranslationsIndex::Size - Return the size of the index /*{{{*/ +// --------------------------------------------------------------------- +/* This is really only used for progress reporting. */ +unsigned long debTranslationsIndex::Size() const +{ + struct stat S; + if (stat(IndexFile(LanguageCode().c_str()).c_str(),&S) != 0) + return 0; + return S.st_size; +} + /*}}}*/ +// TranslationsIndex::Merge - Load the index file into a cache /*{{{*/ +// --------------------------------------------------------------------- +/* */ +bool debTranslationsIndex::Merge(pkgCacheGenerator &Gen,OpProgress &Prog) const +{ + // Check the translation file, if in use + string TranslationFile = IndexFile(LanguageCode().c_str()); + if (TranslationsAvailable() && FileExists(TranslationFile)) + { + FileFd Trans(TranslationFile,FileFd::ReadOnly); + debListParser TransParser(&Trans); + if (_error->PendingError() == true) + return false; + + Prog.SubProgress(0, Info(TranslationFile.c_str())); + if (Gen.SelectFile(TranslationFile,string(),*this) == false) + return _error->Error("Problem with SelectFile %s",TranslationFile.c_str()); + + // Store the IMS information + pkgCache::PkgFileIterator TransFile = Gen.GetCurFile(); + struct stat TransSt; + if (fstat(Trans.Fd(),&TransSt) != 0) + return _error->Errno("fstat","Failed to stat"); + TransFile->Size = TransSt.st_size; + TransFile->mtime = TransSt.st_mtime; + + if (Gen.MergeList(TransParser) == false) + return _error->Error("Problem with MergeList %s",TranslationFile.c_str()); + } + + return true; +} + /*}}}*/ +// TranslationsIndex::FindInCache - Find this index /*{{{*/ +// --------------------------------------------------------------------- +/* */ +pkgCache::PkgFileIterator debTranslationsIndex::FindInCache(pkgCache &Cache) const +{ + string FileName = IndexFile(LanguageCode().c_str()); + + pkgCache::PkgFileIterator File = Cache.FileBegin(); + for (; File.end() == false; File++) + { + if (FileName != File.FileName()) + continue; + + struct stat St; + if (stat(File.FileName(),&St) != 0) + return pkgCache::PkgFileIterator(Cache); + if ((unsigned)St.st_size != File->Size || St.st_mtime != File->mtime) + return pkgCache::PkgFileIterator(Cache); + return File; + } + return File; +} + /*}}}*/ // StatusIndex::debStatusIndex - Constructor /*{{{*/ // --------------------------------------------------------------------- /* */ @@@ -580,11 -412,6 +576,11 @@@ class debIFTypePkg : public pkgIndexFil }; debIFTypePkg() {Label = "Debian Package Index";}; }; +class debIFTypeTrans : public debIFTypePkg +{ + public: + debIFTypeTrans() {Label = "Debian Translation Index";}; +}; class debIFTypeStatus : public pkgIndexFile::Type { public: @@@ -597,7 -424,6 +593,7 @@@ }; static debIFTypeSrc _apt_Src; static debIFTypePkg _apt_Pkg; +static debIFTypeTrans _apt_Trans; static debIFTypeStatus _apt_Status; const pkgIndexFile::Type *debSourcesIndex::GetType() const @@@ -608,10 -434,6 +604,10 @@@ const pkgIndexFile::Type *debPackagesIn { return &_apt_Pkg; } +const pkgIndexFile::Type *debTranslationsIndex::GetType() const +{ + return &_apt_Trans; +} const pkgIndexFile::Type *debStatusIndex::GetType() const { return &_apt_Status; diff --combined apt-pkg/deb/debmetaindex.cc index 8cf31b326,6830f9e83..73b2dda49 --- a/apt-pkg/deb/debmetaindex.cc +++ b/apt-pkg/deb/debmetaindex.cc @@@ -1,9 -1,5 +1,5 @@@ // ijones, walters - #ifdef __GNUG__ - #pragma implementation "apt-pkg/debmetaindex.h" - #endif - #include #include #include @@@ -157,16 -153,6 +153,16 @@@ bool debReleaseIndex::GetIndexes(pkgAcq ComputeIndexTargets(), new indexRecords (Dist)); + // Queue the translations + for (vector::const_iterator I = SectionEntries.begin(); + I != SectionEntries.end(); I++) { + + if((*I)->IsSrc) + continue; + debTranslationsIndex i = debTranslationsIndex(URI,Dist,(*I)->Section); + i.GetIndexes(Owner); + } + return true; } @@@ -191,16 -177,11 +187,16 @@@ vector *debReleaseInde Indexes = new vector ; for (vector::const_iterator I = SectionEntries.begin(); - I != SectionEntries.end(); I++) + I != SectionEntries.end(); I++) { if ((*I)->IsSrc) Indexes->push_back(new debSourcesIndex (URI, Dist, (*I)->Section, IsTrusted())); else + { Indexes->push_back(new debPackagesIndex (URI, Dist, (*I)->Section, IsTrusted())); + Indexes->push_back(new debTranslationsIndex(URI, Dist, (*I)->Section)); + } + } + return Indexes; } diff --combined apt-pkg/deb/debrecords.cc index 2aa47e343,6ecbd15d6..8a5b6e215 --- a/apt-pkg/deb/debrecords.cc +++ b/apt-pkg/deb/debrecords.cc @@@ -8,13 -8,8 +8,10 @@@ ##################################################################### */ /*}}}*/ // Include Files /*{{{*/ - #ifdef __GNUG__ - #pragma implementation "apt-pkg/debrecords.h" - #endif #include +#include #include +#include /*}}}*/ // RecordParser::debRecordParser - Constructor /*{{{*/ @@@ -32,10 -27,6 +29,10 @@@ debRecordParser::debRecordParser(strin bool debRecordParser::Jump(pkgCache::VerFileIterator const &Ver) { return Tags.Jump(Section,Ver->Offset); +} +bool debRecordParser::Jump(pkgCache::DescFileIterator const &Desc) +{ + return Tags.Jump(Section,Desc->Offset); } /*}}}*/ // RecordParser::FileName - Return the archive filename on the site /*{{{*/ @@@ -67,7 -58,7 +64,7 @@@ string debRecordParser::MD5Hash( /* */ string debRecordParser::SHA1Hash() { - return Section.FindS("SHA1Sum"); + return Section.FindS("SHA1"); } /*}}}*/ // RecordParser::Maintainer - Return the maintainer email /*{{{*/ @@@ -83,7 -74,7 +80,7 @@@ string debRecordParser::Maintainer( /* */ string debRecordParser::ShortDesc() { - string Res = Section.FindS("Description"); + string Res = LongDesc(); string::size_type Pos = Res.find('\n'); if (Pos == string::npos) return Res; @@@ -95,60 -86,21 +92,60 @@@ /* */ string debRecordParser::LongDesc() { - return Section.FindS("Description"); + string orig, dest; + char *codeset = nl_langinfo(CODESET); + + if (!Section.FindS("Description").empty()) + orig = Section.FindS("Description").c_str(); + else + orig = Section.FindS(("Description-" + pkgIndexFile::LanguageCode()).c_str()).c_str(); + + if (strcmp(codeset,"UTF-8") != 0) { + UTF8ToCodeset(codeset, orig, &dest); + orig = dest; + } + + return orig; } /*}}}*/ + +static const char *SourceVerSeparators = " ()"; + // RecordParser::SourcePkg - Return the source package name if any /*{{{*/ // --------------------------------------------------------------------- /* */ string debRecordParser::SourcePkg() { string Res = Section.FindS("Source"); - string::size_type Pos = Res.find(' '); + string::size_type Pos = Res.find_first_of(SourceVerSeparators); if (Pos == string::npos) return Res; return string(Res,0,Pos); } /*}}}*/ +// RecordParser::SourceVer - Return the source version number if present /*{{{*/ +// --------------------------------------------------------------------- +/* */ +string debRecordParser::SourceVer() +{ + string Pkg = Section.FindS("Source"); + string::size_type Pos = Pkg.find_first_of(SourceVerSeparators); + if (Pos == string::npos) + return ""; + + string::size_type VerStart = Pkg.find_first_not_of(SourceVerSeparators, Pos); + if(VerStart == string::npos) + return ""; + + string::size_type VerEnd = Pkg.find_first_of(SourceVerSeparators, VerStart); + if(VerEnd == string::npos) + // Corresponds to the case of, e.g., "foo (1.2" without a closing + // paren. Be liberal and guess what it means. + return string(Pkg, VerStart); + else + return string(Pkg, VerStart, VerEnd - VerStart); +} + /*}}}*/ // RecordParser::GetRec - Return the whole record /*{{{*/ // --------------------------------------------------------------------- /* */ diff --combined apt-pkg/deb/debsrcrecords.cc index 7d5dab747,21d7392a0..fcd9bb901 --- a/apt-pkg/deb/debsrcrecords.cc +++ b/apt-pkg/deb/debsrcrecords.cc @@@ -9,17 -9,11 +9,13 @@@ ##################################################################### */ /*}}}*/ // Include Files /*{{{*/ - #ifdef __GNUG__ - #pragma implementation "apt-pkg/debsrcrecords.h" - #endif - #include #include #include #include #include + +using std::max; /*}}}*/ // SrcRecordParser::Binaries - Return the binaries field /*{{{*/ @@@ -36,19 -30,31 +32,19 @@@ const char **debSrcRecordParser::Binari if (Bins.empty() == true || Bins.length() >= 102400) return 0; - // Workaround for #236688. Only allocate a new buffer if the field - // is large, to avoid a performance penalty - char *BigBuf = NULL; - char *Buf; - if (Bins.length() > sizeof(Buffer)) - { - BigBuf = new char[Bins.length()]; - Buf = BigBuf; - } - else + if (Bins.length() >= BufSize) { - Buf = Buffer; + delete [] Buffer; + // allocate new size based on buffer (but never smaller than 4000) + BufSize = max((unsigned int)4000, max((unsigned int)Bins.length()+1,2*BufSize)); + Buffer = new char[BufSize]; } - strcpy(Buf,Bins.c_str()); - if (TokSplitString(',',Buf,StaticBinList, + strcpy(Buffer,Bins.c_str()); + if (TokSplitString(',',Buffer,StaticBinList, sizeof(StaticBinList)/sizeof(StaticBinList[0])) == false) - { - if (BigBuf != NULL) - delete BigBuf; return 0; - } - if (BigBuf != NULL) - delete BigBuf; return (const char **)StaticBinList; } /*}}}*/ diff --combined apt-pkg/deb/dpkgpm.cc index cebdafe7d,905ac93c4..e5506d3bf --- a/apt-pkg/deb/dpkgpm.cc +++ b/apt-pkg/deb/dpkgpm.cc @@@ -8,9 -8,6 +8,6 @@@ ##################################################################### */ /*}}}*/ // Includes /*{{{*/ - #ifdef __GNUG__ - #pragma implementation "apt-pkg/dpkgpm.h" - #endif #include #include #include @@@ -474,8 -471,6 +471,8 @@@ bool pkgDPkgPM::Go(int OutStatusFd case Item::Install: Args[n++] = "--unpack"; Size += strlen(Args[n-1]); + Args[n++] = "--auto-deconfigure"; + Size += strlen(Args[n-1]); break; } @@@ -626,22 -621,15 +623,22 @@@ */ char* list[5]; - if(!TokSplitString(':', line, list, sizeof(list)/sizeof(list[0]))) - // FIXME: dpkg sends multiline error messages sometimes (see - // #374195 for a example. we should support this by - // either patching dpkg to not send multiline over the - // statusfd or by rewriting the code here to deal with - // it. for now we just ignore it and not crash - continue; + // dpkg sends multiline error messages sometimes (see + // #374195 for a example. we should support this by + // either patching dpkg to not send multiline over the + // statusfd or by rewriting the code here to deal with + // it. for now we just ignore it and not crash + TokSplitString(':', line, list, sizeof(list)/sizeof(list[0])); char *pkg = list[1]; char *action = _strstrip(list[2]); + if( pkg == NULL || action == NULL) + { + if (_config->FindB("Debug::pkgDPkgProgressReporting",false) == true) + std::clog << "ignoring line: not enough ':'" << std::endl; + // reset the line buffer + line[0]=0; + continue; + } if(strncmp(action,"error",strlen("error")) == 0) { @@@ -713,23 -701,14 +710,23 @@@ // Check for an error code. if (WIFEXITED(Status) == 0 || WEXITSTATUS(Status) != 0) { - RunScripts("DPkg::Post-Invoke"); - if (WIFSIGNALED(Status) != 0 && WTERMSIG(Status) == SIGSEGV) - return _error->Error("Sub-process %s received a segmentation fault.",Args[0]); - - if (WIFEXITED(Status) != 0) - return _error->Error("Sub-process %s returned an error code (%u)",Args[0],WEXITSTATUS(Status)); + // if it was set to "keep-dpkg-runing" then we won't return + // here but keep the loop going and just report it as a error + // for later + bool stopOnError = _config->FindB("Dpkg::StopOnError",true); - return _error->Error("Sub-process %s exited unexpectedly",Args[0]); + if(stopOnError) + RunScripts("DPkg::Post-Invoke"); + + if (WIFSIGNALED(Status) != 0 && WTERMSIG(Status) == SIGSEGV) + _error->Error("Sub-process %s received a segmentation fault.",Args[0]); + else if (WIFEXITED(Status) != 0) + _error->Error("Sub-process %s returned an error code (%u)",Args[0],WEXITSTATUS(Status)); + else + _error->Error("Sub-process %s exited unexpectedly",Args[0]); + + if(stopOnError) + return false; } } diff --combined apt-pkg/indexfile.cc index bb2210bf6,63f692c1d..ca11fc111 --- a/apt-pkg/indexfile.cc +++ b/apt-pkg/indexfile.cc @@@ -8,15 -8,8 +8,11 @@@ ##################################################################### */ /*}}}*/ // Include Files /*{{{*/ - #ifdef __GNUG__ - #pragma implementation "apt-pkg/indexfile.h" - #endif - +#include #include #include + +#include /*}}}*/ // Global list of Item supported @@@ -70,63 -63,3 +66,63 @@@ string pkgIndexFile::SourceInfo(pkgSrcR return string(); } /*}}}*/ +// IndexFile::TranslationsAvailable - Check if will use Translation /*{{{*/ +// --------------------------------------------------------------------- +/* */ +bool pkgIndexFile::TranslationsAvailable() +{ + const string Translation = _config->Find("APT::Acquire::Translation"); + + if (Translation.compare("none") != 0) + return CheckLanguageCode(LanguageCode().c_str()); + else + return false; +} + /*}}}*/ +// IndexFile::CheckLanguageCode - Check the Language Code /*{{{*/ +// --------------------------------------------------------------------- +/* */ +/* common cases: de_DE, de_DE@euro, de_DE.UTF-8, de_DE.UTF-8@euro, + de_DE.ISO8859-1, tig_ER + more in /etc/gdm/locale.conf +*/ + +bool pkgIndexFile::CheckLanguageCode(const char *Lang) +{ + if (strlen(Lang) == 2 || (strlen(Lang) == 5 && Lang[2] == '_')) + return true; + + if (strcmp(Lang,"C") != 0) + _error->Warning("Wrong language code %s", Lang); + + return false; +} + /*}}}*/ +// IndexFile::LanguageCode - Return the Language Code /*{{{*/ +// --------------------------------------------------------------------- +/* return the language code */ +string pkgIndexFile::LanguageCode() +{ + const string Translation = _config->Find("APT::Acquire::Translation"); + + if (Translation.compare("environment") == 0) + { + string lang = std::setlocale(LC_MESSAGES,NULL); + + // we have a mapping of the language codes that contains all the language + // codes that need the country code as well + // (like pt_BR, pt_PT, sv_SE, zh_*, en_*) + char *need_full_langcode[] = { "pt","sv","zh","en", NULL }; + for(char **s = need_full_langcode;*s != NULL; s++) + if(lang.find(*s) == 0) + return lang.substr(0,5); + + if(lang.size() > 2) + return lang.substr(0,2); + else + return lang; + } + else + return Translation; +} + /*}}}*/ diff --combined apt-pkg/orderlist.cc index 61d8d914e,7302f02b6..616714e29 --- a/apt-pkg/orderlist.cc +++ b/apt-pkg/orderlist.cc @@@ -63,9 -63,6 +63,6 @@@ ##################################################################### */ /*}}}*/ // Include Files /*{{{*/ - #ifdef __GNUG__ - #pragma implementation "apt-pkg/orderlist.h" - #endif #include #include #include @@@ -491,13 -488,11 +488,13 @@@ bool pkgOrderList::VisitProvides(DepIte continue; if (D->Type != pkgCache::Dep::Conflicts && + D->Type != pkgCache::Dep::DpkgBreaks && D->Type != pkgCache::Dep::Obsoletes && Cache[Pkg].InstallVer != *I) continue; if ((D->Type == pkgCache::Dep::Conflicts || + D->Type == pkgCache::Dep::DpkgBreaks || D->Type == pkgCache::Dep::Obsoletes) && (Version *)Pkg.CurrentVer() != *I) continue; @@@ -632,7 -627,6 +629,7 @@@ bool pkgOrderList::DepUnPackCrit(DepIte /* Forward critical dependencies MUST be correct before the package can be unpacked. */ if (D->Type != pkgCache::Dep::Conflicts && + D->Type != pkgCache::Dep::DpkgBreaks && D->Type != pkgCache::Dep::Obsoletes && D->Type != pkgCache::Dep::PreDepends) continue; @@@ -671,7 -665,7 +668,7 @@@ } return true; } - /*}}}*/ + // OrderList::DepUnPackPreD - Critical UnPacking ordering with depends /*{{{*/ // --------------------------------------------------------------------- /* Critical PreDepends (also configure immediate and essential) strives to @@@ -806,20 -800,9 +803,20 @@@ bool pkgOrderList::DepUnPackDep(DepIter return false; } else + { if (D->Type == pkgCache::Dep::Depends) if (VisitProvides(D,false) == false) return false; + + if (D->Type == pkgCache::Dep::DpkgBreaks) + { + if (CheckDep(D) == true) + continue; + + if (VisitNode(D.TargetPkg()) == false) + return false; + } + } } return true; } @@@ -967,7 -950,6 +964,7 @@@ bool pkgOrderList::CheckDep(DepIterato /* Conflicts requires that all versions are not present, depends just needs one */ if (D->Type != pkgCache::Dep::Conflicts && + D->Type != pkgCache::Dep::DpkgBreaks && D->Type != pkgCache::Dep::Obsoletes) { /* Try to find something that does not have the after flag set diff --combined apt-pkg/packagemanager.cc index 1e57d6455,8b94e1206..10e2858ed --- a/apt-pkg/packagemanager.cc +++ b/apt-pkg/packagemanager.cc @@@ -13,10 -13,6 +13,6 @@@ ##################################################################### */ /*}}}*/ // Include Files /*{{{*/ - #ifdef __GNUG__ - #pragma implementation "apt-pkg/packagemanager.h" - #endif - #include #include #include @@@ -95,10 -91,9 +91,10 @@@ bool pkgPackageManager::GetArchives(pkg be downloaded. */ bool pkgPackageManager::FixMissing() { + pkgDepCache::ActionGroup group(Cache); pkgProblemResolver Resolve(&Cache); List->SetFileList(FileNames); - + bool Bad = false; for (PkgIterator I = Cache.PkgBegin(); I.end() == false; I++) { @@@ -107,7 -102,7 +103,7 @@@ // Okay, this file is missing and we need it. Mark it for keep Bad = true; - Cache.MarkKeep(I); + Cache.MarkKeep(I, false, false); } // We have to empty the list otherwise it will not have the new changes @@@ -632,11 -627,14 +628,11 @@@ pkgPackageManager::OrderResult pkgPacka // --------------------------------------------------------------------- /* This uses the filenames in FileNames and the information in the DepCache to perform the installation of packages.*/ -pkgPackageManager::OrderResult pkgPackageManager::DoInstall(int status_fd) +pkgPackageManager::OrderResult pkgPackageManager::DoInstall(int statusFd) { - OrderResult Res = OrderInstall(); - if(Debug) - std::clog << "OrderInstall() returned: " << Res << std::endl; - if (Res != Failed) - if (Go(status_fd) == false) - return Failed; - return Res; + if(DoInstallPreFork() == Failed) + return Failed; + + return DoInstallPostFork(statusFd); } /*}}}*/ diff --combined apt-pkg/pkgcachegen.cc index 8ec6a1719,1c93b32a3..ce9b96980 --- a/apt-pkg/pkgcachegen.cc +++ b/apt-pkg/pkgcachegen.cc @@@ -10,10 -10,6 +10,6 @@@ ##################################################################### */ /*}}}*/ // Include Files /*{{{*/ - #ifdef __GNUG__ - #pragma implementation "apt-pkg/pkgcachegen.h" - #endif - #define APT_COMPATIBILITY 986 #include @@@ -26,8 -22,6 +22,8 @@@ #include #include +#include + #include #include @@@ -127,46 -121,16 +123,46 @@@ bool pkgCacheGenerator::MergeList(ListP string Version = List.Version(); if (Version.empty() == true) { + // we first process the package, then the descriptions + // (this has the bonus that we get MMap error when we run out + // of MMap space) if (List.UsePackage(Pkg,pkgCache::VerIterator(Cache)) == false) return _error->Error(_("Error occurred while processing %s (UsePackage1)"), PackageName.c_str()); + + // Find the right version to write the description + MD5SumValue CurMd5 = List.Description_md5(); + pkgCache::VerIterator Ver = Pkg.VersionList(); + map_ptrloc *LastVer = &Pkg->VersionList; + + for (; Ver.end() == false; LastVer = &Ver->NextVer, Ver++) + { + pkgCache::DescIterator Desc = Ver.DescriptionList(); + map_ptrloc *LastDesc = &Ver->DescriptionList; + + for (; Desc.end() == false; LastDesc = &Desc->NextDesc, Desc++) + { + + if (MD5SumValue(Desc.md5()) == CurMd5) + { + // Add new description + *LastDesc = NewDescription(Desc, List.DescriptionLanguage(), CurMd5, *LastDesc); + Desc->ParentPkg = Pkg.Index(); + + if (NewFileDesc(Desc,List) == false) + return _error->Error(_("Error occured while processing %s (NewFileDesc1)"),PackageName.c_str()); + break; + } + } + } + continue; } pkgCache::VerIterator Ver = Pkg.VersionList(); - map_ptrloc *Last = &Pkg->VersionList; + map_ptrloc *LastVer = &Pkg->VersionList; int Res = 1; - for (; Ver.end() == false; Last = &Ver->NextVer, Ver++) + for (; Ver.end() == false; LastVer = &Ver->NextVer, Ver++) { Res = Cache.VS->CmpVersion(Version,Ver.VerStr()); if (Res >= 0) @@@ -200,7 -164,7 +196,7 @@@ // Skip to the end of the same version set. if (Res == 0) { - for (; Ver.end() == false; Last = &Ver->NextVer, Ver++) + for (; Ver.end() == false; LastVer = &Ver->NextVer, Ver++) { Res = Cache.VS->CmpVersion(Version,Ver.VerStr()); if (Res != 0) @@@ -209,10 -173,9 +205,10 @@@ } // Add a new version - *Last = NewVersion(Ver,Version,*Last); + *LastVer = NewVersion(Ver,Version,*LastVer); Ver->ParentPkg = Pkg.Index(); Ver->Hash = Hash; + if (List.NewVersion(Ver) == false) return _error->Error(_("Error occurred while processing %s (NewVersion1)"), PackageName.c_str()); @@@ -232,21 -195,6 +228,21 @@@ FoundFileDeps |= List.HasFileDeps(); return true; } + + /* Record the Description data. Description data always exist in + Packages and Translation-* files. */ + pkgCache::DescIterator Desc = Ver.DescriptionList(); + map_ptrloc *LastDesc = &Ver->DescriptionList; + + // Skip to the end of description set + for (; Desc.end() == false; LastDesc = &Desc->NextDesc, Desc++); + + // Add new description + *LastDesc = NewDescription(Desc, List.DescriptionLanguage(), List.Description_md5(), *LastDesc); + Desc->ParentPkg = Pkg.Index(); + + if (NewFileDesc(Desc,List) == false) + return _error->Error(_("Error occured while processing %s (NewFileDesc2)"),PackageName.c_str()); } FoundFileDeps |= List.HasFileDeps(); @@@ -257,9 -205,6 +253,9 @@@ if (Cache.HeaderP->VersionCount >= (1ULL<<(sizeof(Cache.VerP->ID)*8))-1) return _error->Error(_("Wow, you exceeded the number of versions " "this APT is capable of.")); + if (Cache.HeaderP->DescriptionCount >= (1ULL<<(sizeof(Cache.DescP->ID)*8))-1) + return _error->Error(_("Wow, you exceeded the number of descriptions " + "this APT is capable of.")); if (Cache.HeaderP->DependsCount >= (1ULL<<(sizeof(Cache.DepP->ID)*8))-1ULL) return _error->Error(_("Wow, you exceeded the number of dependencies " "this APT is capable of.")); @@@ -322,7 -267,7 +318,7 @@@ bool pkgCacheGenerator::NewPackage(pkgC Pkg = Cache.FindPkg(Name); if (Pkg.end() == false) return true; - + // Get a structure unsigned long Package = Map.Allocate(sizeof(pkgCache::Package)); if (Package == 0) @@@ -400,62 -345,6 +396,62 @@@ unsigned long pkgCacheGenerator::NewVer return Version; } /*}}}*/ +// CacheGenerator::NewFileDesc - Create a new File<->Desc association /*{{{*/ +// --------------------------------------------------------------------- +/* */ +bool pkgCacheGenerator::NewFileDesc(pkgCache::DescIterator &Desc, + ListParser &List) +{ + if (CurrentFile == 0) + return true; + + // Get a structure + unsigned long DescFile = Map.Allocate(sizeof(pkgCache::DescFile)); + if (DescFile == 0) + return 0; + + pkgCache::DescFileIterator DF(Cache,Cache.DescFileP + DescFile); + DF->File = CurrentFile - Cache.PkgFileP; + + // Link it to the end of the list + map_ptrloc *Last = &Desc->FileList; + for (pkgCache::DescFileIterator D = Desc.FileList(); D.end() == false; D++) + Last = &D->NextFile; + + DF->NextFile = *Last; + *Last = DF.Index(); + + DF->Offset = List.Offset(); + DF->Size = List.Size(); + if (Cache.HeaderP->MaxDescFileSize < DF->Size) + Cache.HeaderP->MaxDescFileSize = DF->Size; + Cache.HeaderP->DescFileCount++; + + return true; +} + /*}}}*/ +// CacheGenerator::NewDescription - Create a new Description /*{{{*/ +// --------------------------------------------------------------------- +/* This puts a description structure in the linked list */ +map_ptrloc pkgCacheGenerator::NewDescription(pkgCache::DescIterator &Desc, + const string &Lang, const MD5SumValue &md5sum, + map_ptrloc Next) +{ + // Get a structure + map_ptrloc Description = Map.Allocate(sizeof(pkgCache::Description)); + if (Description == 0) + return 0; + + // Fill it in + Desc = pkgCache::DescIterator(Cache,Cache.DescP + Description); + Desc->NextDesc = Next; + Desc->ID = Cache.HeaderP->DescriptionCount++; + Desc->language_code = Map.WriteString(Lang); + Desc->md5sum = Map.WriteString(md5sum.Value()); + + return Description; +} + /*}}}*/ // ListParser::NewDepends - Create a dependency element /*{{{*/ // --------------------------------------------------------------------- /* This creates a dependency element in the tree. It is linked to the @@@ -678,10 -567,8 +674,10 @@@ static bool CheckValidity(const string if ((*Start)->Exists() == false) { +#if 0 // mvo: we no longer give a message here (Default Sources spec) _error->WarningE("stat",_("Couldn't stat source package list %s"), (*Start)->Describe().c_str()); +#endif continue; } @@@ -689,7 -576,7 +685,7 @@@ pkgCache::PkgFileIterator File = (*Start)->FindInCache(Cache); if (File.end() == true) return false; - + Visited[File->ID] = true; } @@@ -785,7 -672,7 +781,7 @@@ static bool BuildCache(pkgCacheGenerato bool pkgMakeStatusCache(pkgSourceList &List,OpProgress &Progress, MMap **OutMap,bool AllowMem) { - unsigned long MapSize = _config->FindI("APT::Cache-Limit",12*1024*1024); + unsigned long MapSize = _config->FindI("APT::Cache-Limit",16*1024*1024); vector Files; for (vector::const_iterator i = List.begin(); @@@ -932,7 -819,7 +928,7 @@@ /* */ bool pkgMakeOnlyStatusCache(OpProgress &Progress,DynamicMMap **OutMap) { - unsigned long MapSize = _config->FindI("APT::Cache-Limit",8*1024*1024); + unsigned long MapSize = _config->FindI("APT::Cache-Limit",12*1024*1024); vector Files; unsigned long EndOfSource = Files.size(); if (_system->AddStatusFiles(Files) == false) diff --combined apt-pkg/pkgrecords.cc index b22f3e73f,dc43735a6..0aaa2096a --- a/apt-pkg/pkgrecords.cc +++ b/apt-pkg/pkgrecords.cc @@@ -9,9 -9,6 +9,6 @@@ ##################################################################### */ /*}}}*/ // Include Files /*{{{*/ - #ifdef __GNUG__ - #pragma implementation "apt-pkg/pkgrecords.h" - #endif #include #include #include @@@ -63,12 -60,3 +60,12 @@@ pkgRecords::Parser &pkgRecords::Lookup( return *Files[Ver.File()->ID]; } /*}}}*/ +// Records::Lookup - Get a parser for the package description file /*{{{*/ +// --------------------------------------------------------------------- +/* */ +pkgRecords::Parser &pkgRecords::Lookup(pkgCache::DescFileIterator const &Desc) +{ + Files[Desc.File()->ID]->Jump(Desc); + return *Files[Desc.File()->ID]; +} + /*}}}*/ diff --combined apt-pkg/policy.cc index 35a50425b,795f1d787..8b083fd44 --- a/apt-pkg/policy.cc +++ b/apt-pkg/policy.cc @@@ -23,9 -23,6 +23,6 @@@ ##################################################################### */ /*}}}*/ // Include Files /*{{{*/ - #ifdef __GNUG__ - #pragma implementation "apt-pkg/policy.h" - #endif #include #include #include @@@ -36,7 -33,6 +33,7 @@@ #include #include +#include /*}}}*/ using namespace std; @@@ -301,13 -297,7 +298,13 @@@ bool ReadPinFile(pkgPolicy &Plcy,strin continue; } - Plcy.CreatePin(Type,Name,string(Word,End),priority); + istringstream s(Name); + string pkg; + while(!s.eof()) + { + s >> pkg; + Plcy.CreatePin(Type, pkg, string(Word,End),priority); + }; } Plcy.InitDefaults(); diff --combined apt-pkg/tagfile.cc index 649c93aee,85e6abfd7..893cb8ee7 --- a/apt-pkg/tagfile.cc +++ b/apt-pkg/tagfile.cc @@@ -11,10 -11,6 +11,6 @@@ ##################################################################### */ /*}}}*/ // Include Files /*{{{*/ - #ifdef __GNUG__ - #pragma implementation "apt-pkg/tagfile.h" - #endif - #include #include #include @@@ -423,7 -419,6 +419,7 @@@ static const char *iTFRewritePackageOrd "Recommends", "Suggests", "Conflicts", + "Breaks", "Conffiles", "Filename", "Size", diff --combined debian/changelog index 05e3b58ef,6aaa473d9..41609bd74 --- a/debian/changelog +++ b/debian/changelog @@@ -1,205 -1,8 +1,207 @@@ +apt (0.7.2) unstable; urgency=low + + * merged the debian/experimental changes back + into the debian/sid branch + * merged from Christian Perrier: + * mr.po: New Marathi translation Closes: #416806 + * zh_CN.po: Updated by Eric Pareja Closes: #416822 + * tl.po: Updated by Eric Pareja Closes: #416638 + * gl.po: Updated by Jacobo Tarrio + Closes: #412828 + * da.po: Updated by Claus Hindsgaul + Closes: #409483 + * fr.po: Remove a non-breakable space for usability + issues. Closes: #408877 + * ru.po: Updated Russian translation. Closes: #405476 + * *.po: Unfuzzy after upstream typo corrections + * buildlib/archtable: + - added support for sh3/sh4 (closes: #424870) + - added support for m32r (closes: #394096) + * buildlib/systemtable: + - added support for lpia + * configure.in: + - check systemtable for architecture mapping too + * fix error in AutocleanInterval, closes: #319339 + (thanks to Israel G. Lugo for the patch) + * add "purge" commandline argument, closes: #133421) + (thanks to Julien Danjou for the patch) + * add "purge" commandline argument, closes: #133421) + (thanks to Julien Danjou for the patch) + * fix FTBFS with gcc 4.3, closes: #417090 + (thanks to Martin Michlmayr for the patch) + * add --dsc-only option, thanks to K. Richard Pixley ++ * Removed the more leftover #pragma interface/implementation ++ closes: #306937 (thanks to Andreas Henriksson for the patch) + + -- Michael Vogt Wed, 06 Jun 2007 23:19:50 +0200 + +apt (0.7.1) experimental; urgency=low + + * ABI library name change because its build against + new glibc + * implement SourceVer() in pkgRecords + (thanks to Daniel Burrows for the patch!) + * apt-pkg/algorithm.cc: + - use clog for all debugging + - only increase the score of installed applications if they + are not obsolete + - fix resolver bug on removal triggered by weak-dependencies + with or-groups + * methods/http.cc: + - send apt version in User-Agent + * apt-pkg/deb/debrecords.cc: + - fix SHA1Hash() return value + * apt-pkg/cdrom.cc: + - only unmount if APT::CDROM::NoMount is false + * methods/cdrom.cc: + - only umount if it was mounted by the method before + * po/gl.po: + - fix error translation that causes trouble to lsb_release + * apt-pkg/acquire-item.cc: + - if decompression of a index fails, delete the index + * apt-pkg/acquire.{cc,h}: + - deal better with duplicated sources.list entries (avoid + double queuing of URLs) - this fixes hangs in bzip/gzip + * merged from Christian Perrier: + * mr.po: New Marathi translation Closes: #416806 + * zh_CN.po: Updated by Eric Pareja Closes: #416822 + * tl.po: Updated by Eric Pareja Closes: #416638 + * gl.po: Updated by Jacobo Tarrio + Closes: #412828 + * da.po: Updated by Claus Hindsgaul + Closes: #409483 + * fr.po: Remove a non-breakable space for usability + issues. Closes: #408877 + * ru.po: Updated Russian translation. Closes: #405476 + * *.po: Unfuzzy after upstream typo corrections + * vi.po: Updated to 515t. Closes: #426976 + * eu.po: Updated to 515t. Closes: #423766 + * pt.po: 515t. Closes: #423111 + * fr.po: Updated by Christian Perrier + * Update all PO and the POT. Gives 513t2f for formerly + complete translations + * apt-pkg/policy.cc: + - allow multiple packages (thanks to David Foerster) + + -- Michael Vogt Wed, 2 May 2007 13:43:44 +0200 + +apt (0.7.0) experimental; urgency=low + + * Package that contains tall the new features + * Removed all #pragma interface/implementation + * Branch that contains tall the new features: + * translated package descriptions + * task install support + * automatic dependency removal (thanks to Daniel Burrows) + * merged support for the new dpkg "Breaks" field + (thanks to Ian Jackson) + * handle network failures more gracefully on "update" + * support for unattended-upgrades (via unattended-upgrades + package) + * added apt-transport-https method + + -- Michael Vogt Fri, 12 Jan 2007 20:48:07 +0100 + +apt (0.6.46.4-0.1) unstable; urgency=emergency + + * NMU + * Fix broken use of awk in apt-key that caused removal of the wrong keys + from the keyring. Closes: #412572 + + -- Joey Hess Mon, 26 Feb 2007 16:00:22 -0500 + +apt (0.6.46.4) unstable; urgency=high + + * ack NMU (closes: #401017) + * added apt-secure.8 to "See also" section + * apt-pkg/deb/dpkgpm.cc: + - added "Dpkg::StopOnError" variable that controls if apt + will abort on errors from dpkg + * apt-pkg/deb/debsrcrecords.{cc,h}: + - make the Buffer grow dynmaically (closes: #400874) + * Merged from Christian Perrier bzr branch: + - uk.po: New Ukrainian translation: 483t28f3u + - el.po: Update to 503t9f2u + - de.po: Updates and corrections. + * apt-pkg/contrib/progress.cc: + - OpProgress::CheckChange optimized, thanks to Paul Brook + (closes: #398381) + * apt-pkg/contrib/sha256.cc: + - fix building with noopt + + -- Michael Vogt Thu, 7 Dec 2006 10:49:50 +0100 + +apt (0.6.46.3-0.2) unstable; urgency=high + + * Non-maintainer upload with permission of Michael Vogt. + * Fix FTBFS on most arches (regression from the fix of #400874) + + -- Andreas Barth Tue, 5 Dec 2006 15:51:22 +0000 + +apt (0.6.46.3-0.1) unstable; urgency=high + + * Non-maintainer upload with permission of Michael Vogt. + * Fix segfault at apt-get source. Closes: #400874 + * Add apt-key update in postinst, so that debian-archive-keyring doesn't + need to depend on apt >= 0.6. Closes: #401114 + * Don't double-queue pdiff files. Closes: #401017 + + -- Andreas Barth Tue, 5 Dec 2006 10:34:56 +0000 + +apt (0.6.46.3) unstable; urgency=low + + * apt-pkg/deb/dpkgpm.cc: + - make progress reporting robust against multiline error + messages + + * Merged from Christian Perrier bzr branch: + - ca.po: Updated to 514t + - be.po: Updated to 514t + - it.po: Updated to 514t + - hu.po: Updated to 514t + - zh_TW.po: Updated to 514t + - ar.po: Updated to 293t221u. + - ru.po: Updated to 514t. Closes: #392466 + - nb.po: Updated to 514t. Closes: #392466 + - pt.po: Updated to 514t. Closes: #393199 + - fr.po: One spelling error corrected: s/accèder/accéder + - km.po: Updated to 514t. + - ko.po: Updated to 514t. + - bg.po: Updated to 514t. + - de.po: Updated to 514t. + - en_GB.po: Updated to 514t. + + -- Michael Vogt Thu, 2 Nov 2006 11:37:58 +0100 + +apt (0.6.46.2) unstable; urgency=low + + * debian/control: + - depend on debian-archive-keyring to offer clean upgrade path + (closes: #386800) + * Merged from Christian Perrier bzr branch: + - es.po: Updated to 514t. Closes: #391661 + - da.po: Updated to 514t. Closes: #391424 + - cs.po: Updated. Closes: #391064 + - es.po: Updated to 514t. Closes: #391661 + - da.po: Updated to 514t. Closes: #391424 + + -- Michael Vogt Wed, 11 Oct 2006 09:03:15 +0200 + apt (0.6.46.1) unstable; urgency=low + * merged "install-recommends" branch (ABI break): + - new "--install-recommends" + - install new recommends on "upgrade" if --install-recommends is + given + - new "--fix-policy" option to install all packages with unmet + important dependencies (usefull with --install-recommends to + see what not-installed recommends are on the system) + - fix of recommended packages display (only show CandidateVersion + fix or-group handling) + * merged "install-task" branch (use with "apt-get install taskname^") * methods/gzip.cc: - deal with empty files - * Applied patch from Daniel Schepler to make apt bin-NMU able. + * Applied patch from Daniel Schepler to make apt bin-NMU able. (closes: bug#359634) * rebuild against current g++ because of: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29289 @@@ -213,7 -16,7 +215,7 @@@ * make the internal buffer in pkgTagFile grow dynamically (closes: #388708) - -- Michael Vogt Mon, 2 Oct 2006 16:02:30 +0200 + -- Michael Vogt Mon, 2 Oct 2006 20:42:20 +0200 apt (0.6.46) unstable; urgency=low @@@ -287,42 -90,26 +289,42 @@@ apt (0.6.45) unstable; urgency=lo * dz.po: New Dzongkha translation: 512t * ro.po: Updated to 512t * eu.po: Updated + * eu.po: Updated + * fix apt-get dist-upgrade + * fix warning if no /var/lib/apt/extended_states is present + * don't download Translations for deb-src sources.list lines + * apt-pkg/tagfile.cc: + - support not-mmapable files again - -- Michael Vogt Thu, 27 Jul 2006 00:52:05 +0200 + -- Michael Vogt Tue, 25 Jul 2006 11:55:22 +0200 -apt (0.6.44.2) unstable; urgency=low - - * apt-pkg/depcache.cc: - - added Debug::pkgDepCache::AutoInstall (thanks to infinity) - * apt-pkg/acquire-item.cc: - - fix missing chmod() in the new aquire code - (thanks to Bastian Blank, Closes: #367425) - * merged from - http://www.perrier.eu.org/debian/packages/d-i/level4/apt-main: - * sk.po: Completed to 512t - * eu.po: Completed to 512t - * fr.po: Completed to 512t - * sv.po: Completed to 512t - * Update all PO and the POT. Gives 506t6f for formerly - complete translations - - -- Michael Vogt Wed, 14 Jun 2006 12:00:57 +0200 +apt (0.6.44.2exp1) experimental; urgency=low + + * added support for i18n of the package descriptions + * added support for aptitude like auto-install tracking (a HUGE + HUGE thanks to Daniel Burrows who made this possible) + * synced with the http://people.debian.org/~mvo/bzr/apt/debian-sid branch + * build from http://people.debian.org/~mvo/bzr/apt/debian-experimental + + -- Michael Vogt Mon, 3 Jul 2006 21:50:31 +0200 + +apt (0.6.44.2) unstable; urgency=low + + * apt-pkg/depcache.cc: + - added Debug::pkgDepCache::AutoInstall (thanks to infinity) + * apt-pkg/acquire-item.cc: + - fix missing chmod() in the new aquire code + (thanks to Bastian Blank, Closes: #367425) + * merged from + http://www.perrier.eu.org/debian/packages/d-i/level4/apt-main: + * sk.po: Completed to 512t + * eu.po: Completed to 512t + * fr.po: Completed to 512t + * sv.po: Completed to 512t + * Update all PO and the POT. Gives 506t6f for formerly + complete translations + + -- Michael Vogt Wed, 14 Jun 2006 12:00:57 +0200 apt (0.6.44.1-0.1) unstable; urgency=low @@@ -334,32 -121,22 +336,32 @@@ apt (0.6.44.1) unstable; urgency=low + * apt-pkg/acquire-item.cc: + - fix reversed logic of the "Acquire::PDiffs" option * merged from http://www.perrier.eu.org/debian/packages/d-i/level4/apt-main: - po/LINGUAS: added "bg" Closes: #360262 - po/gl.po: Galician translation update. Closes: #366849 - po/hu.po: Hungarian translation update. Closes: #365448 - po/cs.po: Czech translation updated. Closes: #367244 + * apt-pkg/contrib/sha256.cc: + - applied patch to fix unaligned access problem. Closes: #367417 + (thanks to David Mosberger) -- Michael Vogt Tue, 16 May 2006 21:51:16 +0200 apt (0.6.44) unstable; urgency=low * apt-pkg/acquire.cc: don't show ETA if it is 0 or absurdely large + * apt-pkg/contrib/sha256.{cc,h},hashes.{cc,h}: support for sha256 + (thanks to Anthony Towns) + * ftparchive/cachedb.{cc,h},writer.{cc,h}: optimizations + (thanks to Anthony Towns) + * apt pdiff support from experimental merged + * apt-pkg/deb/dpkgpm.cc: wording fixes (thanks to Matt Zimmerman) * apt-pkg/deb/dpkgpm.cc: - wording fixes (thanks to Matt Zimmerman) - - fix error in dpkg interaction (closes: #364513, - thanks to Martin Dickopp) + - fix error in dpkg interaction (closes: #364513, thanks to Martin Dickopp) * apt-pkg/tagfile.{cc,h}: - use MMap to read the entries (thanks to Zephaniah E. Hull for the patch) Closes: #350025 @@@ -554,7 -331,7 +556,7 @@@ apt (0.6.42) unstable; urgency=lo * cmdline/apt-cdrom.cc: - fix some missing gettext() calls (closes: #334539) * doc/apt-cache.8.xml: fix typo (closes: #334714) - + -- Michael Vogt Wed, 19 Oct 2005 22:02:09 +0200 apt (0.6.41) unstable; urgency=low @@@ -654,7 -431,6 +656,7 @@@ apt (0.6.37) breezy; urgency=lo * Add Welsh translation from Dafydd Harries (daf@muse.19inch.net--2005/apt--main--0--patch-1) * Change debian/bugscript to use #!/bin/bash (Closes: #313402) + * Fix a incorrect example in the man-page (closes: #282918) -- Matt Zimmerman Tue, 24 May 2005 14:38:25 -0700 diff --combined ftparchive/apt-ftparchive.cc index 4fbea13e1,d514ea16e..290326ec3 --- a/ftparchive/apt-ftparchive.cc +++ b/ftparchive/apt-ftparchive.cc @@@ -10,10 -10,6 +10,6 @@@ ##################################################################### */ /*}}}*/ // Include Files /*{{{*/ - #ifdef __GNUG__ - #pragma implementation "apt-ftparchive.h" - #endif - #include "apt-ftparchive.h" #include @@@ -24,7 -20,6 +20,7 @@@ #include #include +#include #include #include