This is handy for manipulating the package manager internals prior
to source extraction. I currently use this to conditionally run the
source extraction, build and tarball creation in memory (tmpfs).
pre-extract)
case $PKG in
# Reset the directories to their default values.
firefox*|rust|llvm|clang)
mak_dir=${KISS_TMPDIR:-$cac_dir}/build-${pid:=$$}
pkg_dir=${KISS_TMPDIR:-$cac_dir}/pkg-$pid
;;
# Package is not in the above list, do everything in
# memory. Really nice speedups.
*)
log "$PKG" "Activating tmpfs"
mak_dir=/tmp/build-$pid
pkg_dir=/tmp/pkg-$pid
;;
esac
mkdir -p "$mak_dir" "$pkg_dir/$PKG/var/db/kiss/installed"
;;
Was only useful in confirming whether or not
a specific issue was environment related.
The mentioned issue has been resolved and
this feature is no longer of any use.
Bye.
I'm going to re-implement this feature in a
smarter way. It doesn't currently work for
partial updates nor does it work at all for
some users.
Some kind of persistent logging would be
far better as we'll be able to view a diff
regardless of the current pull's status.
The best way of doing this will be to grab
a diff of each package pending an update.
This way it's only information useful to
the user.
Fun stuff.
I never really liked how this was implemented and it's
rather limited in its use. It was cumbersome to edit
the list to make even a minor change.
Instead, I now recommend using 'KISS_HOOK'. It gives
you total control. KISS_RM can be implemented on a
per-package basis, for all packages overall or
conditionally.
You're also not limited to a simple list of removals.
You can do whatever you like pre- and post- build.
Here's an example script to get you started. There
is more information in the manual and README.
case $TYPE in
pre-build)
case $PKG in
zlib) export CFLAGS="-Os -static" ;;
curl) export CFLAGS="-O3" ;;
esac
;;
post-build)
: "${DEST:?DEST is unset}"
rm -rf "$DEST/usr/share/doc"
rm -rf "$DEST/usr/share/gettext"
;;
esac