[FIX]Handle dpkg lock and interrupted state on fresh installs#921
[FIX]Handle dpkg lock and interrupted state on fresh installs#921rquidute merged 4 commits into2.14.1+winter2026from
Conversation
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request significantly enhances the robustness of the Raspberry Pi setup installation script. It introduces proactive measures to address common issues encountered on fresh Ubuntu installations, specifically by waiting for background package manager operations to complete and automatically repairing any inconsistent dpkg states. These improvements aim to prevent script failures and provide a more reliable and smoother installation experience. Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Changelog
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request improves the robustness of the Pi setup script by adding checks for package manager locks and interrupted dpkg states. The implementation is solid. I've added one suggestion to improve the shell scripting style and robustness in the lock-waiting loop. Overall, this is a valuable addition to prevent common failures on fresh installations.
antonio-amjr
left a comment
There was a problem hiding this comment.
I have some comments below:
What changed
Improve the robustness of the Pi setup installation script by handling two common failure scenarios on fresh Ubuntu installs: background package manager locks and interrupted dpkg state.
scripts/pi-setup/install-pi-dependencies.sh
/var/lib/apt/lists/lock, /var/cache/apt/archives/lock) every 10 seconds before proceeding. Waits up to 5 minutes; exits with a clear warning message
if locks persist beyond that.
invokes dpkg --configure -a to repair them. Exits with an actionable error message if the repair fails.
Both steps are inserted before the "Upgrade OS" step, where these issues would otherwise cause the script to fail.
Related Issue
#919
Testing