Pre-install script in PET packages
PET packages may have 'pinstall.sh' which is a post-install script, and 'puninstall.sh' which is a post-uninstall script. However, this request has been posted on the forum for a pre-install script:
https://forum.puppylinux.com/viewtopic.php?t=16615
Pretty simple, have inserted this code into /usr/local/petget/installpkg.sh, at line 656:
#20260412 new preinstall.sh in .pet pkgs...Note, $DIRECTSAVEPATH is an intermediary path where the PET package is expanded to before being copied to "/", the destination.
if [ -n "$DIRECTSAVEPATH" ];then
if [ -e ${DIRECTSAVEPATH}/preinstall.sh ];then
cd /
bash ${DIRECTSAVEPATH}/preinstall.sh
rm -f ${DIRECTSAVEPATH}/preinstall.sh
fi
fi
Script 'installpkg.sh' has diverged a lot from the equivalent in Puppy Linux. Hmmm, yes very different:
...some parts look like very old code, I see there is even an aufs layers operation in there. Puppy developer guys would have to figure out where this support for 'preinstall.sh' can be inserted.
A comment about PKGget, the package manager in EasyOS, and PPM (Puppy Package Manager) in Puppy; for Puppy the PPM has become a legacy package manager, in recent releases of Puppy it handles PET packages only, with the Debian, Ubuntu, or whatever, handled by their appropriate package managers, such as APT.
Older "legacy" builds of Puppy have PPM as the one integrated
handler of all packages, DEB and PET, but this has been sidelined,
replaced by using APT in the case of Debian/Ubuntu based builds.
However, PKGget, which historically derived from the PPM about 14
years ago, is the main guy; APT support is built-in to PKGget. So
the one package manager handles all packages including DEB and PET
and is fully synced with APT, and 'apt' utilities can be used
directly in terminals and automatically sync back to PKGget. So, a
huge divergence from Puppy. PKGget is, in fact, a GUI for APT,
much better, in my opinion, than other APT GUIs such as
Synaptic.
Tags: easy