Skip to content

Commit

Permalink
Fix glib-mkenums
Browse files Browse the repository at this point in the history
The 'conditioning' part is replacing '/usr/bin/python' in glib-
mkenums file with '/usr/bin/python3', to ensure that it works
with the current builds. Unfortunately, this only works if the
original shebang was referring to python2. The current version
of glib-mkenums, instead, has a shebang that already points to
python3, so the result of the sed command is a shebang that
points to python33, resulting in an execution error.

This patch fixes it by ensuring that the replacement is done
only if the shebang points to "python", but not if it points to
"python3".

Fix ubuntu#260
  • Loading branch information
sergio-costas committed Nov 20, 2024
1 parent cf2b69a commit eb8a35c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion snapcraft.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1547,7 +1547,7 @@ parts:
sed -i 's#includedir=${prefix}/snap/gnome-46-2404-sdk/current#includedir=${prefix}#' $CRAFT_PRIME/usr/lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR/pkgconfig/igdgmm.pc
fi
sed -i 's#/usr/bin/python#python3#' usr/bin/glib-mkenums
sed -i 's#/usr/bin/python$#python3#' usr/bin/glib-mkenums
LIBTOOLIZE=usr/bin/libtoolize
sed -i 's#pkgauxdir="$CRAFT_STAGE#pkgauxdir="/snap/gnome-46-2404-sdk/current#' $LIBTOOLIZE
Expand Down

0 comments on commit eb8a35c

Please sign in to comment.