From b4e57d2dd44728929cb83113ed79c8e16405767e Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Wed, 30 Nov 2005 13:53:44 +0000 Subject: * hack around local file:/ uri problem --- apt-pkg/acquire-item.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'apt-pkg') diff --git a/apt-pkg/acquire-item.cc b/apt-pkg/acquire-item.cc index 8a9a4c5bb..ad977dde4 100644 --- a/apt-pkg/acquire-item.cc +++ b/apt-pkg/acquire-item.cc @@ -165,11 +165,15 @@ pkgAcqDiffIndex::pkgAcqDiffIndex(pkgAcquire *Owner, CurrentPackagesFile = _config->FindDir("Dir::State::lists"); CurrentPackagesFile += URItoFileName(RealURI); + // FIXME: this file:/ check is a hack to prevent fetching + // from local sources. this is really silly, and + // should be fixed cleanly as soon as possible if(!FileExists(CurrentPackagesFile) || + Desc.URI.substr(0,strlen("file:/")) == "file:/" || !_config->FindB("Acquire::Diffs",true)) { // we don't have a pkg file or we don't want to queue if(Debug) - std::clog << "No index file or canceld by user" << std::endl; + std::clog << "No index file, local or canceld by user" << std::endl; Failed("", NULL); return; } -- cgit v1.2.3-70-g09d2 From 2ac3eeb60e9ea171cee7a05a02424e61fe50d400 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Thu, 30 Mar 2006 10:38:14 +0200 Subject: * make the code follow the apt coding standards better * change the location to turn off pdiff (APT::PDiff=false) --- apt-pkg/acquire-item.cc | 61 +++++++++++++++++++++++++++++--------------- doc/examples/configure-index | 2 ++ 2 files changed, 43 insertions(+), 20 deletions(-) (limited to 'apt-pkg') diff --git a/apt-pkg/acquire-item.cc b/apt-pkg/acquire-item.cc index ad977dde4..d845d4605 100644 --- a/apt-pkg/acquire-item.cc +++ b/apt-pkg/acquire-item.cc @@ -170,7 +170,8 @@ pkgAcqDiffIndex::pkgAcqDiffIndex(pkgAcquire *Owner, // should be fixed cleanly as soon as possible if(!FileExists(CurrentPackagesFile) || Desc.URI.substr(0,strlen("file:/")) == "file:/" || - !_config->FindB("Acquire::Diffs",true)) { + !_config->FindB("Acquire::Diffs",true)) + { // we don't have a pkg file or we don't want to queue if(Debug) std::clog << "No index file, local or canceld by user" << std::endl; @@ -178,11 +179,10 @@ pkgAcqDiffIndex::pkgAcqDiffIndex(pkgAcquire *Owner, return; } - if(Debug) { + if(Debug) std::clog << "pkgAcqIndexDiffs::pkgAcqIndexDiffs(): " << CurrentPackagesFile << std::endl; - } - + QueueURI(Desc); } @@ -237,26 +237,32 @@ bool pkgAcqDiffIndex::ParseDiffIndex(string IndexDiffFile) SHA1.AddFD(fd.Fd(), fd.Size()); local_sha1 = string(SHA1.Result()); - if(local_sha1 == ServerSha1) { + if(local_sha1 == ServerSha1) + { + // we have the same sha1 as the server if(Debug) std::clog << "Package file is up-to-date" << std::endl; // set found to true, this will queue a pkgAcqIndexDiffs with // a empty availabe_patches found = true; - } else { + } + else + { if(Debug) std::clog << "SHA1-Current: " << ServerSha1 << std::endl; // check the historie and see what patches we need string history = Tags.FindS("SHA1-History"); std::stringstream hist(history); - while(hist >> d.sha1 >> size >> d.file) { + while(hist >> d.sha1 >> size >> d.file) + { d.size = atoi(size.c_str()); // read until the first match is found if(d.sha1 == local_sha1) found=true; // from that point on, we probably need all diffs - if(found) { + if(found) + { if(Debug) std::clog << "Need to get diff: " << d.file << std::endl; available_patches.push_back(d); @@ -265,12 +271,15 @@ bool pkgAcqDiffIndex::ParseDiffIndex(string IndexDiffFile) } // no information how to get the patches, bail out - if(!found) { + if(!found) + { if(Debug) std::clog << "Can't find a patch in the index file" << std::endl; // Failed will queue a big package file Failed("", NULL); - } else { + } + else + { // queue the diffs new pkgAcqIndexDiffs(Owner, RealURI, Description, Desc.ShortDesc, ExpectedMD5, available_patches); @@ -351,10 +360,13 @@ pkgAcqIndexDiffs::pkgAcqIndexDiffs(pkgAcquire *Owner, Desc.Owner = this; Desc.ShortDesc = ShortDesc; - if(available_patches.size() == 0) { + if(available_patches.size() == 0) + { // we are done (yeah!) Finish(true); - } else { + } + else + { // get the next diff State = StateFetchDiff; QueueNextDiff(); @@ -378,7 +390,8 @@ void pkgAcqIndexDiffs::Finish(bool allDone) { // we restore the original name, this is required, otherwise // the file will be cleaned - if(allDone) { + if(allDone) + { DestFile = _config->FindDir("Dir::State::lists"); DestFile += URItoFileName(RealURI); @@ -435,14 +448,17 @@ bool pkgAcqIndexDiffs::QueueNextDiff() // remove all patches until the next matching patch is found // this requires the Index file to be ordered for(vector::iterator I=available_patches.begin(); - available_patches.size() > 0 && I != available_patches.end() - && (*I).sha1 != local_sha1; - I++) { + available_patches.size() > 0 && + I != available_patches.end() && + (*I).sha1 != local_sha1; + I++) + { available_patches.erase(I); } // error checking and falling back if no patch was found - if(available_patches.size() == 0) { + if(available_patches.size() == 0) + { Failed("", NULL); return false; } @@ -1009,9 +1025,14 @@ void pkgAcqMetaIndex::QueueIndexes(bool verify) } } - // Queue Packages file - new pkgAcqDiffIndex(Owner, (*Target)->URI, (*Target)->Description, - (*Target)->ShortDesc, ExpectedIndexMD5); + // Queue Packages file (either diff or full packages files, depending + // on the users option) + if(_config->FindB("Acquire::PDiffs",false) == false) + new pkgAcqDiffIndex(Owner, (*Target)->URI, (*Target)->Description, + (*Target)->ShortDesc, ExpectedIndexMD5); + else + new newPkgAcqIndex(Owner, (*Target)->URI, (*Target)->Description, + (*Target)->ShortDesc, ExpectedIndexMD5); } } diff --git a/doc/examples/configure-index b/doc/examples/configure-index index dee0c06ff..965a09759 100644 --- a/doc/examples/configure-index +++ b/doc/examples/configure-index @@ -99,6 +99,8 @@ Acquire Queue-Mode "host"; // host|access Retries "0"; Source-Symlinks "true"; + + PDiffs "true"; // try to get the IndexFile diffs // HTTP method configuration http -- cgit v1.2.3-70-g09d2 From 81fcf9e22b9f93896ceb644c9341d9d53da9c790 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Thu, 30 Mar 2006 10:52:32 +0200 Subject: * fix FTBFS --- apt-pkg/acquire-item.cc | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'apt-pkg') diff --git a/apt-pkg/acquire-item.cc b/apt-pkg/acquire-item.cc index d845d4605..38977d2b1 100644 --- a/apt-pkg/acquire-item.cc +++ b/apt-pkg/acquire-item.cc @@ -169,8 +169,7 @@ pkgAcqDiffIndex::pkgAcqDiffIndex(pkgAcquire *Owner, // from local sources. this is really silly, and // should be fixed cleanly as soon as possible if(!FileExists(CurrentPackagesFile) || - Desc.URI.substr(0,strlen("file:/")) == "file:/" || - !_config->FindB("Acquire::Diffs",true)) + Desc.URI.substr(0,strlen("file:/")) == "file:/") { // we don't have a pkg file or we don't want to queue if(Debug) @@ -1031,7 +1030,7 @@ void pkgAcqMetaIndex::QueueIndexes(bool verify) new pkgAcqDiffIndex(Owner, (*Target)->URI, (*Target)->Description, (*Target)->ShortDesc, ExpectedIndexMD5); else - new newPkgAcqIndex(Owner, (*Target)->URI, (*Target)->Description, + new pkgAcqIndex(Owner, (*Target)->URI, (*Target)->Description, (*Target)->ShortDesc, ExpectedIndexMD5); } } -- cgit v1.2.3-70-g09d2 From 8f30ca302e4235985982a0f2b1e83dfe977ed12c Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Sun, 2 Apr 2006 13:02:02 +0200 Subject: * fix in the log class to avoid absurdely big downloads --- apt-pkg/acquire-item.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'apt-pkg') diff --git a/apt-pkg/acquire-item.cc b/apt-pkg/acquire-item.cc index 38977d2b1..a29063e1a 100644 --- a/apt-pkg/acquire-item.cc +++ b/apt-pkg/acquire-item.cc @@ -103,7 +103,8 @@ void pkgAcquire::Item::Done(string Message,unsigned long Size,string, { // We just downloaded something.. string FileName = LookupTag(Message,"Filename"); - if (Complete == false && FileName == DestFile) + // we only inform the Log class if it was actually not a local thing + if (Complete == false && !Local && FileName == DestFile) { if (Owner->Log != 0) Owner->Log->Fetched(Size,atoi(LookupTag(Message,"Resume-Point","0").c_str())); -- cgit v1.2.3-70-g09d2 From b7347826732bfad84001555d51f57b99017dd8c4 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Sun, 2 Apr 2006 13:10:49 +0200 Subject: * apt-pkg/acquire-item.cc: pdiff unzip+rred stuff is Local=true --- apt-pkg/acquire-item.cc | 2 ++ 1 file changed, 2 insertions(+) (limited to 'apt-pkg') diff --git a/apt-pkg/acquire-item.cc b/apt-pkg/acquire-item.cc index a29063e1a..c1f6767c0 100644 --- a/apt-pkg/acquire-item.cc +++ b/apt-pkg/acquire-item.cc @@ -500,6 +500,7 @@ void pkgAcqIndexDiffs::Done(string Message,unsigned long Size,string Md5Hash, string FileName = LookupTag(Message,"Filename"); State = StateUnzipDiff; + Local = true; Desc.URI = "gzip:" + FileName; DestFile += ".decomp"; QueueURI(Desc); @@ -518,6 +519,7 @@ void pkgAcqIndexDiffs::Done(string Message,unsigned long Size,string Md5Hash, std::clog << "Sending to rred method: " << FinalFile << std::endl; State = StateApplyDiff; + Local = true; Desc.URI = "rred:" + FinalFile; QueueURI(Desc); Mode = "rred"; -- cgit v1.2.3-70-g09d2 From 27299daff7e00d561dabb92945a516ed34b7be47 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Thu, 11 May 2006 12:08:40 +0200 Subject: * apt-pkg/acquire-item.cc: - make Acquire::PDiffs=true get pdfiffs, =false not get them --- apt-pkg/acquire-item.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'apt-pkg') diff --git a/apt-pkg/acquire-item.cc b/apt-pkg/acquire-item.cc index c1f6767c0..f22daaf71 100644 --- a/apt-pkg/acquire-item.cc +++ b/apt-pkg/acquire-item.cc @@ -1029,7 +1029,7 @@ void pkgAcqMetaIndex::QueueIndexes(bool verify) // Queue Packages file (either diff or full packages files, depending // on the users option) - if(_config->FindB("Acquire::PDiffs",false) == false) + if(_config->FindB("Acquire::PDiffs",true) == true) new pkgAcqDiffIndex(Owner, (*Target)->URI, (*Target)->Description, (*Target)->ShortDesc, ExpectedIndexMD5); else -- cgit v1.2.3-70-g09d2 From dfa8d6b21806c76df2e53555c577e8d2029186c4 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Wed, 7 Jun 2006 08:54:29 +0200 Subject: * apt-pkg/tagfile.cc: - fix merge bug --- apt-pkg/tagfile.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'apt-pkg') diff --git a/apt-pkg/tagfile.cc b/apt-pkg/tagfile.cc index 2eb269418..fc020436c 100644 --- a/apt-pkg/tagfile.cc +++ b/apt-pkg/tagfile.cc @@ -35,7 +35,7 @@ pkgTagFile::pkgTagFile(FileFd *pFd,unsigned long Size) : Fd(*pFd), Size(Size) { - if (Fd.IsOpen() == false || Fd.Size()) + if (Fd.IsOpen() == false || Fd.Size() == 0) { Buffer = 0; Start = End = Buffer = 0; -- cgit v1.2.3-70-g09d2 From 1790e0cf6a14ba2a3ccd8a8a926ca12a44d46d97 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Wed, 14 Jun 2006 11:59:47 +0200 Subject: * apt-pkg/acquire-item.cc: - added missing chmod() calls, thanks to Bastian Blank --- apt-pkg/acquire-item.cc | 2 ++ 1 file changed, 2 insertions(+) (limited to 'apt-pkg') diff --git a/apt-pkg/acquire-item.cc b/apt-pkg/acquire-item.cc index f22daaf71..a51b6f12d 100644 --- a/apt-pkg/acquire-item.cc +++ b/apt-pkg/acquire-item.cc @@ -540,6 +540,7 @@ void pkgAcqIndexDiffs::Done(string Message,unsigned long Size,string Md5Hash, << DestFile << " -> " << FinalFile << std::endl; } Rename(DestFile,FinalFile); + chmod(FinalFile.c_str(),0644); // see if there is more to download if(available_patches.size() > 0) { @@ -958,6 +959,7 @@ void pkgAcqMetaIndex::RetrievalDone(string Message) // Move it into position Rename(DestFile,FinalFile); } + chmod(FinalFile.c_str(),0644); DestFile = FinalFile; } -- cgit v1.2.3-70-g09d2 From 19ec5723caa6ea6ab196a9e960c769ded4ee0d28 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Fri, 1 Dec 2006 17:03:43 +0100 Subject: * apt-pkg/deb/debsrcrecords.{cc,h}: - cast correct --- apt-pkg/deb/debsrcrecords.cc | 2 +- apt-pkg/deb/debsrcrecords.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'apt-pkg') diff --git a/apt-pkg/deb/debsrcrecords.cc b/apt-pkg/deb/debsrcrecords.cc index e1c6427e8..7d5dab747 100644 --- a/apt-pkg/deb/debsrcrecords.cc +++ b/apt-pkg/deb/debsrcrecords.cc @@ -40,7 +40,7 @@ const char **debSrcRecordParser::Binaries() { delete [] Buffer; // allocate new size based on buffer (but never smaller than 4000) - BufSize = max((unsigned long)4000, max(Bins.length()+1,2*BufSize)); + BufSize = max((unsigned int)4000, max((unsigned int)Bins.length()+1,2*BufSize)); Buffer = new char[BufSize]; } diff --git a/apt-pkg/deb/debsrcrecords.h b/apt-pkg/deb/debsrcrecords.h index f4e2cb46c..7645dc564 100644 --- a/apt-pkg/deb/debsrcrecords.h +++ b/apt-pkg/deb/debsrcrecords.h @@ -27,7 +27,7 @@ class debSrcRecordParser : public pkgSrcRecords::Parser char *StaticBinList[400]; unsigned long iOffset; char *Buffer; - unsigned long BufSize; + unsigned int BufSize; public: -- cgit v1.2.3-70-g09d2 From 7106240056767caad5a55fe9c542842065cb5829 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Thu, 7 Dec 2006 11:10:32 +0100 Subject: * apt-pkg/acquire-item.cc: - merged the NMU pdiff fix and make the code a bit more readable --- apt-pkg/acquire-item.cc | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) (limited to 'apt-pkg') diff --git a/apt-pkg/acquire-item.cc b/apt-pkg/acquire-item.cc index a51b6f12d..6831abd54 100644 --- a/apt-pkg/acquire-item.cc +++ b/apt-pkg/acquire-item.cc @@ -270,15 +270,8 @@ bool pkgAcqDiffIndex::ParseDiffIndex(string IndexDiffFile) } } - // no information how to get the patches, bail out - if(!found) - { - if(Debug) - std::clog << "Can't find a patch in the index file" << std::endl; - // Failed will queue a big package file - Failed("", NULL); - } - else + // we have something, queue the next diff + if(found) { // queue the diffs new pkgAcqIndexDiffs(Owner, RealURI, Description, Desc.ShortDesc, @@ -290,6 +283,11 @@ bool pkgAcqDiffIndex::ParseDiffIndex(string IndexDiffFile) } } + // Nothing found, report and return false + // Failing here is ok, if we return false later, the full + // IndexFile is queued + if(Debug) + std::clog << "Can't find a patch in the index file" << std::endl; return false; } -- cgit v1.2.3-70-g09d2 From 14443594b5fdd5a99cb94434bddfbae098e83ecd Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Thu, 7 Dec 2006 14:42:57 +0100 Subject: * apt-pkg/acquire-item.cc - more usefull description of the downloaded patches --- apt-pkg/acquire-item.cc | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'apt-pkg') diff --git a/apt-pkg/acquire-item.cc b/apt-pkg/acquire-item.cc index 46c9d6c2c..0419f5ffd 100644 --- a/apt-pkg/acquire-item.cc +++ b/apt-pkg/acquire-item.cc @@ -274,6 +274,9 @@ bool pkgAcqDiffIndex::ParseDiffIndex(string IndexDiffFile) if(found) { // queue the diffs + int last_space = Description.rfind(" "); + if(last_space != string::npos) + Description.erase(last_space, Description.size()-last_space); new pkgAcqIndexDiffs(Owner, RealURI, Description, Desc.ShortDesc, ExpectedMD5, available_patches); Complete = false; @@ -354,7 +357,7 @@ pkgAcqIndexDiffs::pkgAcqIndexDiffs(pkgAcquire *Owner, Debug = _config->FindB("Debug::pkgAcquire::Diffs",false); - Desc.Description = URIDesc; + Description = URIDesc; Desc.Owner = this; Desc.ShortDesc = ShortDesc; @@ -463,7 +466,7 @@ bool pkgAcqIndexDiffs::QueueNextDiff() // queue the right diff Desc.URI = string(RealURI) + ".diff/" + available_patches[0].file + ".gz"; - Desc.Description = available_patches[0].file + string(".pdiff"); + Desc.Description = Description + " " + available_patches[0].file + string(".pdiff"); DestFile = _config->FindDir("Dir::State::lists") + "partial/"; DestFile += URItoFileName(RealURI + ".diff/" + available_patches[0].file); -- cgit v1.2.3-70-g09d2 From 07494f6580dd689c1d82d8dc2f7dbbcfedaf6e52 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Fri, 8 Dec 2006 18:21:59 +0000 Subject: 0.6.46.3ubuntu2 change as uploaded: fix dist-upgrade --- apt-pkg/algorithms.cc | 1 + debian/changelog | 7 +++++++ 2 files changed, 8 insertions(+) (limited to 'apt-pkg') diff --git a/apt-pkg/algorithms.cc b/apt-pkg/algorithms.cc index f50c52a32..723c8ea3a 100644 --- a/apt-pkg/algorithms.cc +++ b/apt-pkg/algorithms.cc @@ -986,6 +986,7 @@ bool pkgProblemResolver::Resolve(bool BrokenFix) } if (Debug) clog << " Will not break " << Pkg.Name() << " as stated in Breaks field in " << I.Name() < Thu, 7 Dec 2006 15:46:52 +0000 + apt (0.6.45ubuntu6) edgy; urgency=low * Tests pass without code changes! Except that we need this: -- cgit v1.2.3-70-g09d2 From 8a3a2e994e0e49fb5b610dba0f810b67f0ab229e Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Wed, 14 Mar 2007 14:07:51 +0100 Subject: * apt-pkg/depcache.cc: - always chmod extended_states to 0644 --- apt-pkg/depcache.cc | 5 ++++- cmdline/apt-mark | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) (limited to 'apt-pkg') diff --git a/apt-pkg/depcache.cc b/apt-pkg/depcache.cc index f5673dd5d..4794d3503 100644 --- a/apt-pkg/depcache.cc +++ b/apt-pkg/depcache.cc @@ -26,6 +26,8 @@ #include #include +#include + #include pkgDepCache::ActionGroup::ActionGroup(pkgDepCache &cache) : @@ -253,8 +255,9 @@ bool pkgDepCache::writeStateFile(OpProgress *prog) } fclose(OutFile); - // move the outfile over the real file + // move the outfile over the real file and set permissions rename(outfile.c_str(), state.c_str()); + chmod(state.c_str(), 0644); return true; } diff --git a/cmdline/apt-mark b/cmdline/apt-mark index 533ed8715..728f083dc 100755 --- a/cmdline/apt-mark +++ b/cmdline/apt-mark @@ -61,3 +61,4 @@ if __name__ == "__main__": outfile.write(str(tagfile.Section)+"\n") # all done, rename the tmpfile os.rename(outfile.name, STATE_FILE) + os.chmod(outfile.name, 0644) -- cgit v1.2.3-70-g09d2 From 06c46e825c6e7ec84682bf6f7fbc28b6cc7d7569 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Wed, 25 Apr 2007 00:33:56 +0200 Subject: * revert the api --- apt-pkg/init.h | 2 +- apt-pkg/makefile | 2 +- configure.in | 2 +- methods/makefile | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) (limited to 'apt-pkg') diff --git a/apt-pkg/init.h b/apt-pkg/init.h index b584b2cce..8255b406a 100644 --- a/apt-pkg/init.h +++ b/apt-pkg/init.h @@ -18,7 +18,7 @@ // See the makefile #define APT_PKG_MAJOR 3 -#define APT_PKG_MINOR 12 +#define APT_PKG_MINOR 11 #define APT_PKG_RELEASE 0 extern const char *pkgVersion; diff --git a/apt-pkg/makefile b/apt-pkg/makefile index c493d3dd9..7e5feae53 100644 --- a/apt-pkg/makefile +++ b/apt-pkg/makefile @@ -13,7 +13,7 @@ include ../buildlib/defaults.mak # methods/makefile - FIXME LIBRARY=apt-pkg LIBEXT=$(GLIBC_VER)$(LIBSTDCPP_VER) -MAJOR=3.12 +MAJOR=3.11 MINOR=0 SLIBS=$(PTHREADLIB) $(INTLLIBS) APT_DOMAIN:=libapt-pkg$(MAJOR) diff --git a/configure.in b/configure.in index c7bf253d1..d6755769e 100644 --- a/configure.in +++ b/configure.in @@ -18,7 +18,7 @@ AC_CONFIG_AUX_DIR(buildlib) AC_CONFIG_HEADER(include/config.h:buildlib/config.h.in include/apti18n.h:buildlib/apti18n.h.in) dnl -- SET THIS TO THE RELEASE VERSION -- -AC_DEFINE_UNQUOTED(VERSION,"0.6.46.5") +AC_DEFINE_UNQUOTED(VERSION,"0.6.47") PACKAGE="apt" AC_DEFINE_UNQUOTED(PACKAGE,"$PACKAGE") AC_SUBST(PACKAGE) diff --git a/methods/makefile b/methods/makefile index fdead999a..d0b5a28c0 100644 --- a/methods/makefile +++ b/methods/makefile @@ -7,7 +7,7 @@ include ../buildlib/defaults.mak BIN := $(BIN)/methods # FIXME.. -LIB_APT_PKG_MAJOR = 3.12 +LIB_APT_PKG_MAJOR = 3.11 APT_DOMAIN := libapt-pkg$(LIB_APT_PKG_MAJOR) # The file method -- cgit v1.2.3-70-g09d2 From ce86ff41e5aae49be67f0031a33b83cfde975d96 Mon Sep 17 00:00:00 2001 From: "bubulle@debian.org" <> Date: Tue, 8 May 2007 10:46:12 +0200 Subject: Add one translatable string and a newline. Closes: #394722 --- apt-pkg/cdrom.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'apt-pkg') diff --git a/apt-pkg/cdrom.cc b/apt-pkg/cdrom.cc index 4d45d38a2..17a4f184b 100644 --- a/apt-pkg/cdrom.cc +++ b/apt-pkg/cdrom.cc @@ -680,7 +680,7 @@ bool pkgCdrom::Add(pkgCdromStatus *log) 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); @@ -804,7 +804,7 @@ bool pkgCdrom::Add(pkgCdromStatus *log) // 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); } -- cgit v1.2.3-70-g09d2 From c2f2b86252cec3a9ec68df2f55850067faa705d6 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Wed, 23 May 2007 09:34:18 +0200 Subject: * implement SourceVer() in pkgRecords (thanks to Daniel Burrows for the patch!) --- apt-pkg/deb/debrecords.cc | 28 +++++++++++++++++++++++++++- apt-pkg/deb/debrecords.h | 1 + apt-pkg/pkgrecords.h | 1 + debian/changelog | 2 ++ 4 files changed, 31 insertions(+), 1 deletion(-) (limited to 'apt-pkg') diff --git a/apt-pkg/deb/debrecords.cc b/apt-pkg/deb/debrecords.cc index c3e579ad1..26ca36799 100644 --- a/apt-pkg/deb/debrecords.cc +++ b/apt-pkg/deb/debrecords.cc @@ -92,18 +92,44 @@ string debRecordParser::LongDesc() return Section.FindS("Description"); } /*}}}*/ + +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 --git a/apt-pkg/deb/debrecords.h b/apt-pkg/deb/debrecords.h index efef2e588..bb72275a5 100644 --- a/apt-pkg/deb/debrecords.h +++ b/apt-pkg/deb/debrecords.h @@ -38,6 +38,7 @@ class debRecordParser : public pkgRecords::Parser virtual string MD5Hash(); virtual string SHA1Hash(); virtual string SourcePkg(); + virtual string SourceVer(); // These are some general stats about the package virtual string Maintainer(); diff --git a/apt-pkg/pkgrecords.h b/apt-pkg/pkgrecords.h index 08f004414..dcfec07ef 100644 --- a/apt-pkg/pkgrecords.h +++ b/apt-pkg/pkgrecords.h @@ -58,6 +58,7 @@ class pkgRecords::Parser virtual string MD5Hash() {return string();}; virtual string SHA1Hash() {return string();}; virtual string SourcePkg() {return string();}; + virtual string SourceVer() {return string();}; // These are some general stats about the package virtual string Maintainer() {return string();}; diff --git a/debian/changelog b/debian/changelog index 8294c45d9..c487bc8dd 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,5 +1,7 @@ apt (0.6.47) UNRELEASED; urgency=low + * 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 -- cgit v1.2.3-70-g09d2 From 05aab406968ed4f08d3cace55622a62b489e5df8 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Thu, 7 Jun 2007 00:48:52 +0200 Subject: * revert bits of the acquire-item merge that broke the description display --- apt-pkg/acquire-item.cc | 27 +++++++++++++-------------- 1 file changed, 13 insertions(+), 14 deletions(-) (limited to 'apt-pkg') diff --git a/apt-pkg/acquire-item.cc b/apt-pkg/acquire-item.cc index 3d05e62ae..1b9120586 100644 --- a/apt-pkg/acquire-item.cc +++ b/apt-pkg/acquire-item.cc @@ -267,17 +267,13 @@ bool pkgAcqDiffIndex::ParseDiffIndex(string IndexDiffFile) } } - // no information how to get the patches, bail out - if(!found) - { - if(Debug) - std::clog << "Can't find a patch in the index file" << std::endl; - // Failed will queue a big package file - Failed("", NULL); - } - else + // we have something, queue the next diff + if(found) { // queue the diffs + int last_space = Description.rfind(" "); + if(last_space != string::npos) + Description.erase(last_space, Description.size()-last_space); new pkgAcqIndexDiffs(Owner, RealURI, Description, Desc.ShortDesc, ExpectedMD5, available_patches); Complete = false; @@ -286,7 +282,12 @@ bool pkgAcqDiffIndex::ParseDiffIndex(string IndexDiffFile) return true; } } - + + // Nothing found, report and return false + // Failing here is ok, if we return false later, the full + // IndexFile is queued + if(Debug) + std::clog << "Can't find a patch in the index file" << std::endl; return false; } @@ -353,7 +354,7 @@ pkgAcqIndexDiffs::pkgAcqIndexDiffs(pkgAcquire *Owner, Debug = _config->FindB("Debug::pkgAcquire::Diffs",false); - Desc.Description = URIDesc; + Description = URIDesc; Desc.Owner = this; Desc.ShortDesc = ShortDesc; @@ -462,8 +463,7 @@ bool pkgAcqIndexDiffs::QueueNextDiff() // queue the right diff Desc.URI = string(RealURI) + ".diff/" + available_patches[0].file + ".gz"; - Desc.Description = available_patches[0].file + string(".pdiff"); - + Desc.Description = Description + " " + available_patches[0].file + string(".pdiff"); DestFile = _config->FindDir("Dir::State::lists") + "partial/"; DestFile += URItoFileName(RealURI + ".diff/" + available_patches[0].file); @@ -602,7 +602,6 @@ string pkgAcqIndex::Custom600Headers() void pkgAcqIndex::Failed(string Message,pkgAcquire::MethodConfig *Cnf) { - // no .bz2 found, retry with .gz if(Desc.URI.substr(Desc.URI.size()-3) == "bz2") { Desc.URI = Desc.URI.substr(0,Desc.URI.size()-3) + "gz"; -- cgit v1.2.3-70-g09d2 From 152ab79e05f077440d76c1c423b013eaeb3fe2ff Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Fri, 8 Jun 2007 23:04:36 +0200 Subject: * fix FTBFS with gcc 4.3, closes: #417090 (thanks to Martin Michlmayr for the patch) --- apt-pkg/algorithms.cc | 2 + apt-pkg/cdrom.cc | 1 + apt-pkg/contrib/fileutl.cc | 1 + apt-pkg/contrib/strutl.cc | 1 + apt-pkg/init.cc | 1 + cmdline/apt-sortpkgs.cc | 2 +- debian/changelog | 2 + ftparchive/apt-ftparchive.cc | 1 + po/apt-all.pot | 195 ++++++++++++++++++++++--------------------- 9 files changed, 108 insertions(+), 98 deletions(-) (limited to 'apt-pkg') diff --git a/apt-pkg/algorithms.cc b/apt-pkg/algorithms.cc index 5fa16e66f..c6583f3b5 100644 --- a/apt-pkg/algorithms.cc +++ b/apt-pkg/algorithms.cc @@ -24,6 +24,8 @@ #include +#include +#include #include /*}}}*/ using namespace std; diff --git a/apt-pkg/cdrom.cc b/apt-pkg/cdrom.cc index 17a4f184b..07a7b868a 100644 --- a/apt-pkg/cdrom.cc +++ b/apt-pkg/cdrom.cc @@ -18,6 +18,7 @@ #include #include #include +#include #include "indexcopy.h" diff --git a/apt-pkg/contrib/fileutl.cc b/apt-pkg/contrib/fileutl.cc index 9fd71728e..5d294c36a 100644 --- a/apt-pkg/contrib/fileutl.cc +++ b/apt-pkg/contrib/fileutl.cc @@ -24,6 +24,7 @@ #include +#include #include #include #include diff --git a/apt-pkg/contrib/strutl.cc b/apt-pkg/contrib/strutl.cc index d96155917..6e549bedd 100644 --- a/apt-pkg/contrib/strutl.cc +++ b/apt-pkg/contrib/strutl.cc @@ -28,6 +28,7 @@ #include #include #include +#include #include #include #include diff --git a/apt-pkg/init.cc b/apt-pkg/init.cc index b47378d4a..52c8a68aa 100644 --- a/apt-pkg/init.cc +++ b/apt-pkg/init.cc @@ -14,6 +14,7 @@ #include #include +#include #include /*}}}*/ diff --git a/cmdline/apt-sortpkgs.cc b/cmdline/apt-sortpkgs.cc index e6a6b9a56..8909c3826 100644 --- a/cmdline/apt-sortpkgs.cc +++ b/cmdline/apt-sortpkgs.cc @@ -162,7 +162,7 @@ int ShowHelp() } /*}}}*/ -int main(unsigned int argc,const char *argv[]) +int main(int argc,const char *argv[]) { CommandLine::Args Args[] = { {'h',"help","help",0}, diff --git a/debian/changelog b/debian/changelog index 2dc11190d..7d06d98c6 100644 --- a/debian/changelog +++ b/debian/changelog @@ -54,6 +54,8 @@ apt (0.6.47) UNRELEASED; urgency=low (thanks to Israel G. Lugo 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) -- Michael Vogt Mon, 18 Dec 2006 19:39:05 +0100 diff --git a/ftparchive/apt-ftparchive.cc b/ftparchive/apt-ftparchive.cc index 0e2be8a00..4fbea13e1 100644 --- a/ftparchive/apt-ftparchive.cc +++ b/ftparchive/apt-ftparchive.cc @@ -24,6 +24,7 @@ #include #include +#include #include #include diff --git a/po/apt-all.pot b/po/apt-all.pot index 6237cd395..bfcd78c99 100644 --- a/po/apt-all.pot +++ b/po/apt-all.pot @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2007-05-08 11:09+0200\n" +"POT-Creation-Date: 2007-06-08 22:53+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -147,8 +147,8 @@ msgid " %4i %s\n" msgstr "" #: cmdline/apt-cache.cc:1652 cmdline/apt-cdrom.cc:138 cmdline/apt-config.cc:70 -#: cmdline/apt-extracttemplates.cc:225 ftparchive/apt-ftparchive.cc:550 -#: cmdline/apt-get.cc:2387 cmdline/apt-sortpkgs.cc:144 +#: cmdline/apt-extracttemplates.cc:225 ftparchive/apt-ftparchive.cc:551 +#: cmdline/apt-get.cc:2391 cmdline/apt-sortpkgs.cc:144 #, c-format msgid "%s %s for %s %s compiled on %s %s\n" msgstr "" @@ -252,31 +252,31 @@ msgstr "" msgid "Cannot get debconf version. Is debconf installed?" msgstr "" -#: ftparchive/apt-ftparchive.cc:167 ftparchive/apt-ftparchive.cc:341 +#: ftparchive/apt-ftparchive.cc:168 ftparchive/apt-ftparchive.cc:342 msgid "Package extension list is too long" msgstr "" -#: ftparchive/apt-ftparchive.cc:169 ftparchive/apt-ftparchive.cc:183 -#: ftparchive/apt-ftparchive.cc:206 ftparchive/apt-ftparchive.cc:256 -#: ftparchive/apt-ftparchive.cc:270 ftparchive/apt-ftparchive.cc:292 +#: ftparchive/apt-ftparchive.cc:170 ftparchive/apt-ftparchive.cc:184 +#: ftparchive/apt-ftparchive.cc:207 ftparchive/apt-ftparchive.cc:257 +#: ftparchive/apt-ftparchive.cc:271 ftparchive/apt-ftparchive.cc:293 #, c-format msgid "Error processing directory %s" msgstr "" -#: ftparchive/apt-ftparchive.cc:254 +#: ftparchive/apt-ftparchive.cc:255 msgid "Source extension list is too long" msgstr "" -#: ftparchive/apt-ftparchive.cc:371 +#: ftparchive/apt-ftparchive.cc:372 msgid "Error writing header to contents file" msgstr "" -#: ftparchive/apt-ftparchive.cc:401 +#: ftparchive/apt-ftparchive.cc:402 #, c-format msgid "Error processing contents %s" msgstr "" -#: ftparchive/apt-ftparchive.cc:556 +#: ftparchive/apt-ftparchive.cc:557 msgid "" "Usage: apt-ftparchive [options] command\n" "Commands: packages binarypath [overridefile [pathprefix]]\n" @@ -318,11 +318,11 @@ msgid "" " -o=? Set an arbitrary configuration option" msgstr "" -#: ftparchive/apt-ftparchive.cc:762 +#: ftparchive/apt-ftparchive.cc:763 msgid "No selections matched" msgstr "" -#: ftparchive/apt-ftparchive.cc:835 +#: ftparchive/apt-ftparchive.cc:836 #, c-format msgid "Some files are missing in the package file group `%s'" msgstr "" @@ -546,7 +546,7 @@ msgstr "" msgid "Y" msgstr "" -#: cmdline/apt-get.cc:142 cmdline/apt-get.cc:1506 +#: cmdline/apt-get.cc:142 cmdline/apt-get.cc:1510 #, c-format msgid "Regex compilation error - %s" msgstr "" @@ -705,11 +705,11 @@ msgstr "" msgid "Internal error, Ordering didn't finish" msgstr "" -#: cmdline/apt-get.cc:791 cmdline/apt-get.cc:1818 cmdline/apt-get.cc:1851 +#: cmdline/apt-get.cc:791 cmdline/apt-get.cc:1822 cmdline/apt-get.cc:1855 msgid "Unable to lock the download directory" msgstr "" -#: cmdline/apt-get.cc:801 cmdline/apt-get.cc:1899 cmdline/apt-get.cc:2135 +#: cmdline/apt-get.cc:801 cmdline/apt-get.cc:1903 cmdline/apt-get.cc:2139 #: apt-pkg/cachefile.cc:67 msgid "The list of sources could not be read." msgstr "" @@ -738,7 +738,7 @@ msgstr "" msgid "After unpacking %sB disk space will be freed.\n" msgstr "" -#: cmdline/apt-get.cc:846 cmdline/apt-get.cc:1989 +#: cmdline/apt-get.cc:846 cmdline/apt-get.cc:1993 #, c-format msgid "Couldn't determine free space in %s" msgstr "" @@ -772,7 +772,7 @@ msgstr "" msgid "Do you want to continue [Y/n]? " msgstr "" -#: cmdline/apt-get.cc:961 cmdline/apt-get.cc:1365 cmdline/apt-get.cc:2032 +#: cmdline/apt-get.cc:961 cmdline/apt-get.cc:1365 cmdline/apt-get.cc:2036 #, c-format msgid "Failed to fetch %s %s\n" msgstr "" @@ -781,7 +781,7 @@ msgstr "" msgid "Some files failed to download" msgstr "" -#: cmdline/apt-get.cc:980 cmdline/apt-get.cc:2041 +#: cmdline/apt-get.cc:980 cmdline/apt-get.cc:2045 msgid "Download complete and in download only mode" msgstr "" @@ -891,27 +891,27 @@ msgstr "" msgid "Internal error, AllUpgrade broke stuff" msgstr "" -#: cmdline/apt-get.cc:1493 cmdline/apt-get.cc:1529 +#: cmdline/apt-get.cc:1497 cmdline/apt-get.cc:1533 #, c-format msgid "Couldn't find package %s" msgstr "" -#: cmdline/apt-get.cc:1516 +#: cmdline/apt-get.cc:1520 #, c-format msgid "Note, selecting %s for regex '%s'\n" msgstr "" -#: cmdline/apt-get.cc:1546 +#: cmdline/apt-get.cc:1550 msgid "You might want to run `apt-get -f install' to correct these:" msgstr "" -#: cmdline/apt-get.cc:1549 +#: cmdline/apt-get.cc:1553 msgid "" "Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a " "solution)." msgstr "" -#: cmdline/apt-get.cc:1561 +#: cmdline/apt-get.cc:1565 msgid "" "Some packages could not be installed. This may mean that you have\n" "requested an impossible situation or if you are using the unstable\n" @@ -919,163 +919,163 @@ msgid "" "or been moved out of Incoming." msgstr "" -#: cmdline/apt-get.cc:1569 +#: cmdline/apt-get.cc:1573 msgid "" "Since you only requested a single operation it is extremely likely that\n" "the package is simply not installable and a bug report against\n" "that package should be filed." msgstr "" -#: cmdline/apt-get.cc:1574 +#: cmdline/apt-get.cc:1578 msgid "The following information may help to resolve the situation:" msgstr "" -#: cmdline/apt-get.cc:1577 +#: cmdline/apt-get.cc:1581 msgid "Broken packages" msgstr "" -#: cmdline/apt-get.cc:1603 +#: cmdline/apt-get.cc:1607 msgid "The following extra packages will be installed:" msgstr "" -#: cmdline/apt-get.cc:1692 +#: cmdline/apt-get.cc:1696 msgid "Suggested packages:" msgstr "" -#: cmdline/apt-get.cc:1693 +#: cmdline/apt-get.cc:1697 msgid "Recommended packages:" msgstr "" -#: cmdline/apt-get.cc:1713 +#: cmdline/apt-get.cc:1717 msgid "Calculating upgrade... " msgstr "" -#: cmdline/apt-get.cc:1716 methods/ftp.cc:702 methods/connect.cc:101 +#: cmdline/apt-get.cc:1720 methods/ftp.cc:702 methods/connect.cc:101 msgid "Failed" msgstr "" -#: cmdline/apt-get.cc:1721 +#: cmdline/apt-get.cc:1725 msgid "Done" msgstr "" -#: cmdline/apt-get.cc:1786 cmdline/apt-get.cc:1794 +#: cmdline/apt-get.cc:1790 cmdline/apt-get.cc:1798 msgid "Internal error, problem resolver broke stuff" msgstr "" -#: cmdline/apt-get.cc:1894 +#: cmdline/apt-get.cc:1898 msgid "Must specify at least one package to fetch source for" msgstr "" -#: cmdline/apt-get.cc:1924 cmdline/apt-get.cc:2153 +#: cmdline/apt-get.cc:1928 cmdline/apt-get.cc:2157 #, c-format msgid "Unable to find a source package for %s" msgstr "" -#: cmdline/apt-get.cc:1968 +#: cmdline/apt-get.cc:1972 #, c-format msgid "Skipping already downloaded file '%s'\n" msgstr "" -#: cmdline/apt-get.cc:1992 +#: cmdline/apt-get.cc:1996 #, c-format msgid "You don't have enough free space in %s" msgstr "" -#: cmdline/apt-get.cc:1997 +#: cmdline/apt-get.cc:2001 #, c-format msgid "Need to get %sB/%sB of source archives.\n" msgstr "" -#: cmdline/apt-get.cc:2000 +#: cmdline/apt-get.cc:2004 #, c-format msgid "Need to get %sB of source archives.\n" msgstr "" -#: cmdline/apt-get.cc:2006 +#: cmdline/apt-get.cc:2010 #, c-format msgid "Fetch source %s\n" msgstr "" -#: cmdline/apt-get.cc:2037 +#: cmdline/apt-get.cc:2041 msgid "Failed to fetch some archives." msgstr "" -#: cmdline/apt-get.cc:2065 +#: cmdline/apt-get.cc:2069 #, c-format msgid "Skipping unpack of already unpacked source in %s\n" msgstr "" -#: cmdline/apt-get.cc:2077 +#: cmdline/apt-get.cc:2081 #, c-format msgid "Unpack command '%s' failed.\n" msgstr "" -#: cmdline/apt-get.cc:2078 +#: cmdline/apt-get.cc:2082 #, c-format msgid "Check if the 'dpkg-dev' package is installed.\n" msgstr "" -#: cmdline/apt-get.cc:2095 +#: cmdline/apt-get.cc:2099 #, c-format msgid "Build command '%s' failed.\n" msgstr "" -#: cmdline/apt-get.cc:2114 +#: cmdline/apt-get.cc:2118 msgid "Child process failed" msgstr "" -#: cmdline/apt-get.cc:2130 +#: cmdline/apt-get.cc:2134 msgid "Must specify at least one package to check builddeps for" msgstr "" -#: cmdline/apt-get.cc:2158 +#: cmdline/apt-get.cc:2162 #, c-format msgid "Unable to get build-dependency information for %s" msgstr "" -#: cmdline/apt-get.cc:2178 +#: cmdline/apt-get.cc:2182 #, c-format msgid "%s has no build depends.\n" msgstr "" -#: cmdline/apt-get.cc:2230 +#: cmdline/apt-get.cc:2234 #, c-format msgid "" "%s dependency for %s cannot be satisfied because the package %s cannot be " "found" msgstr "" -#: cmdline/apt-get.cc:2282 +#: cmdline/apt-get.cc:2286 #, c-format msgid "" "%s dependency for %s cannot be satisfied because no available versions of " "package %s can satisfy version requirements" msgstr "" -#: cmdline/apt-get.cc:2317 +#: cmdline/apt-get.cc:2321 #, c-format msgid "Failed to satisfy %s dependency for %s: Installed package %s is too new" msgstr "" -#: cmdline/apt-get.cc:2342 +#: cmdline/apt-get.cc:2346 #, c-format msgid "Failed to satisfy %s dependency for %s: %s" msgstr "" -#: cmdline/apt-get.cc:2356 +#: cmdline/apt-get.cc:2360 #, c-format msgid "Build-dependencies for %s could not be satisfied." msgstr "" -#: cmdline/apt-get.cc:2360 +#: cmdline/apt-get.cc:2364 msgid "Failed to process build dependencies" msgstr "" -#: cmdline/apt-get.cc:2392 +#: cmdline/apt-get.cc:2396 msgid "Supported modules:" msgstr "" -#: cmdline/apt-get.cc:2433 +#: cmdline/apt-get.cc:2437 msgid "" "Usage: apt-get [options] command\n" " apt-get [options] install|remove pkg1 [pkg2 ...]\n" @@ -1090,6 +1090,7 @@ msgid "" " upgrade - Perform an upgrade\n" " install - Install new packages (pkg is libc6 not libc6.deb)\n" " remove - Remove packages\n" +" purge - Remove and purge packages\n" " source - Download source archives\n" " build-dep - Configure build-dependencies for source packages\n" " dist-upgrade - Distribution upgrade, see apt-get(8)\n" @@ -1555,7 +1556,7 @@ msgstr "" msgid "Server closed the connection" msgstr "" -#: methods/ftp.cc:338 apt-pkg/contrib/fileutl.cc:471 methods/rsh.cc:190 +#: methods/ftp.cc:338 apt-pkg/contrib/fileutl.cc:472 methods/rsh.cc:190 msgid "Read error" msgstr "" @@ -1567,7 +1568,7 @@ msgstr "" msgid "Protocol corruption" msgstr "" -#: methods/ftp.cc:446 apt-pkg/contrib/fileutl.cc:510 methods/rsh.cc:232 +#: methods/ftp.cc:446 apt-pkg/contrib/fileutl.cc:511 methods/rsh.cc:232 msgid "Write error" msgstr "" @@ -1834,7 +1835,7 @@ msgstr "" msgid "Couldn't make mmap of %lu bytes" msgstr "" -#: apt-pkg/contrib/strutl.cc:938 +#: apt-pkg/contrib/strutl.cc:939 #, c-format msgid "Selection %s not found" msgstr "" @@ -1964,70 +1965,70 @@ msgstr "" msgid "Failed to stat the cdrom" msgstr "" -#: apt-pkg/contrib/fileutl.cc:82 +#: apt-pkg/contrib/fileutl.cc:83 #, c-format msgid "Not using locking for read only lock file %s" msgstr "" -#: apt-pkg/contrib/fileutl.cc:87 +#: apt-pkg/contrib/fileutl.cc:88 #, c-format msgid "Could not open lock file %s" msgstr "" -#: apt-pkg/contrib/fileutl.cc:105 +#: apt-pkg/contrib/fileutl.cc:106 #, c-format msgid "Not using locking for nfs mounted lock file %s" msgstr "" -#: apt-pkg/contrib/fileutl.cc:109 +#: apt-pkg/contrib/fileutl.cc:110 #, c-format msgid "Could not get lock %s" msgstr "" -#: apt-pkg/contrib/fileutl.cc:377 +#: apt-pkg/contrib/fileutl.cc:378 #, c-format msgid "Waited for %s but it wasn't there" msgstr "" -#: apt-pkg/contrib/fileutl.cc:387 +#: apt-pkg/contrib/fileutl.cc:388 #, c-format msgid "Sub-process %s received a segmentation fault." msgstr "" -#: apt-pkg/contrib/fileutl.cc:390 +#: apt-pkg/contrib/fileutl.cc:391 #, c-format msgid "Sub-process %s returned an error code (%u)" msgstr "" -#: apt-pkg/contrib/fileutl.cc:392 +#: apt-pkg/contrib/fileutl.cc:393 #, c-format msgid "Sub-process %s exited unexpectedly" msgstr "" -#: apt-pkg/contrib/fileutl.cc:436 +#: apt-pkg/contrib/fileutl.cc:437 #, c-format msgid "Could not open file %s" msgstr "" -#: apt-pkg/contrib/fileutl.cc:492 +#: apt-pkg/contrib/fileutl.cc:493 #, c-format msgid "read, still have %lu to read but none left" msgstr "" -#: apt-pkg/contrib/fileutl.cc:522 +#: apt-pkg/contrib/fileutl.cc:523 #, c-format msgid "write, still have %lu to write but couldn't" msgstr "" -#: apt-pkg/contrib/fileutl.cc:597 +#: apt-pkg/contrib/fileutl.cc:598 msgid "Problem closing the file" msgstr "" -#: apt-pkg/contrib/fileutl.cc:603 +#: apt-pkg/contrib/fileutl.cc:604 msgid "Problem unlinking the file" msgstr "" -#: apt-pkg/contrib/fileutl.cc:614 +#: apt-pkg/contrib/fileutl.cc:615 msgid "Problem syncing the file" msgstr "" @@ -2152,7 +2153,7 @@ msgstr "" msgid "Opening %s" msgstr "" -#: apt-pkg/sourcelist.cc:220 apt-pkg/cdrom.cc:426 +#: apt-pkg/sourcelist.cc:220 apt-pkg/cdrom.cc:427 #, c-format msgid "Line %u too long in source list %s." msgstr "" @@ -2185,19 +2186,19 @@ msgstr "" msgid "Index file type '%s' is not supported" msgstr "" -#: apt-pkg/algorithms.cc:241 +#: apt-pkg/algorithms.cc:243 #, c-format msgid "" "The package %s needs to be reinstalled, but I can't find an archive for it." msgstr "" -#: apt-pkg/algorithms.cc:1066 +#: apt-pkg/algorithms.cc:1068 msgid "" "Error, pkgProblemResolver::Resolve generated breaks, this may be caused by " "held packages." msgstr "" -#: apt-pkg/algorithms.cc:1068 +#: apt-pkg/algorithms.cc:1070 msgid "Unable to correct problems, you have held broken packages." msgstr "" @@ -2238,12 +2239,12 @@ msgstr "" msgid "Please insert the disc labeled: '%s' in the drive '%s' and press enter." msgstr "" -#: apt-pkg/init.cc:120 +#: apt-pkg/init.cc:121 #, c-format msgid "Packaging system '%s' is not supported" msgstr "" -#: apt-pkg/init.cc:136 +#: apt-pkg/init.cc:137 msgid "Unable to determine a suitable packaging system type" msgstr "" @@ -2398,78 +2399,78 @@ msgstr "" msgid "Vendor block %s contains no fingerprint" msgstr "" -#: apt-pkg/cdrom.cc:507 +#: apt-pkg/cdrom.cc:508 #, c-format msgid "" "Using CD-ROM mount point %s\n" "Mounting CD-ROM\n" msgstr "" -#: apt-pkg/cdrom.cc:516 apt-pkg/cdrom.cc:598 +#: apt-pkg/cdrom.cc:517 apt-pkg/cdrom.cc:599 msgid "Identifying.. " msgstr "" -#: apt-pkg/cdrom.cc:541 +#: apt-pkg/cdrom.cc:542 #, c-format msgid "Stored label: %s \n" msgstr "" -#: apt-pkg/cdrom.cc:561 +#: apt-pkg/cdrom.cc:562 #, c-format msgid "Using CD-ROM mount point %s\n" msgstr "" -#: apt-pkg/cdrom.cc:579 +#: apt-pkg/cdrom.cc:580 msgid "Unmounting CD-ROM\n" msgstr "" -#: apt-pkg/cdrom.cc:583 +#: apt-pkg/cdrom.cc:584 msgid "Waiting for disc...\n" msgstr "" #. Mount the new CDROM -#: apt-pkg/cdrom.cc:591 +#: apt-pkg/cdrom.cc:592 msgid "Mounting CD-ROM...\n" msgstr "" -#: apt-pkg/cdrom.cc:609 +#: apt-pkg/cdrom.cc:610 msgid "Scanning disc for index files..\n" msgstr "" -#: apt-pkg/cdrom.cc:647 +#: apt-pkg/cdrom.cc:648 #, c-format msgid "Found %i package indexes, %i source indexes and %i signatures\n" msgstr "" -#: apt-pkg/cdrom.cc:683 +#: apt-pkg/cdrom.cc:684 #, c-format msgid "Found label '%s'\n" msgstr "" -#: apt-pkg/cdrom.cc:712 +#: apt-pkg/cdrom.cc:713 msgid "That is not a valid name, try again.\n" msgstr "" -#: apt-pkg/cdrom.cc:728 +#: apt-pkg/cdrom.cc:729 #, c-format msgid "" "This disc is called: \n" "'%s'\n" msgstr "" -#: apt-pkg/cdrom.cc:732 +#: apt-pkg/cdrom.cc:733 msgid "Copying package lists..." msgstr "" -#: apt-pkg/cdrom.cc:756 +#: apt-pkg/cdrom.cc:757 msgid "Writing new source list\n" msgstr "" -#: apt-pkg/cdrom.cc:765 +#: apt-pkg/cdrom.cc:766 msgid "Source list entries for this disc are:\n" msgstr "" -#: apt-pkg/cdrom.cc:807 +#: apt-pkg/cdrom.cc:808 msgid "Unmounting CD-ROM...\n" msgstr "" -- cgit v1.2.3-70-g09d2 From 686d0fad160a51d8833a9429ec3a68de6f13c2d5 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Sat, 9 Jun 2007 01:40:31 +0200 Subject: * merged another missing bit from the ubuntu branch --- apt-pkg/depcache.cc | 2 +- apt-pkg/depcache.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'apt-pkg') diff --git a/apt-pkg/depcache.cc b/apt-pkg/depcache.cc index af2fd54c7..fe981ea76 100644 --- a/apt-pkg/depcache.cc +++ b/apt-pkg/depcache.cc @@ -178,7 +178,7 @@ bool pkgDepCache::readStateFile(OpProgress *Prog) return true; } -bool pkgDepCache::writeStateFile(OpProgress *prog) +bool pkgDepCache::writeStateFile(OpProgress *prog, bool InstalledOnly) { if(_config->FindB("Debug::pkgAutoRemove",false)) std::clog << "pkgDepCache::writeStateFile()" << std::endl; diff --git a/apt-pkg/depcache.h b/apt-pkg/depcache.h index b2bcfb58a..84fed7f37 100644 --- a/apt-pkg/depcache.h +++ b/apt-pkg/depcache.h @@ -403,7 +403,7 @@ class pkgDepCache : protected pkgCache::Namespace // read persistent states bool readStateFile(OpProgress *prog); - bool writeStateFile(OpProgress *prog); + bool writeStateFile(OpProgress *prog, bool InstalledOnly=false); // Size queries inline double UsrSize() {return iUsrSize;}; -- cgit v1.2.3-70-g09d2