Explorar o código

report write errors in EDSP/EIPP properly back to caller

Unlikely to happen in practice and I wonder more how I could miss these
in earlier reviews, but okay, lets fix it for consistency now.
David Kalnischkies %!s(int64=10) %!d(string=hai) anos
pai
achega
5958c7497e
Modificáronse 1 ficheiros con 3 adicións e 6 borrados
  1. 3 6
      apt-pkg/edsp.cc

+ 3 - 6
apt-pkg/edsp.cc

@@ -439,7 +439,7 @@ bool EDSP::WriteScenario(pkgDepCache &Cache, FileFd &output, OpProgress *Progres
 	    Progress->Progress(p);
 	    Progress->Progress(p);
       }
       }
    }
    }
-   return true;
+   return Okay;
 }
 }
 									/*}}}*/
 									/*}}}*/
 // EDSP::WriteLimitedScenario - to the given file descriptor		/*{{{*/
 // EDSP::WriteLimitedScenario - to the given file descriptor		/*{{{*/
@@ -1284,7 +1284,7 @@ bool EIPP::WriteScenario(pkgDepCache &Cache, FileFd &output, OpProgress * const
 	 continue;
 	 continue;
       forAllInterestingVersions(Cache, Pkg, WriteVersion);
       forAllInterestingVersions(Cache, Pkg, WriteVersion);
    }
    }
-   return true;
+   return Okay;
 }
 }
 									/*}}}*/
 									/*}}}*/
 // EIPP::ReadResponse - from the given file descriptor			/*{{{*/
 // EIPP::ReadResponse - from the given file descriptor			/*{{{*/
@@ -1361,7 +1361,7 @@ bool EIPP::ReadResponse(int const input, pkgPackageManager * const PM, OpProgres
       else if (strcmp(type, "Remove") == 0)
       else if (strcmp(type, "Remove") == 0)
 	 PM->Remove(Pkg, PM->Cache[Pkg].Purge());
 	 PM->Remove(Pkg, PM->Cache[Pkg].Purge());
    }
    }
-   return true;
+   return in.Failed() == false;
 }
 }
 									/*}}}*/
 									/*}}}*/
 bool EIPP::ReadRequest(int const input, std::list<std::pair<std::string,PKG_ACTION>> &actions,/*{{{*/
 bool EIPP::ReadRequest(int const input, std::list<std::pair<std::string,PKG_ACTION>> &actions,/*{{{*/
@@ -1417,9 +1417,6 @@ bool EIPP::ReadRequest(int const input, std::list<std::pair<std::string,PKG_ACTI
       }
       }
    }
    }
    return false;
    return false;
-
-
-   return false;
 }
 }
 									/*}}}*/
 									/*}}}*/
 bool EIPP::ApplyRequest(std::list<std::pair<std::string,PKG_ACTION>> &actions,/*{{{*/
 bool EIPP::ApplyRequest(std::list<std::pair<std::string,PKG_ACTION>> &actions,/*{{{*/