void pkgAcqIndex::Failed(string Message,pkgAcquire::MethodConfig *Cnf)
{
+
// no .bz2 found, retry with .gz
if(Desc.URI.substr(Desc.URI.size()-3) == "bz2") {
Desc.URI = Desc.URI.substr(0,Desc.URI.size()-3) + "gz";
Complete = false;
Dequeue();
return;
+ }
+
+ // on decompression failure, remove bad versions in partial/
+ if(Decompression && Erase) {
+ string s = _config->FindDir("Dir::State::lists") + "partial/";
+ s += URItoFileName(RealURI);
+ unlink(s.c_str());
}
-
Item::Failed(Message,Cnf);
}
Item.Owner->Status = Item::StatIdle;
// Queue it into the named queue
- I->Enqueue(Item);
- ToFetch++;
-
+ if(I->Enqueue(Item))
+ ToFetch++;
+
// Some trace stuff
if (Debug == true)
{
// Queue::Enqueue - Queue an item to the queue /*{{{*/
// ---------------------------------------------------------------------
/* */
-void pkgAcquire::Queue::Enqueue(ItemDesc &Item)
+bool pkgAcquire::Queue::Enqueue(ItemDesc &Item)
{
QItem **I = &Items;
- for (; *I != 0; I = &(*I)->Next);
-
+ // move to the end of the queue and check for duplicates here
+ for (; *I != 0; I = &(*I)->Next)
+ if (Item.URI == (*I)->URI)
+ {
+ Item.Owner->Status = Item::StatDone;
+ return false;
+ }
+
// Create a new item
QItem *Itm = new QItem;
*Itm = Item;
Item.Owner->QueueCounter++;
if (Items->Next == 0)
Cycle();
+ return true;
}
/*}}}*/
// Queue::Dequeue - Remove an item from the queue /*{{{*/
public:
// Put an item into this queue
- void Enqueue(ItemDesc &Item);
+ bool Enqueue(ItemDesc &Item);
bool Dequeue(Item *Owner);
// Find a Queued item
AC_CONFIG_HEADER(include/config.h:buildlib/config.h.in include/apti18n.h:buildlib/apti18n.h.in)
dnl -- SET THIS TO THE RELEASE VERSION --
-AC_DEFINE_UNQUOTED(VERSION,"0.6.46.4ubuntu10")
+AC_DEFINE_UNQUOTED(VERSION,"0.6.46.4ubuntu11")
PACKAGE="apt"
AC_DEFINE_UNQUOTED(PACKAGE,"$PACKAGE")
AC_SUBST(PACKAGE)
-apt (0.6.46.4ubuntu11) feisty; urgency=low
+apt (0.6.46.4ubuntu11) UNRELEASED; urgency=low
* po/gl.po:
- fix error in translation that causes trouble to lsb_release
(LP#79165)
+ * apt-pkg/acquire-item.cc:
+ - if decompression of a index fails, delete the index (LP#68202)
+ * [internal-ABI] apt-pkg/acquire.{cc,h}:
+ - deal better with duplicated sources.list entries (avoid
+ double queuing of URLs) - this fixes hangs in bzip/gzip
+ (LP#102511)
- --
+ -- Michael Vogt <michael.vogt@ubuntu.com> Tue, 17 Apr 2007 15:53:37 +0200
apt (0.6.46.4ubuntu10) feisty; urgency=low