Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 0 additions & 12 deletions apps/ll-builder/src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -948,14 +948,6 @@ You can report bugs to the linyaps team under this project: https://github.com/O
return -1;
}

// To avoid glib start thread
// set GIO_USE_VFS to local and GVFS_REMOTE_VOLUME_MONITOR_IGNORE to 1
auto gioGuard =
std::make_unique<linglong::utils::command::EnvironmentVariableGuard>("GIO_USE_VFS", "local");
auto gvfsGuard = std::make_unique<linglong::utils::command::EnvironmentVariableGuard>(
"GVFS_REMOTE_VOLUME_MONITOR_IGNORE",
"1");

auto result = linglong::repo::tryMigrate(builderCfg->repo, *repoCfg);
if (result == linglong::repo::MigrateResult::Failed) {
if (!backupFailedMigrationRepo(builderCfg->repo)) {
Expand All @@ -973,10 +965,6 @@ You can report bugs to the linyaps team under this project: https://github.com/O

linglong::repo::OSTreeRepo repo(repoRoot, *repoCfg, clientFactory);

// restore to original value
gioGuard.reset();
gvfsGuard.reset();

if (buildRepo->parsed()) {
return handleRepo(repo,
repoCmdOpts,
Expand Down
8 changes: 8 additions & 0 deletions libs/linglong/src/linglong/repo/ostree_repo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -749,6 +749,14 @@ OSTreeRepo::OSTreeRepo(const QDir &path,
qFatal("%s", msg.c_str());
}

// To avoid glib start thread
// set GIO_USE_VFS to local and GVFS_REMOTE_VOLUME_MONITOR_IGNORE to 1
linglong::utils::command::EnvironmentVariableGuard gioGuard{ "GIO_USE_VFS", "local" };
linglong::utils::command::EnvironmentVariableGuard gvfsGuard{
"GVFS_REMOTE_VOLUME_MONITOR_IGNORE",
"1"
};

g_autoptr(GError) gErr = nullptr;
g_autoptr(GFile) repoPath = nullptr;
g_autoptr(OstreeRepo) ostreeRepo = nullptr;
Expand Down