Hooks can now resolve paths if needed and tell the package manager
about the result. ie, a hook performing git retrieval can tell the
package manager the resolved path to the repository.
The package manager will then filter duplicates /correctly/ and
hooks can be sure they'll run once per *Git repository*.
#!/bin/sh -e
#
# Generic Git repository updater.
git remote >/dev/null 2>&1 || exit 0
case $1 in
update-resolve)
subm=$(git rev-parse --show-superproject-working-tree)
git -C "${subm:-"$PWD"}" rev-parse --show-toplevel
;;
pre-update)
case $(git config --get merge.verifySignatures) in true)
printf 'Signature verification enabled.\n'
esac
git pull
git submodule update --remote --init -f
;;
esac
NOTE: This may be reverted. Just merging to allow users to play
around with it. It's one possible solution to removing hook
boilerplate for updates.
- Update hooks now fire for non-Git repositories. This allows hooks
to add support for other update methods.
- Foundational work to explore other update methods in the package
manager itself.
- Added 'U|upgrade' to update the system without pulling new changes
from remotes.
- Other minor changes.
This reverts commit f8256d699d.
libarchive tar prepends 'x ' to verbose output whereas busybox
tar does not. Did not test other implementations though behave
seems to not be standard regardless.
- No more temporary file for tarball.
- Uses verbose output as manifest instead of invoking tar tf.
NOTE: May revert this (need to investigate usage of v for this
purpose). Just pushing to get it into history.
- Installation/removal needs the filtering, other parts of the
package manager do not (so they can now use the bare function).
- Changed method of output transformation to something simpler.
- Added support for other download utilities (wget and aria2c).
- Made download utility configurable via KISS_GET.
- Made sha256 utility configurable via KISS_SHA.
Let me know if there are other utilities which you would like
supported. :)
- Drop zip support. Repositories don't use it for anything, it has
no standard interface, the code is rather naive (does not strip
any parent directory so build files must cd (dir may change...).
Also.. the current zip code will prompt the user if there are
any conflicts which is contrary to expected behavior (later
sources overwrite prior files by design).
- Use one pattern in checksum generation.
- Moved download code to function. Can now explore supporting
different download tools (to remove hard curl lock-in).
- Added two hooks, pre-source and post-source. These hooks allow
for obtainment of verbatim and resolved sources (as well as
absolute paths to sources on disk).
- Other small improvements.