Browse Source

Ignored missing release files
Author: jgg
Date: 1999-01-31 22:25:34 GMT
Ignored missing release files

Arch Librarian 22 years ago
parent
commit
681d76d024
3 changed files with 34 additions and 7 deletions
  1. 20 3
      apt-pkg/acquire-item.cc
  2. 3 1
      apt-pkg/acquire-item.h
  3. 11 3
      cmdline/acqprogress.cc

+ 20 - 3
apt-pkg/acquire-item.cc

@@ -1,6 +1,6 @@
 // -*- mode: cpp; mode: fold -*-
 // -*- mode: cpp; mode: fold -*-
 // Description								/*{{{*/
 // Description								/*{{{*/
-// $Id: acquire-item.cc,v 1.20 1999/01/30 08:08:54 jgg Exp $
+// $Id: acquire-item.cc,v 1.21 1999/01/31 22:25:34 jgg Exp $
 /* ######################################################################
 /* ######################################################################
 
 
    Acquire Item - Item to acquire
    Acquire Item - Item to acquire
@@ -64,12 +64,12 @@ void pkgAcquire::Item::Failed(string Message,pkgAcquire::MethodConfig *Cnf)
 	  StringToBool(LookupTag(Message,"Transient-Failure"),false) == true)
 	  StringToBool(LookupTag(Message,"Transient-Failure"),false) == true)
       {
       {
 	 Status = StatIdle;
 	 Status = StatIdle;
-	 Owner->Dequeue(this);
+	 Dequeue();
 	 return;
 	 return;
       }
       }
       
       
       Status = StatError;
       Status = StatError;
-      Owner->Dequeue(this);
+      Dequeue();
    }   
    }   
 }
 }
 									/*}}}*/
 									/*}}}*/
@@ -329,6 +329,23 @@ string pkgAcqIndexRel::Describe()
    return Location->ReleaseURI();
    return Location->ReleaseURI();
 }
 }
 									/*}}}*/
 									/*}}}*/
+// AcqIndexRel::Failed - Silence failure messages for missing rel files	/*{{{*/
+// ---------------------------------------------------------------------
+/* */
+void pkgAcqIndexRel::Failed(string Message,pkgAcquire::MethodConfig *Cnf)
+{
+   // This is the retry counter
+   if (Cnf->LocalOnly == true || 
+       StringToBool(LookupTag(Message,"Transient-Failure"),false) == false)
+   {      
+      Status = StatIdle;
+      Dequeue();
+      return;
+   }
+   
+   Item::Failed(Message,Cnf);
+}
+									/*}}}*/
 
 
 // AcqArchive::AcqArchive - Constructor					/*{{{*/
 // AcqArchive::AcqArchive - Constructor					/*{{{*/
 // ---------------------------------------------------------------------
 // ---------------------------------------------------------------------

+ 3 - 1
apt-pkg/acquire-item.h

@@ -1,6 +1,6 @@
 // -*- mode: cpp; mode: fold -*-
 // -*- mode: cpp; mode: fold -*-
 // Description								/*{{{*/
 // Description								/*{{{*/
-// $Id: acquire-item.h,v 1.14 1999/01/30 08:08:54 jgg Exp $
+// $Id: acquire-item.h,v 1.15 1999/01/31 22:25:34 jgg Exp $
 /* ######################################################################
 /* ######################################################################
 
 
    Acquire Item - Item to acquire
    Acquire Item - Item to acquire
@@ -36,6 +36,7 @@ class pkgAcquire::Item
    pkgAcquire *Owner;
    pkgAcquire *Owner;
    inline void QueueURI(ItemDesc &Item)
    inline void QueueURI(ItemDesc &Item)
                  {Owner->Enqueue(Item);};
                  {Owner->Enqueue(Item);};
+   inline void Dequeue() {Owner->Dequeue(this);};
    
    
    void Rename(string From,string To);
    void Rename(string From,string To);
    
    
@@ -97,6 +98,7 @@ class pkgAcqIndexRel : public pkgAcquire::Item
    
    
    public:
    public:
    
    
+   virtual void Failed(string Message,pkgAcquire::MethodConfig *Cnf);
    virtual void Done(string Message,unsigned long Size,string Md5Hash);   
    virtual void Done(string Message,unsigned long Size,string Md5Hash);   
    virtual string Custom600Headers();
    virtual string Custom600Headers();
    virtual string Describe();
    virtual string Describe();

+ 11 - 3
cmdline/acqprogress.cc

@@ -1,6 +1,6 @@
 // -*- mode: cpp; mode: fold -*-
 // -*- mode: cpp; mode: fold -*-
 // Description								/*{{{*/
 // Description								/*{{{*/
-// $Id: acqprogress.cc,v 1.7 1999/01/27 02:48:53 jgg Exp $
+// $Id: acqprogress.cc,v 1.8 1999/01/31 22:25:34 jgg Exp $
 /* ######################################################################
 /* ######################################################################
 
 
    Acquire Progress - Command line progress meter 
    Acquire Progress - Command line progress meter 
@@ -93,8 +93,16 @@ void AcqTextStatus::Fail(pkgAcquire::ItemDesc &Itm)
    if (Quiet <= 0)
    if (Quiet <= 0)
       cout << '\r' << BlankLine << '\r';
       cout << '\r' << BlankLine << '\r';
    
    
-   cout << "Err " << Itm.Description << endl;
-   cout << "  " << Itm.Owner->ErrorText << endl;
+   if (Itm.Owner->Status == pkgAcquire::Item::StatIdle)
+   {
+      cout << "Ign " << Itm.Description << endl;
+   }
+   else
+   {
+      cout << "Err " << Itm.Description << endl;
+      cout << "  " << Itm.Owner->ErrorText << endl;
+   }
+   
    Update = true;
    Update = true;
 };
 };
 									/*}}}*/
 									/*}}}*/