Skip to content

Conversation

@inffy
Copy link
Member

@inffy inffy commented Jan 7, 2026

Closes #84

From projectbluefin/common@ac474a8

Also needed for ISOs ublue-os/aurora#1604

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request refactors the flatpak installation process to use Homebrew's brew bundle with Brewfiles, which is a positive change. However, the implementation introduces some significant issues in the justfile recipes. The toggle-devmode recipe contains flawed logic for detecting and disabling developer mode, which could fail for certain image names. More critically, the install-system-flatpaks recipe is broken and will not install development flatpaks when switching to developer mode. I have provided two review comments with high and critical severity to address these bugs, including code suggestions to resolve them.

Comment on lines 65 to 71
if grep -q -E -e "dx$" <<< "${IMAGE_NAME}" ; then
gum confirm "Would you like to disable developer mode?" || exit 0
echo "Rebasing to a non developer image"
NEW_IMAGE="$(sed "s/\-dx//" <<< $CURRENT_IMAGE)"
pkexec bootc switch --enforce-container-sigpolicy "${NEW_IMAGE}"
exit 0
fi

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

The logic for detecting and disabling developer mode is flawed. The check grep -q -E -e "dx$" is too strict and will fail for image names where -dx is not the final suffix (e.g., aurora-dx-nvidia). This is a regression from the previous implementation. Additionally, using sed "s/\-dx//" to create the new image name is fragile and can produce incorrect names.

A more robust approach is to check for the presence of -dx anywhere in IMAGE_NAME and then perform a targeted replacement on IMAGE_NAME to generate the new base name, which is then used to construct the full NEW_IMAGE reference.

      if [[ "${IMAGE_NAME}" == *"-dx"* ]] ; then
          gum confirm "Would you like to disable developer mode?" || exit 0
          echo "Rebasing to a non developer image"
          NEW_IMAGE_NAME="$(echo "${IMAGE_NAME}" | sed 's/-dx//')"
          NEW_IMAGE="$(sed "s/${IMAGE_NAME}/${NEW_IMAGE_NAME}/" <<< "${CURRENT_IMAGE}")"
          pkexec bootc switch --enforce-container-sigpolicy "${NEW_IMAGE}"
          exit 0
      fi

@inffy inffy marked this pull request as ready for review January 8, 2026 10:44
@inffy
Copy link
Member Author

inffy commented Jan 8, 2026

Tested locally and the brewfiles are in the correct place and the install-system-flatpak commands seem to work.

Would prefer another eyes and testing round for this though.

@hanthor
Copy link
Member

hanthor commented Jan 8, 2026

What about ISOs?

@inffy
Copy link
Member Author

inffy commented Jan 8, 2026

What about ISOs?

ISOs are still at ublue-os/aurora and this should make them ublue-os/aurora#1604

But we don't have testing ISO repo at the moment and we can't build new ISOs because of the bootc bug afaik

@inffy
Copy link
Member Author

inffy commented Jan 8, 2026

Tested again and when toggling devmode the flatpaks part doesn't work at all.

think the flatpak installation is ok now. but moving nvidia DX is completely broken

@inffy inffy marked this pull request as draft January 8, 2026 16:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

rewrite flatpak lists to brewfiles

2 participants