Commit faf98c09 authored by Lukas Appelhans's avatar Lukas Appelhans

Add progress reporting for akabei-create-db add during the check if targets...

Add progress reporting for akabei-create-db add during the check if targets may be in database already
parent de253f96
......@@ -48,8 +48,6 @@ CreateDb::CreateDb(const QString& db, const QStringList& targets, QObject* paren
m_startDateTime = QDateTime::currentDateTime();
out << "------- Akabei Create Database - started at " << m_startDateTime.toString() << " -------" << endl << endl;
Akabei::Config::instance()->setDebug(true);
}
CreateDb::~CreateDb()
......@@ -185,9 +183,6 @@ void CreateDb::add()
return;
}
out << "Checking if targets may already be in database...";
out.flush();
Akabei::Database *db = new Akabei::Database( unc );
if (!db->isValid()) {
out << "Could not access the database: " << db->error().description();
......@@ -199,7 +194,10 @@ void CreateDb::add()
QString groupQuery;
QString hookQuery;
QString deltaQuery;
int i = 1;
foreach (const QString &pkgPath, m_targets) {
out << "Checking if targets may already be in database (" << i << "/" << m_targets.size() << ") ...\r";
out.flush();
if (pkgPath.endsWith(".group")) {
if (groupQuery.isEmpty())
groupQuery = "SELECT * FROM groups WHERE";
......@@ -224,7 +222,9 @@ void CreateDb::add()
packagesCache.insert(pkgPath, p);
}
i++;
}
out << endl;
Akabei::Package::List packages;
......@@ -248,7 +248,7 @@ void CreateDb::add()
deltas = db->queryDeltas(deltaQuery);
}
out << "done" << endl;
out << "Finished checking if targets may already be in database." << endl;
out.flush();
DatabaseWorker * worker = new DatabaseWorker(this);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment