From 12bffed79329218e2c567d75a54738301b967259 Mon Sep 17 00:00:00 2001 From: "bubulle@debian.org" <> Date: Sat, 23 Feb 2008 08:45:36 +0100 Subject: Fix some strings and unfuzzy translations. Closes: #466845 --- cmdline/apt-cache.cc | 4 ++-- cmdline/apt-get.cc | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'cmdline') diff --git a/cmdline/apt-cache.cc b/cmdline/apt-cache.cc index c0655da40..f10ea48be 100644 --- a/cmdline/apt-cache.cc +++ b/cmdline/apt-cache.cc @@ -244,7 +244,7 @@ bool DumpPackage(CommandLine &CmdL) bool Stats(CommandLine &Cmd) { pkgCache &Cache = *GCache; - cout << _("Total package names : ") << Cache.Head().PackageCount << " (" << + cout << _("Total package names: ") << Cache.Head().PackageCount << " (" << SizeToStr(Cache.Head().PackageCount*Cache.Head().PackageSz) << ')' << endl; int Normal = 0; @@ -292,7 +292,7 @@ bool Stats(CommandLine &Cmd) cout << _("Total distinct versions: ") << Cache.Head().VersionCount << " (" << SizeToStr(Cache.Head().VersionCount*Cache.Head().VersionSz) << ')' << endl; - cout << _("Total Distinct Descriptions: ") << Cache.Head().DescriptionCount << " (" << + cout << _("Total distinct descriptions: ") << Cache.Head().DescriptionCount << " (" << SizeToStr(Cache.Head().DescriptionCount*Cache.Head().DescriptionSz) << ')' << endl; cout << _("Total dependencies: ") << Cache.Head().DependsCount << " (" << SizeToStr(Cache.Head().DependsCount*Cache.Head().DependencySz) << ')' << endl; diff --git a/cmdline/apt-get.cc b/cmdline/apt-get.cc index 11a8b2ef4..be194f2db 100644 --- a/cmdline/apt-get.cc +++ b/cmdline/apt-get.cc @@ -2618,7 +2618,7 @@ bool ShowHelp(CommandLine &CmdL) " upgrade - Perform an upgrade\n" " install - Install new packages (pkg is libc6 not libc6.deb)\n" " remove - Remove packages\n" - " autoremove - Remove all automatic unused packages\n" + " autoremove - Remove automatically all unused packages\n" " purge - Remove and purge packages\n" " source - Download source archives\n" " build-dep - Configure build-dependencies for source packages\n" -- cgit v1.2.3 From 0748d509f684e192e295302e77263719323f0d1a Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Tue, 11 Mar 2008 09:53:09 +0100 Subject: * cmdline/apt-get.cc: - fix incorrect help output for -f (LP: #57487) --- cmdline/apt-get.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cmdline') diff --git a/cmdline/apt-get.cc b/cmdline/apt-get.cc index 11a8b2ef4..920e5e2ec 100644 --- a/cmdline/apt-get.cc +++ b/cmdline/apt-get.cc @@ -2635,7 +2635,7 @@ bool ShowHelp(CommandLine &CmdL) " -d Download only - do NOT install or unpack archives\n" " -s No-act. Perform ordering simulation\n" " -y Assume Yes to all queries and do not prompt\n" - " -f Attempt to continue if the integrity check fails\n" + " -f Attempt to correct a system with broken dependencies in place\n" " -m Attempt to continue if archives are unlocatable\n" " -u Show a list of upgraded packages as well\n" " -b Build the source package after fetching it\n" -- cgit v1.2.3 From 9dbe6ae43a5a78f68a4863650a5d23eb9051d0f7 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Tue, 11 Mar 2008 17:40:15 +0100 Subject: - run the problemResolver after a task was installed so that it can correct any missing dependencies --- cmdline/apt-get.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'cmdline') diff --git a/cmdline/apt-get.cc b/cmdline/apt-get.cc index 920e5e2ec..fe9416f1a 100644 --- a/cmdline/apt-get.cc +++ b/cmdline/apt-get.cc @@ -1506,10 +1506,13 @@ bool TryInstallTask(pkgDepCache &Cache, pkgProblemResolver &Fix, buf[end-start] = 0x0; if (regexec(&Pattern,buf,0,0,0) != 0) continue; - res &= TryToInstall(Pkg,Cache,Fix,Remove,false,ExpectedInst); + res &= TryToInstall(Pkg,Cache,Fix,Remove,true,ExpectedInst); found = true; } + // now let the problem resolver deal with any issues + Fix.Resolve(true); + if(!found) _error->Error(_("Couldn't find task %s"),taskname); -- cgit v1.2.3 From 85bd111a9b0778ba6e2b8950d369aeca192f9555 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Thu, 13 Mar 2008 23:19:10 +0100 Subject: cmdline/apt-get.cc: - install tasks in two passes, first without dependency auto-install, the with it. this ensure that we do not run in a situation were a task packages A dependens on B|C and C is part of the task but B gets installed too because of the greedy nature of apt --- cmdline/apt-get.cc | 29 +++++++++++++++++------------ 1 file changed, 17 insertions(+), 12 deletions(-) (limited to 'cmdline') diff --git a/cmdline/apt-get.cc b/cmdline/apt-get.cc index fe9416f1a..3f9a5b248 100644 --- a/cmdline/apt-get.cc +++ b/cmdline/apt-get.cc @@ -1495,19 +1495,24 @@ bool TryInstallTask(pkgDepCache &Cache, pkgProblemResolver &Fix, bool found = false; bool res = true; - for (Pkg = Cache.PkgBegin(); Pkg.end() == false; Pkg++) + + // two runs, first ignore dependencies, second install any missing + for(int IgnoreBroken=1; IgnoreBroken >= 0; IgnoreBroken--) { - pkgCache::VerIterator ver = Cache[Pkg].CandidateVerIter(Cache); - if(ver.end()) - continue; - pkgRecords::Parser &parser = Recs.Lookup(ver.FileList()); - parser.GetRec(start,end); - strncpy(buf, start, end-start); - buf[end-start] = 0x0; - if (regexec(&Pattern,buf,0,0,0) != 0) - continue; - res &= TryToInstall(Pkg,Cache,Fix,Remove,true,ExpectedInst); - found = true; + for (Pkg = Cache.PkgBegin(); Pkg.end() == false; Pkg++) + { + pkgCache::VerIterator ver = Cache[Pkg].CandidateVerIter(Cache); + if(ver.end()) + continue; + pkgRecords::Parser &parser = Recs.Lookup(ver.FileList()); + parser.GetRec(start,end); + strncpy(buf, start, end-start); + buf[end-start] = 0x0; + if (regexec(&Pattern,buf,0,0,0) != 0) + continue; + res &= TryToInstall(Pkg,Cache,Fix,Remove,IgnoreBroken,ExpectedInst); + found = true; + } } // now let the problem resolver deal with any issues -- cgit v1.2.3 From 3a341a1deda6123f219765d0cd4a51fd826e213e Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Tue, 8 Apr 2008 14:19:20 +0200 Subject: cmdline/apt-key: only use verify_against_master_keyring in net-update, not in update. it does not add any security in update (see comment in the source for rational) --- cmdline/apt-key | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'cmdline') diff --git a/cmdline/apt-key b/cmdline/apt-key index 6dd9fd8aa..bf1a5fefb 100755 --- a/cmdline/apt-key +++ b/cmdline/apt-key @@ -32,9 +32,8 @@ add_keys_with_verify_against_master_keyring() { # when adding new keys, make sure that the archive-master-keyring # is honored. so: - # all keys that are exported and have the name - # "Ubuntu Archive Automatic Signing Key" must have a valid signature - # from a key in the ubuntu-master-keyring + # all keys that are exported must have a valid signature + # from a key in the $distro-master-keyring add_keys=`$GPG_CMD --keyring $ADD_KEYRING --with-colons --list-keys | grep ^pub | cut -d: -f5` master_keys=`$GPG_CMD --keyring $MASTER --with-colons --list-keys | grep ^pub | cut -d: -f5` for add_key in $add_keys; do @@ -84,13 +83,14 @@ update() { exit 1 fi - # add new keys, if no MASTER_KEYRING is used, use the traditional - # way - if [ -z "$MASTER_KEYRING" ]; then - $GPG_CMD --quiet --batch --keyring $ARCHIVE_KEYRING --export | $GPG --import - else - add_keys_with_verify_against_master_keyring $ARCHIVE_KEYRING $MASTER_KEYRING - fi + # add new keys from the package; + + # we do not use add_keys_with_verify_against_master_keyring here, + # because we "update" is run on regular package updates. A + # attacker might as well replace the master-archive-keyring file + # in the package and add his own keys. so this check wouldn't + # add any security. we *need* this check on net-update though + $GPG_CMD --quiet --batch --keyring $ARCHIVE_KEYRING --export | $GPG --import # remove no-longer supported/used keys keys=`$GPG_CMD --keyring $REMOVED_KEYS --with-colons --list-keys | grep ^pub | cut -d: -f5` -- cgit v1.2.3 From e88d983a7463dd8d7e6d8f8ea87b5bed6dedf8a9 Mon Sep 17 00:00:00 2001 From: Otavio Salvador Date: Fri, 2 May 2008 13:56:26 -0300 Subject: Add support for --no-download on apt-get update. Closes: #478517 --- cmdline/apt-get.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'cmdline') diff --git a/cmdline/apt-get.cc b/cmdline/apt-get.cc index 92a263e50..104baba8a 100644 --- a/cmdline/apt-get.cc +++ b/cmdline/apt-get.cc @@ -1374,8 +1374,9 @@ bool DoUpdate(CommandLine &CmdL) // do the work CacheFile Cache; - bool res = ListUpdate(Stat, List); - + if (_config->FindB("APT::Get::Download",true) == true) + ListUpdate(Stat, List); + // Rebuild the cache. if (Cache.BuildCaches() == false) return false; -- cgit v1.2.3 From 1171258afb052c3ddcb4e5dc3f19b4ec1b29e4b9 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Mon, 5 May 2008 10:58:39 +0200 Subject: * added debian/README.source --- cmdline/apt-key | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cmdline') diff --git a/cmdline/apt-key b/cmdline/apt-key index bf1a5fefb..3f886987e 100755 --- a/cmdline/apt-key +++ b/cmdline/apt-key @@ -86,7 +86,7 @@ update() { # add new keys from the package; # we do not use add_keys_with_verify_against_master_keyring here, - # because we "update" is run on regular package updates. A + # because "update" is run on regular package updates. A # attacker might as well replace the master-archive-keyring file # in the package and add his own keys. so this check wouldn't # add any security. we *need* this check on net-update though -- cgit v1.2.3