stm32cubemx: fix broken software package database update
For some reason, STM32CubeMX initially creates one of its database files with missing user-write permissions. When this happens, refreshing the package list in the Embedded Software Packages Manager seems to succeed but new packages don't become available. (As of the time of writing, this is the case with TouchGFX 4.25.0, which fails to appear, and 4.24.2 showing as the latest version.) To work around this problem, we run chmod u+w $HOME/.stm32cubemx/thirdparties/db/updaterThirdParties.xml when the startup wrapper script recognizes this problem.
This commit is contained in:
committed by
Martin Rubli
parent
4cd944ad9c
commit
61319af6a4
@@ -52,6 +52,11 @@ let
|
||||
|
||||
cat << EOF > $out/bin/${pname}
|
||||
#!${stdenvNoCC.shell}
|
||||
updater_xml="\$HOME/.stm32cubemx/thirdparties/db/updaterThirdParties.xml"
|
||||
if [ -e "\$updater_xml" ] && [ ! -w "\$updater_xml" ]; then
|
||||
echo "Warning: Unwritable \$updater_xml prevents CubeMX software packages from working correctly. Fixing that."
|
||||
(set -x; chmod u+w "\$updater_xml")
|
||||
fi
|
||||
${jdk21}/bin/java -jar $out/opt/STM32CubeMX/STM32CubeMX "\$@"
|
||||
EOF
|
||||
chmod +x $out/bin/${pname}
|
||||
|
||||
Reference in New Issue
Block a user