]> git.saurik.com Git - apt.git/blobdiff - apt-pkg/acquire-worker.cc
* merged changes from Kamions upload (thanks!)
[apt.git] / apt-pkg / acquire-worker.cc
index e2b8bf9e4f01841bce2b41c04360a4d8b7cd01ed..8ab67778be5b8322fcbb1967bb74b253144fb494 100644 (file)
@@ -307,6 +307,13 @@ bool pkgAcquire::Worker::RunMessages()
            pkgAcquire::Item *Owner = Itm->Owner;
            pkgAcquire::ItemDesc Desc = *Itm;
            OwnerQ->ItemDone(Itm);
+
+           // set some status
+           if(LookupTag(Message,"FailReason") == "Timeout" || 
+              LookupTag(Message,"FailReason") == "TmpResolveFailure" ||
+              LookupTag(Message,"FailReason") == "ConnectionRefused") 
+              Owner->Status = pkgAcquire::Item::StatTransientNetworkError;
+
            Owner->Failed(Message,Config);
            ItemDone();
 
@@ -374,9 +381,14 @@ bool pkgAcquire::Worker::MediaChange(string Message)
       string Media = LookupTag(Message,"Media");
       string Drive = LookupTag(Message,"Drive"); 
       ostringstream msg,status;
+      ioprintf(msg,_("Please insert the disc labeled: "
+                    "'%s' "
+                    "in the drive '%s' and press enter."),
+              Media.c_str(),Drive.c_str());
       status << "media-change: "  // message
-            << Media  << ":"     //media
-            << Drive  //drive
+            << Media  << ":"     // media
+            << Drive  << ":"     // drive
+            << msg.str()         // l10n message
             << endl;
       write(status_fd, status.str().c_str(), status.str().size());
    }