MCPcopy Create free account
hub / github.com/Kitware/CMake / RunRepogen

Method RunRepogen

Source/CPack/IFW/cmCPackIFWGenerator.cxx:119–162  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

117}
118
119int cmCPackIFWGenerator::RunRepogen(std::string const& ifwTmpFile)
120{
121 if (this->Installer.RemoteRepositories.empty()) {
122 return 1;
123 }
124
125 std::vector<std::string> ifwCmd = this->BuildRepogenCommand();
126 cmCPackIFWLogger(VERBOSE,
127 "Execute: " << cmSystemTools::PrintSingleCommand(ifwCmd)
128 << std::endl);
129 std::string output;
130 int retVal = 1;
131 cmCPackIFWLogger(OUTPUT, "- Generate repository" << std::endl);
132 bool res = cmSystemTools::RunSingleCommand(ifwCmd, &output, &output, &retVal,
133 nullptr, this->GeneratorVerbose,
134 cmDuration::zero());
135 if (!res || retVal) {
136 cmGeneratedFileStream ofs(ifwTmpFile);
137 ofs << "# Run command: " << cmSystemTools::PrintSingleCommand(ifwCmd)
138 << std::endl
139 << "# Output:" << std::endl
140 << output << std::endl;
141 cmCPackIFWLogger(
142 ERROR,
143 "Problem running IFW command: "
144 << cmSystemTools::PrintSingleCommand(ifwCmd) << std::endl
145 << "Please check \"" << ifwTmpFile << "\" for errors" << std::endl);
146 return 0;
147 }
148
149 if (!this->Repository.RepositoryUpdate.empty() &&
150 !this->Repository.PatchUpdatesXml()) {
151 cmCPackIFWLogger(WARNING,
152 "Problem patch IFW \"Updates\" "
153 << "file: \"" << this->toplevel
154 << "/repository/Updates.xml\"" << std::endl);
155 }
156
157 cmCPackIFWLogger(OUTPUT,
158 "- repository: \"" << this->toplevel
159 << "/repository\" generated"
160 << std::endl);
161 return 1;
162}
163
164std::vector<std::string> cmCPackIFWGenerator::BuildBinaryCreatorCommand()
165{

Callers 1

PackageFilesMethod · 0.95

Calls 3

BuildRepogenCommandMethod · 0.95
PatchUpdatesXmlMethod · 0.80
emptyMethod · 0.45

Tested by

no test coverage detected