Skip to content

Commit

Permalink
fix: some app run failed in other linux distro
Browse files Browse the repository at this point in the history
* get the runtime info from the latest version.
* the default LINGLONG_ROOT_PATH should be /var/lib/linglong.

Log:
  • Loading branch information
kamiyadm committed Nov 6, 2023
1 parent 4325cfb commit 2eda672
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/module/runtime/app.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ class AppPrivate
// 获取环境变量LINGLONG_ROOT
auto linglongRootPath = envMap.contains(QString("LINGLONG_ROOT"))
? envMap[QString("LINGLONG_ROOT")]
: QString("/persistent/linglong");
: QString("/var/lib/linglong");
QMap<QString, QString> variables = {
{ "APP_ROOT_PATH", appRootPath },
{ "RUNTIME_ROOT_PATH", runtimeRootPath },
Expand Down
2 changes: 1 addition & 1 deletion src/package_manager/impl/package_manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -464,7 +464,7 @@ bool PackageManagerPrivate::checkAppBase(const QString &runtime,
return false;
}

auto runtimeInfo = appList.at(0);
auto runtimeInfo = appList.last();
auto baseRef = runtimeInfo->runtime;
QStringList baseList = baseRef.split('/');
if (baseList.size() < 3) {
Expand Down

0 comments on commit 2eda672

Please sign in to comment.