Skip to content

Commit

Permalink
fix(pm): migration not performed when update from old version
Browse files Browse the repository at this point in the history
tryMigrate should performe before construction ostree repo.
  • Loading branch information
dengbo11 committed Dec 4, 2024
1 parent 79c23b0 commit c7528ab
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions apps/ll-package-manager/src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,15 +39,15 @@ void withDBusDaemon()
std::abort();
}

auto *ostreeRepo = new linglong::repo::OSTreeRepo(repoRoot, *config, *clientFactory);
ostreeRepo->setParent(QCoreApplication::instance());

auto ret = linglong::repo::tryMigrate(LINGLONG_ROOT, *config);
if (ret == linglong::repo::MigrateResult::Failed) {
qCritical() << "failed to migrate repository";
QCoreApplication::exit(-1);
}

auto *ostreeRepo = new linglong::repo::OSTreeRepo(repoRoot, *config, *clientFactory);
ostreeRepo->setParent(QCoreApplication::instance());

if (auto ret = ostreeRepo->exportAllEntries(); !ret) {
qCritical() << "failed to export entries:" << ret.error();
}
Expand Down

0 comments on commit c7528ab

Please sign in to comment.