// -*- 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
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. "
// Check the size
if (Size != Version->Size)
{
- _error->Error("Size mismatch for package %s",Version.ParentPkg().Name());
+ Status = StatError;
+ ErrorText = "Size mismatch";
return;
}
{
if (Md5Hash != MD5)
{
- _error->Error("MD5Sum mismatch for package %s",Version.ParentPkg().Name());
+ Status = StatError;
+ ErrorText = "MD5Sum mismatch";
Rename(DestFile,DestFile + ".FAILED");
return;
}
// -*- 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
break;
}
- Pulse();
pkgAcquire::Item *Owner = Itm->Owner;
pkgAcquire::ItemDesc Desc = *Itm;
OwnerQ->ItemDone(Itm);
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();
// -*- 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.
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;};
// -*- 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
/* This is called to correct the installation when packages could not
be downloaded. */
bool pkgPackageManager::FixMissing()
-{
+{
pkgProblemResolver Resolve(Cache);
List->SetFileList(FileNames);
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;