summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--apt-pkg/acquire-item.cc13
-rw-r--r--apt-pkg/acquire-worker.cc7
-rw-r--r--apt-pkg/orderlist.h4
-rw-r--r--apt-pkg/packagemanager.cc8
4 files changed, 20 insertions, 12 deletions
diff --git a/apt-pkg/acquire-item.cc b/apt-pkg/acquire-item.cc
index 1f7980b11..63c47f736 100644
--- a/apt-pkg/acquire-item.cc
+++ b/apt-pkg/acquire-item.cc
@@ -1,6 +1,6 @@
// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
-// $Id: acquire-item.cc,v 1.34 1999/07/20 05:53:32 jgg Exp $
+// $Id: acquire-item.cc,v 1.35 1999/08/03 05:19:41 jgg Exp $
/* ######################################################################
Acquire Item - Item to acquire
@@ -350,15 +350,18 @@ pkgAcqArchive::pkgAcqArchive(pkgAcquire *Owner,pkgSourceList *Sources,
Retries = _config->FindI("Acquire::Retries",0);
if (Version.Arch() == 0)
+ {
_error->Error("I wasn't able to locate file for the %s package. "
"This might mean you need to manually fix this package. (due to missing arch)",
Version.ParentPkg().Name());
+ return;
+ }
// Generate the final file name as: package_version_arch.deb
StoreFilename = QuoteString(Version.ParentPkg().Name(),"_:") + '_' +
QuoteString(Version.VerStr(),"_:") + '_' +
QuoteString(Version.Arch(),"_:.") + ".deb";
-
+
// Select a source
if (QueueNext() == false && _error->PendingError() == false)
_error->Error("I wasn't able to locate file for the %s package. "
@@ -476,7 +479,8 @@ void pkgAcqArchive::Done(string Message,unsigned long Size,string Md5Hash)
// Check the size
if (Size != Version->Size)
{
- _error->Error("Size mismatch for package %s",Version.ParentPkg().Name());
+ Status = StatError;
+ ErrorText = "Size mismatch";
return;
}
@@ -485,7 +489,8 @@ void pkgAcqArchive::Done(string Message,unsigned long Size,string Md5Hash)
{
if (Md5Hash != MD5)
{
- _error->Error("MD5Sum mismatch for package %s",Version.ParentPkg().Name());
+ Status = StatError;
+ ErrorText = "MD5Sum mismatch";
Rename(DestFile,DestFile + ".FAILED");
return;
}
diff --git a/apt-pkg/acquire-worker.cc b/apt-pkg/acquire-worker.cc
index 7fdb03aa6..d5b4541a3 100644
--- a/apt-pkg/acquire-worker.cc
+++ b/apt-pkg/acquire-worker.cc
@@ -1,6 +1,6 @@
// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
-// $Id: acquire-worker.cc,v 1.25 1999/08/03 02:25:38 jgg Exp $
+// $Id: acquire-worker.cc,v 1.26 1999/08/03 05:19:41 jgg Exp $
/* ######################################################################
Acquire Worker
@@ -245,7 +245,6 @@ bool pkgAcquire::Worker::RunMessages()
break;
}
- Pulse();
pkgAcquire::Item *Owner = Itm->Owner;
pkgAcquire::ItemDesc Desc = *Itm;
OwnerQ->ItemDone(Itm);
@@ -253,8 +252,8 @@ bool pkgAcquire::Worker::RunMessages()
atoi(LookupTag(Message,"Size","0").c_str()) != TotalSize)
_error->Warning("Bizzar Error - File size is not what the server reported %s %u",
LookupTag(Message,"Size","0").c_str(),TotalSize);
-
- Owner->Done(Message,CurrentSize,
+
+ Owner->Done(Message,atoi(LookupTag(Message,"Size","0").c_str()),
LookupTag(Message,"MD5-Hash"));
ItemDone();
diff --git a/apt-pkg/orderlist.h b/apt-pkg/orderlist.h
index 121c9a90e..f15db4ce6 100644
--- a/apt-pkg/orderlist.h
+++ b/apt-pkg/orderlist.h
@@ -1,6 +1,6 @@
// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
-// $Id: orderlist.h,v 1.5 1999/07/12 03:40:38 jgg Exp $
+// $Id: orderlist.h,v 1.6 1999/08/03 05:19:41 jgg Exp $
/* ######################################################################
Order List - Represents and Manipulates an ordered list of packages.
@@ -102,7 +102,7 @@ class pkgOrderList
bool IsMissing(PkgIterator Pkg);
void WipeFlags(unsigned long F);
void SetFileList(string *FileList) {this->FileList = FileList;};
-
+
// Accessors
inline iterator begin() {return List;};
inline iterator end() {return End;};
diff --git a/apt-pkg/packagemanager.cc b/apt-pkg/packagemanager.cc
index 126caef93..68827f53c 100644
--- a/apt-pkg/packagemanager.cc
+++ b/apt-pkg/packagemanager.cc
@@ -1,6 +1,6 @@
// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
-// $Id: packagemanager.cc,v 1.18 1999/07/10 04:58:42 jgg Exp $
+// $Id: packagemanager.cc,v 1.19 1999/08/03 05:19:41 jgg Exp $
/* ######################################################################
Package Manager - Abstacts the package manager
@@ -87,7 +87,7 @@ bool pkgPackageManager::GetArchives(pkgAcquire *Owner,pkgSourceList *Sources,
/* This is called to correct the installation when packages could not
be downloaded. */
bool pkgPackageManager::FixMissing()
-{
+{
pkgProblemResolver Resolve(Cache);
List->SetFileList(FileNames);
@@ -101,6 +101,10 @@ bool pkgPackageManager::FixMissing()
Bad = true;
Cache.MarkKeep(I);
}
+
+ // We have to empty the list otherwise it will not have the new changes
+ delete List;
+ List = 0;
if (Bad == false)
return true;