Skip to content

Rockchip-rv1106 family: add to group only if group doesn't exist yet#9689

Open
vidplace7 wants to merge 1 commit intoarmbian:mainfrom
vidplace7:rv1106-tweak-groups
Open

Rockchip-rv1106 family: add to group only if group doesn't exist yet#9689
vidplace7 wants to merge 1 commit intoarmbian:mainfrom
vidplace7:rv1106-tweak-groups

Conversation

@vidplace7
Copy link
Copy Markdown
Member

@vidplace7 vidplace7 commented Apr 17, 2026

Description

This is identical to PR #8479 but applied to the rockchip-rv1106 family. (Please merge that one too! 🙏)

Some other packages may add the i2c/gpio groups before the family_tweaks are run, causing build failures when they are included.

# Example
function extension_prepare_config__add_i2c_tools() {
	add_packages_to_image i2c-tools
}

[🐳|🌿] Applying family [ tweaks: luckfox-pico-max :: rockchip-rv1106 ]
[🐳|🔨] err: The group `i2c' already exists, but has a different GID. Exiting.

We should only create them when they do not already exist. This PR does exactly that.

How Has This Been Tested?

  • Build test
  • The example above (i2c-tools via Extension) now works as expected.

Checklist:

  • My changes generate no new warnings

Summary by CodeRabbit

  • Bug Fixes
    • Enhanced installation robustness by implementing safer system group creation that avoids errors from duplicate operations during setup.

Some other packages add these groups (before the family_tweaks are run) causing build failures.

We should only create them when they do not already exist.
@vidplace7 vidplace7 requested a review from igorpecovnik as a code owner April 17, 2026 00:57
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Apr 17, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 54a6d21f-1e83-41cd-a126-8947b63984a4

📥 Commits

Reviewing files that changed from the base of the PR and between 7c39bd9 and d54290a.

📒 Files selected for processing (1)
  • config/sources/families/rockchip-rv1106.conf

📝 Walkthrough

Walkthrough

The family_tweaks() function in the RockChip RV1106 configuration was updated to check for the existence of gpio and i2c groups before attempting to create them, making the group creation operation idempotent by replacing unconditional creation with conditional creation.

Changes

Cohort / File(s) Summary
Group Creation Idempotence
config/sources/families/rockchip-rv1106.conf
Modified family_tweaks() to check if gpio (gid 900) and i2c (gid 901) groups already exist via getent group before running addgroup, preventing redundant creation attempts.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~5 minutes

Poem

🐰 Before we leap, we check with care,
Does the group already rest there?
Only when absent, we create with grace,
Idempotent magic in this space! ✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately and specifically summarizes the main change: making group creation conditional based on whether groups already exist, which directly matches the PR's core objective.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions github-actions bot added size/small PR with less then 50 lines 05 Milestone: Second quarter release Needs review Seeking for review Hardware Hardware related like kernel, U-Boot, ... labels Apr 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

05 Milestone: Second quarter release Hardware Hardware related like kernel, U-Boot, ... Needs review Seeking for review size/small PR with less then 50 lines

Development

Successfully merging this pull request may close these issues.

1 participant