소스 검색

make --allow-insecure-repositories message an error

Not using this option, but using unsigned (and co) repositories will
cause these repositories to be ignored and data acquiring from them
fails, so this is very well in the realms of an error and helps in
making 'apt-get update' fail with a non-zero error code as well.
David Kalnischkies 12 년 전
부모
커밋
94f730fd71
1개의 변경된 파일과 3개의 추가작업 그리고 3개의 파일을 삭제
  1. 3 3
      apt-pkg/acquire-item.cc

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

@@ -1782,7 +1782,7 @@ void pkgAcqMetaSig::Failed(string Message,pkgAcquire::MethodConfig *Cnf)/*{{{*/
    } 
    } 
    else 
    else 
    {
    {
-      _error->Warning("Use --allow-insecure-repositories to force the update");
+      _error->Error("Use --allow-insecure-repositories to force the update");
    }
    }
 
 
    Item::Failed(Message,Cnf);
    Item::Failed(Message,Cnf);
@@ -2161,7 +2161,7 @@ void pkgAcqMetaIndex::Failed(string Message,
       QueueIndexes(false);
       QueueIndexes(false);
    } else {
    } else {
       // warn if the repository is unsinged
       // warn if the repository is unsinged
-      _error->Warning("Use --allow-insecure-repositories to force the update");
+      _error->Error("Use --allow-insecure-repositories to force the update");
       TransactionManager->AbortTransaction();
       TransactionManager->AbortTransaction();
       Status = StatError;
       Status = StatError;
       return;
       return;
@@ -2298,7 +2298,7 @@ void pkgAcqMetaClearSig::Failed(string Message,pkgAcquire::MethodConfig *Cnf) /*
          QueueIndexes(false);
          QueueIndexes(false);
       } else {
       } else {
          // warn if the repository is unsigned
          // warn if the repository is unsigned
-         _error->Warning("Use --allow-insecure-repositories to force the update");
+         _error->Error("Use --allow-insecure-repositories to force the update");
          TransactionManager->AbortTransaction();
          TransactionManager->AbortTransaction();
          Status = StatError;
          Status = StatError;
       }
       }