diff options
author | Arch Librarian <arch@canonical.com> | 2004-09-20 16:58:29 +0000 |
---|---|---|
committer | Arch Librarian <arch@canonical.com> | 2004-09-20 16:58:29 +0000 |
commit | c37b9502fd00e03d7722314f94beb4f1441f621f (patch) | |
tree | 84efe6a966b8515b7c7056a27103e2a1752d2d99 /cmdline/apt-get.cc | |
parent | 11e97c45a67ab4a33975d178889cb4399c7dc01b (diff) |
Various bug fixes
Author: jgg
Date: 2001-07-01 20:49:08 GMT
Various bug fixes
Diffstat (limited to 'cmdline/apt-get.cc')
-rw-r--r-- | cmdline/apt-get.cc | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/cmdline/apt-get.cc b/cmdline/apt-get.cc index 70e86f219..e79bb3913 100644 --- a/cmdline/apt-get.cc +++ b/cmdline/apt-get.cc @@ -1,6 +1,6 @@ // -*- mode: cpp; mode: fold -*- // Description /*{{{*/ -// $Id: apt-get.cc,v 1.107 2001/05/27 04:45:49 jgg Exp $ +// $Id: apt-get.cc,v 1.108 2001/07/01 20:49:08 jgg Exp $ /* ###################################################################### apt-get - Cover for dpkg @@ -88,6 +88,13 @@ class CacheFile : public pkgCacheFile return true; }; + bool OpenForInstall() + { + if (_config->FindB("APT::Get::Print-URIs") == true) + Open(false); + else + Open(true); + } CacheFile() : List(0) {}; }; /*}}}*/ @@ -635,7 +642,8 @@ bool InstallPackages(CacheFile &Cache,bool ShwKept,bool Ask = true, // Lock the archive directory FileFd Lock; - if (_config->FindB("Debug::NoLocking",false) == false) + if (_config->FindB("Debug::NoLocking",false) == false && + _config->FindB("APT::Get::Print-URIs") == false) { Lock.Fd(GetLock(_config->FindDir("Dir::Cache::Archives") + "lock")); if (_error->PendingError() == true) @@ -1189,7 +1197,7 @@ bool DoUpdate(CommandLine &CmdL) bool DoUpgrade(CommandLine &CmdL) { CacheFile Cache; - if (Cache.Open() == false || Cache.CheckDeps() == false) + if (Cache.OpenForInstall() == false || Cache.CheckDeps() == false) return false; // Do the upgrade @@ -1208,7 +1216,8 @@ bool DoUpgrade(CommandLine &CmdL) bool DoInstall(CommandLine &CmdL) { CacheFile Cache; - if (Cache.Open() == false || Cache.CheckDeps(CmdL.FileSize() != 1) == false) + if (Cache.OpenForInstall() == false || + Cache.CheckDeps(CmdL.FileSize() != 1) == false) return false; // Enter the special broken fixing mode if the user specified arguments @@ -1404,7 +1413,7 @@ bool DoInstall(CommandLine &CmdL) bool DoDistUpgrade(CommandLine &CmdL) { CacheFile Cache; - if (Cache.Open() == false || Cache.CheckDeps() == false) + if (Cache.OpenForInstall() == false || Cache.CheckDeps() == false) return false; c0out << _("Calculating Upgrade... ") << flush; @@ -1426,7 +1435,7 @@ bool DoDistUpgrade(CommandLine &CmdL) bool DoDSelectUpgrade(CommandLine &CmdL) { CacheFile Cache; - if (Cache.Open() == false || Cache.CheckDeps() == false) + if (Cache.OpenForInstall() == false || Cache.CheckDeps() == false) return false; // Install everything with the install flag set |