summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArch Librarian <arch@canonical.com>2004-09-20 16:58:29 +0000
committerArch Librarian <arch@canonical.com>2004-09-20 16:58:29 +0000
commitc37b9502fd00e03d7722314f94beb4f1441f621f (patch)
tree84efe6a966b8515b7c7056a27103e2a1752d2d99
parent11e97c45a67ab4a33975d178889cb4399c7dc01b (diff)
Various bug fixes
Author: jgg Date: 2001-07-01 20:49:08 GMT Various bug fixes
-rw-r--r--apt-pkg/cachefile.cc5
-rw-r--r--cmdline/apt-get.cc21
-rw-r--r--debian/changelog5
-rw-r--r--methods/http.cc6
4 files changed, 28 insertions, 9 deletions
diff --git a/apt-pkg/cachefile.cc b/apt-pkg/cachefile.cc
index 4bc93fd7c..8b3b02171 100644
--- a/apt-pkg/cachefile.cc
+++ b/apt-pkg/cachefile.cc
@@ -1,6 +1,6 @@
// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
-// $Id: cachefile.cc,v 1.6 2001/03/13 06:51:46 jgg Exp $
+// $Id: cachefile.cc,v 1.7 2001/07/01 20:49:08 jgg Exp $
/* ######################################################################
CacheFile - Simple wrapper class for opening, generating and whatnot
@@ -55,6 +55,9 @@ bool pkgCacheFile::Open(OpProgress &Progress,bool WithLock)
if (_system->Lock() == false)
return false;
+ if (_config->FindB("Debug::NoLocking",false) == true)
+ WithLock = false;
+
if (_error->PendingError() == true)
return false;
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
diff --git a/debian/changelog b/debian/changelog
index 68e6d6854..6e2e9a344 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -11,7 +11,7 @@ apt (0.5.4) unstable; urgency=low
similar situations. Closes: #56708, #59432
* no_proxy and ftp. Closes: #89671
* Philippe Batailler's man page patches.
- * Fix for display bug. Closes: #92033, #93652, #98468
+ * Fix for display bug. Closes: #92033, #93652, #98468, #102951
* Reordered some things to make dante and FTP happier. Closes: #92757
* James R. Van Zandt's guide.sgml updates. Closes: #90027
* apt-ftparchive copes with no uncompressed package files + contents.
@@ -28,6 +28,9 @@ apt (0.5.4) unstable; urgency=low
* Fixed no_proxy tokanizing. Closes: #100046
* Strip Config-Version when copying status to available. Closes: #97520
* Segfault with missing source files. Closes: #100325
+ * EINTR check. Closes: #102293
+ * Various changes to the locking metholodgy for --print-uris.
+ Closes: #100590
-- Jason Gunthorpe <jgg@debian.org> Thu, 8 Mar 2001 22:48:06 -0700
diff --git a/methods/http.cc b/methods/http.cc
index 1c3f61caa..6e989102b 100644
--- a/methods/http.cc
+++ b/methods/http.cc
@@ -1,6 +1,6 @@
// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
-// $Id: http.cc,v 1.52 2001/05/27 23:53:55 jgg Exp $
+// $Id: http.cc,v 1.53 2001/07/01 20:49:09 jgg Exp $
/* ######################################################################
HTTP Aquire Method - This is the HTTP aquire method for APT.
@@ -726,7 +726,11 @@ bool HttpMethod::Go(bool ToFile,ServerState *Srv)
tv.tv_usec = 0;
int Res = 0;
if ((Res = select(MaxFd+1,&rfds,&wfds,0,&tv)) < 0)
+ {
+ if (errno == EINTR)
+ return true;
return _error->Errno("select","Select failed");
+ }
if (Res == 0)
{