Release 1.13#1691
Conversation
Handle ENOENT from std::filesystem::symlink_status() when resolving /etc/localtime, so the existing UTC fallback is reachable in clean Arch build chroots where /etc/localtime is absent.
Update translation.
Update policy translations.
* i18n: Translate po/en_US.po in zh_CN 96% of minimum 50% translated source file: 'po/en_US.po' on 'zh_CN'. Sync of partially translated files: untranslated content is included with an empty translation or source language content depending on file format * i18n: Translate po/en_US.po in sq 56% of minimum 50% translated source file: 'po/en_US.po' on 'sq'. Sync of partially translated files: untranslated content is included with an empty translation or source language content depending on file format * i18n: Translate po/en_US.po in fr 76% of minimum 50% translated source file: 'po/en_US.po' on 'fr'. Sync of partially translated files: untranslated content is included with an empty translation or source language content depending on file format * i18n: Translate po/en_US.po in pl 96% of minimum 50% translated source file: 'po/en_US.po' on 'pl'. Sync of partially translated files: untranslated content is included with an empty translation or source language content depending on file format * i18n: Translate po/en_US.po in es 96% of minimum 50% translated source file: 'po/en_US.po' on 'es'. Sync of partially translated files: untranslated content is included with an empty translation or source language content depending on file format * i18n: Translate po/en_US.po in fi 96% of minimum 50% translated source file: 'po/en_US.po' on 'fi'. Sync of partially translated files: untranslated content is included with an empty translation or source language content depending on file format * i18n: Translate po/en_US.po in en_GB 55% of minimum 50% translated source file: 'po/en_US.po' on 'en_GB'. Sync of partially translated files: untranslated content is included with an empty translation or source language content depending on file format * i18n: Translate po/en_US.po in pt_BR 96% of minimum 50% translated source file: 'po/en_US.po' on 'pt_BR'. Sync of partially translated files: untranslated content is included with an empty translation or source language content depending on file format * i18n: Translate po/en_US.po in ca 96% of minimum 50% translated source file: 'po/en_US.po' on 'ca'. Sync of partially translated files: untranslated content is included with an empty translation or source language content depending on file format * i18n: Translate po/en_US.po in uk 78% of minimum 50% translated source file: 'po/en_US.po' on 'uk'. Sync of partially translated files: untranslated content is included with an empty translation or source language content depending on file format * i18n: Translate po/en_US.po in ru 96% of minimum 50% translated source file: 'po/en_US.po' on 'ru'. Sync of partially translated files: untranslated content is included with an empty translation or source language content depending on file format --------- Co-authored-by: transifex-integration[bot] <43880903+transifex-integration[bot]@users.noreply.github.com>
* i18n: Translate po/en_US.po in zh_CN 100% translated source file: 'po/en_US.po' on 'zh_CN'. * i18n: Translate po/en_US.po in zh_TW 100% translated source file: 'po/en_US.po' on 'zh_TW'. * i18n: Translate policy.ts in zh_HK 100% translated source file: 'policy.ts' on 'zh_HK'. * i18n: Translate po/en_US.po in zh_HK 65% of minimum 50% translated source file: 'po/en_US.po' on 'zh_HK'. Sync of partially translated files: untranslated content is included with an empty translation or source language content depending on file format * i18n: Translate policy.ts in zh_CN 100% translated source file: 'policy.ts' on 'zh_CN'. * chore: Translate policy.ts in zh_TW 100% translated source file: 'policy.ts' on 'zh_TW'. --------- Co-authored-by: transifex-integration[bot] <43880903+transifex-integration[bot]@users.noreply.github.com>
* i18n: Translate po/en_US.po in pt_BR 100% translated source file: 'po/en_US.po' on 'pt_BR'. * i18n: Translate policy.ts in pt_BR 100% translated source file: 'policy.ts' on 'pt_BR'. * chore: Translate po/en_US.po in pt_BR 100% translated source file: 'po/en_US.po' on 'pt_BR'. --------- Co-authored-by: transifex-integration[bot] <43880903+transifex-integration[bot]@users.noreply.github.com>
1. Move the ll-package-manager --no-dbus startup logic from Cli::getPkgMan() to main.cpp 2. Start the package manager immediately after detecting peer mode (--no-dbus flag) 3. Ensure the package manager is initialized before OSTreeRepo::loadFromPath() is called 4. The previous location in getPkgMan() was too late in the execution flow, as the repo was already loaded before the package manager had a chance to initialize Influence: 1. Test ll-cli with --no-dbus flag to verify package manager starts correctly 2. Verify that repository loading succeeds in peer mode 3. Test that subcommands work properly after the package manager initializes 4. Verify the 1-second sleep is sufficient for package manager startup 5. Test running ll-cli commands in --no-dbus mode multiple times to ensure no duplicate processes 6. Verify sudo permissions and environment variable preservation work correctly
Update tx config.
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: dengbo11 The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
There was a problem hiding this comment.
Code Review
This pull request increments the project version to 1.13.1, updates translation files, and introduces a fallback to UTC when the timezone file is missing. It also moves the startup logic for ll-package-manager in peer-to-peer mode from the linglong library to the ll-cli application. Feedback on these changes highlights two medium-severity issues: first, the newly added process startup in ll-cli lacks error handling for QProcess::startDetached and uses a flaky 1-second sleep instead of a polling loop; second, moving this daemon startup logic out of the shared library to the application entry point breaks the architecture, as other library consumers will no longer automatically start the daemon in peer mode.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
| QProcess::startDetached("sudo", | ||
| { "--user", | ||
| LINGLONG_USERNAME, | ||
| "--preserve-env=QT_FORCE_STDERR_LOGGING", | ||
| "--preserve-env=QDBUS_DEBUG", | ||
| LINGLONG_LIBEXEC_DIR "/ll-package-manager", | ||
| "--no-dbus" }); | ||
| using namespace std::chrono_literals; | ||
| std::this_thread::sleep_for(1s); |
There was a problem hiding this comment.
Unhandled Process Startup Failure & Flaky Sleep
- Unhandled Failure:
QProcess::startDetachedreturns aboolindicating whether the process was successfully started. If it fails (e.g., ifsudois missing, permissions are incorrect, or the path is invalid), the failure is silently ignored, and the program will sleep for 1 second before failing with a generic/confusing error when trying to load the repository. - Flaky Sleep: Using a hardcoded
std::this_thread::sleep_for(1s)to wait for the daemon to initialize is a known anti-pattern. On slow or heavily loaded systems, 1 second might not be enough, leading to intermittent/flaky failures. On fast systems, it introduces an unnecessary 1-second delay to every CLI invocation.
Recommendation:
- Check the return value of
QProcess::startDetachedand handle failure. - Consider implementing a polling loop with a small sleep interval (e.g., 50ms) and a timeout (e.g., up to 2 seconds) that checks for the creation of the socket file
/tmp/linglong-package-manager.socketor the initialization of the repository instead of a hardcoded sleep.
if (!QProcess::startDetached("sudo",
{ "--user",
LINGLONG_USERNAME,
"--preserve-env=QT_FORCE_STDERR_LOGGING",
"--preserve-env=QDBUS_DEBUG",
LINGLONG_LIBEXEC_DIR "/ll-package-manager",
"--no-dbus" })) {
LogE("failed to start ll-package-manager");
return -1;
}
using namespace std::chrono_literals;
std::this_thread::sleep_for(1s);| if (this->peerMode) { | ||
| if (getuid() != 0) { | ||
| return LINGLONG_ERR("--no-dbus should only be used by root user."); | ||
| } | ||
|
|
||
| LogW("some subcommands will failed in --no-dbus mode."); | ||
| const auto pkgManAddress = QString("unix:path=/tmp/linglong-package-manager.socket"); | ||
| QProcess::startDetached("sudo", | ||
| { "--user", | ||
| LINGLONG_USERNAME, | ||
| "--preserve-env=QT_FORCE_STDERR_LOGGING", | ||
| "--preserve-env=QDBUS_DEBUG", | ||
| LINGLONG_LIBEXEC_DIR "/ll-package-manager", | ||
| "--no-dbus" }); | ||
| using namespace std::chrono_literals; | ||
| std::this_thread::sleep_for(1s); | ||
|
|
||
| const auto &pkgManConn = | ||
| QDBusConnection::connectToPeer(pkgManAddress, "ll-package-manager"); |
There was a problem hiding this comment.
Architectural Issue: Daemon Startup Logic Moved to Application Entry Point
The logic to start ll-package-manager in peerMode was moved from the library (libs/linglong/src/linglong/cli/cli.cpp) to the application's entry point (apps/ll-cli/src/main.cpp).
Since libs/linglong is a shared library, other executables or components using Cli::getPkgMan() in peerMode will no longer automatically start the ll-package-manager daemon, leading to connection failures.
Recommendation:
Keep the daemon startup logic inside the library (e.g., as a helper function in Cli or PackageManager initialization) so that any consumer of the library can safely use peerMode without manual setup in their respective main.cpp.
Codecov Report❌ Patch coverage is
🚀 New features to boost your workflow:
|
No description provided.