Skip to content

Commit

Permalink
Adjust Python pkg scripts to work properly when package is installed …
Browse files Browse the repository at this point in the history
…to a volume other than the boot volume.
  • Loading branch information
gregneagle committed Jul 5, 2023
1 parent 6591df3 commit 268171a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion code/tools/pkgresources/Scripts_python/postinstall
@@ -1,4 +1,4 @@
#!/bin/sh

# undo the removal prevention done in preinstall
/usr/bin/chflags -fR noschg,nouchg /usr/local/munki/Python.framework/Versions/3.*
/usr/bin/chflags -fR noschg,nouchg "$3/usr/local/munki/Python.framework/Versions/"3.*
4 changes: 2 additions & 2 deletions code/tools/pkgresources/Scripts_python/preinstall
Expand Up @@ -4,7 +4,7 @@
# prevent installer from removing a version currently in use
# (must update this script when we move to a new Python version)
for OLDVERS in 3.7 3.8 3.9 ; do
if [ -d "/usr/local/munki/Python.framework/Versions/$OLDVERS" ] ; then
/usr/bin/chflags -fR schg,uchg /usr/local/munki/Python.framework/Versions/$OLDVERS
if [ -d "$3/usr/local/munki/Python.framework/Versions/$OLDVERS" ] ; then
/usr/bin/chflags -fR schg,uchg "$3/usr/local/munki/Python.framework/Versions/$OLDVERS"
fi
done

0 comments on commit 268171a

Please sign in to comment.