Fix editable-install patch for 26.05 + unblock icon in unprivileged build
The previous patch matched a development-branch variable that does not
exist in release 2605.0, so the warning fired and the editable install was
not patched. In 2605.0 the -e is hardcoded in the pip command
("pip install -e ${package_folder_path}"); strip the -e there instead.
Also, flatpak build-export validates exported app icons in a bwrap sandbox,
which fails in an unprivileged container. Keep the icon inside the app (for
the running window/taskbar) but remove it from build-dir/export so export
skips validation. Host menu icon stays generic; build needs no privileges.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -37,11 +37,11 @@ echo ">> patching the editable pip install (read-only /app workaround)"
|
||||
# and installs into the writable ~/.o3de venv. (Nothing Python-related needs to
|
||||
# be baked into the image; it all lives per-user under ~/.o3de.)
|
||||
LYPYTHON=$(find "$DEST/opt/O3DE" -path '*/cmake/LYPython.cmake' | head -n1)
|
||||
if [ -n "$LYPYTHON" ] && grep -q 'set(_pip_install_mode_args "-e")' "$LYPYTHON"; then
|
||||
sed -i 's/set(_pip_install_mode_args "-e")/set(_pip_install_mode_args "")/' "$LYPYTHON"
|
||||
if [ -n "$LYPYTHON" ] && grep -qF -- '-m pip install -e ' "$LYPYTHON"; then
|
||||
sed -i 's/-m pip install -e /-m pip install /g' "$LYPYTHON"
|
||||
echo " patched: $LYPYTHON"
|
||||
else
|
||||
echo " WARNING: editable-install line not found in LYPython.cmake; O3DE layout may have changed" >&2
|
||||
echo " WARNING: 'pip install -e' not found in LYPython.cmake; O3DE layout may have changed" >&2
|
||||
fi
|
||||
|
||||
echo ">> installing launcher + metadata"
|
||||
@@ -65,6 +65,12 @@ flatpak build-finish build-dir \
|
||||
--env=QT_QPA_PLATFORM=xcb
|
||||
|
||||
echo ">> export to OSTree repo"
|
||||
# flatpak build-export validates exported app icons in a bwrap sandbox, which
|
||||
# fails in an unprivileged container ("is not a valid icon: bwrap ..."). The
|
||||
# icon stays inside the app (so the running window/taskbar shows it); we just
|
||||
# drop it from the *exported* set so export skips validation. Trade-off: the
|
||||
# host menu launcher icon is generic. (A privileged runner would avoid this.)
|
||||
rm -rf build-dir/export/share/icons
|
||||
flatpak build-export repo build-dir "$BRANCH"
|
||||
flatpak build-update-repo repo --title="O3DE (unofficial Flatpak)" --prune --prune-depth=1
|
||||
|
||||
|
||||
Reference in New Issue
Block a user