From be0a16728d441e6b37f647e0b989b173cca0c142 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Thu, 28 Sep 2006 00:32:38 +0200 Subject: * cmdline/apt-get.cc: - run TryToInstall() in a way that it won't automatically tries to fix the cache after each package but queue them all first --- cmdline/apt-get.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmdline/apt-get.cc b/cmdline/apt-get.cc index 09bf572a5..25d205a4f 100644 --- a/cmdline/apt-get.cc +++ b/cmdline/apt-get.cc @@ -1440,7 +1440,7 @@ bool TryInstallTask(pkgDepCache &Cache, pkgProblemResolver &Fix, buf[end-start] = 0x0; if (regexec(&Pattern,buf,0,0,0) != 0) continue; - res &= TryToInstall(Pkg,Cache,Fix,false,BrokenFix,ExpectedInst); + res &= TryToInstall(Pkg,Cache,Fix,false,true,ExpectedInst); found = true; } -- 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(-) 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 c37030c2566a511787933f801a89430f26e5b18a Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Sat, 9 Jun 2007 01:02:25 +0200 Subject: * debian/control: increase standards version * methods/http.cc: revert pipeline depth and move global Proxy to here * methods/http.h: remove Proxy from here --- debian/control | 2 +- methods/http.cc | 3 ++- methods/http.h | 2 -- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/debian/control b/debian/control index a47d13817..46fd59484 100644 --- a/debian/control +++ b/debian/control @@ -3,7 +3,7 @@ Section: admin Priority: important Maintainer: APT Development Team Uploaders: Jason Gunthorpe , Adam Heath , Matt Zimmerman , Michael Vogt -Standards-Version: 3.6.2.2 +Standards-Version: 3.7.2.2 Build-Depends: debhelper (>= 5.0), libdb4.4-dev, gettext (>= 0.12), libcurl3-gnutls-dev (>= 7.15.5) Build-Depends-Indep: debiandoc-sgml, docbook-utils (>= 0.6.12-1) diff --git a/methods/http.cc b/methods/http.cc index 4b9622b00..d9487be88 100644 --- a/methods/http.cc +++ b/methods/http.cc @@ -55,9 +55,10 @@ using namespace std; string HttpMethod::FailFile; int HttpMethod::FailFd = -1; time_t HttpMethod::FailTime = 0; -unsigned long PipelineDepth = 8; +unsigned long PipelineDepth = 10; unsigned long TimeOut = 120; bool Debug = false; +URI Proxy; unsigned long CircleBuf::BwReadLimit=0; unsigned long CircleBuf::BwTickReadData=0; diff --git a/methods/http.h b/methods/http.h index 541e2952c..a6191e501 100644 --- a/methods/http.h +++ b/methods/http.h @@ -158,6 +158,4 @@ class HttpMethod : public pkgAcqMethod }; }; -URI Proxy; - #endif -- cgit v1.2.3-70-g09d2 From 5a68ea79e4828bb5615b1d490fe811c18d04a8e1 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Sat, 9 Jun 2007 01:22:45 +0200 Subject: * cmdline/apt-get.cc: - revert task-install feature - show auto-removal information --- cmdline/apt-get.cc | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/cmdline/apt-get.cc b/cmdline/apt-get.cc index e4632cc6c..e9b619787 100644 --- a/cmdline/apt-get.cc +++ b/cmdline/apt-get.cc @@ -1596,6 +1596,18 @@ bool DoInstall(CommandLine &CmdL) bool Remove = DefRemove; char *VerTag = 0; bool VerIsRel = false; + + // this is a task! + if (Length >= 1 && S[Length - 1] == '^') + { + S[--Length] = 0; + // tasks must always be confirmed + ExpectedInst += 1000; + // see if we can install it + TryInstallTask(Cache, Fix, BrokenFix, ExpectedInst, S); + continue; + } + while (Cache->FindPkg(S).end() == true) { // Handle an optional end tag indicating what to do @@ -1744,10 +1756,8 @@ bool DoInstall(CommandLine &CmdL) return _error->Error(_("Broken packages")); } } - if (_config->FindB("APT::Get::AutomaticRemove")) { - if (!DoAutomaticRemove(Cache)) - return false; - } + if (!DoAutomaticRemove(Cache)) + return false; /* Print out a list of packages that are going to be installed extra to what the user asked */ -- 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(-) 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