Skip to content

Commit b61866b

Browse files
committed
backends/solus: Add debugging patch to verify missing packages
Packages get dropped from the catalog for seemingly no reason, verify it's not the fault in our backend
1 parent 5788fc9 commit b61866b

2 files changed

Lines changed: 24 additions & 0 deletions

File tree

src/engine.cpp

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -257,6 +257,7 @@ bool Engine::packageIsInteresting(std::shared_ptr<Package> pkg)
257257
if (gst.has_value() && gst->isNotEmpty())
258258
return true;
259259

260+
logDebug("Package isn't interesting {}", pkg->id());
260261
return false;
261262
}
262263

@@ -291,6 +292,28 @@ bool Engine::seedContentsData(
291292
if (packagesToProcess.empty())
292293
packagesToProcess = m_pkgIndex->packagesFor(suite.name, section, arch);
293294

295+
char filename[] = "/tmp/output_XXXXXX";
296+
int fd = mkstemp(filename);
297+
298+
if (fd == -1) {
299+
perror("mkstemp");
300+
}
301+
302+
std::cout << "Writing to: " << filename << "\n";
303+
304+
std::ofstream out(filename);
305+
if (!out) {
306+
std::cerr << "Failed to open ofstream\n";
307+
close(fd);
308+
}
309+
310+
for (auto pkg : packagesToProcess) {
311+
out << pkg->name() << pkg->ver() << "\n";
312+
}
313+
314+
out.close();
315+
close(fd);
316+
294317
// Get contents information for packages and add them to the database
295318
std::atomic_bool interestingFound = false;
296319

src/logging.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
#include <string>
2323
#include <string_view>
2424
#include <format>
25+
#include <vector>
2526

2627
namespace ASGenerator
2728
{

0 commit comments

Comments
 (0)