aboutsummaryrefslogtreecommitdiff
path: root/kiss
diff options
context:
space:
mode:
authordylan.araps@gmail.com <dylan.araps@gmail.com>2020-02-20 09:52:34 +0000
committerdylan.araps@gmail.com <dylan.araps@gmail.com>2020-02-20 09:52:34 +0000
commitfbdd725dc4096d4d48ca468f14459870235e4300 (patch)
treecc0b59ba0b34350f1c283547f602fca441c1aa48 /kiss
parent6ffa0c2e1d38b4dbe5a89e6e0c9226278ce3b796 (diff)
downloadcpt-fbdd725dc4096d4d48ca468f14459870235e4300.tar.gz
kiss: Drop KISS_AUDIT for now.
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. FossilOrigin-Name: fada81241a4458415ac394b9635edd81bab585d4ac077d8a745e54367457747d
Diffstat (limited to 'kiss')
-rwxr-xr-xkiss15
1 files changed, 1 insertions, 14 deletions
diff --git a/kiss b/kiss
index b476c11..4846875 100755
--- a/kiss
+++ b/kiss
@@ -1061,11 +1061,6 @@ pkg_updates() {
# shellcheck disable=2046,2086
{ IFS=:; set -- $KISS_PATH; IFS=$old_ifs; }
- # Where to store repository diffs for the update.
- # At the same time, create the file so updates requiring root don't
- # overwrite the user's existing permissions over the log.
- :> "$mak_dir/log"
-
# Update each repository in '$KISS_PATH'. It is assumed that
# each repository is 'git' tracked.
for repo; do
@@ -1097,7 +1092,6 @@ pkg_updates() {
if [ -w "$PWD" ] && [ "$uid" != 0 ]; then
git fetch
- git diff >> "$mak_dir/log"
git merge
else
@@ -1111,16 +1105,14 @@ pkg_updates() {
# case that the repository is owned by a 3rd user.
(
user=$(stat -c %U "$PWD")
- pull="git fetch && git diff >>'$mak_dir/log' && git merge"
[ "$user" = root ] ||
log "Dropping permissions to $user for pull"
case $su in
- su) as_root "$pull" ;;
+ su) as_root "git fetch && git merge" ;;
*) "$su" git fetch
- "$su" git diff >> "$mak_dir/log"
"$su" git merge
esac
)
@@ -1171,11 +1163,6 @@ pkg_updates() {
log "Packages to update: ${outdated% }"
- # Show a diff of each new change to the repositories.
- # This spawns the user's set PAGER with a fallback to less.
- [ -s "$mak_dir/log" ] && [ "$KISS_AUDIT" = 1 ] &&
- "${PAGER:-less}" "$mak_dir/log"
-
# Tell 'pkg_build' to always prompt before build.
pkg_update=1