forked from kiss-community/kiss
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.
This commit is contained in:
parent
9c5b12ad91
commit
55bcaede52
@ -78,14 +78,6 @@ export KISS_PATH=/var/db/kiss/repo/core:/var/db/kiss/repo/extra:/var/db/kiss/rep
|
|||||||
# Set it to '1' to force.
|
# Set it to '1' to force.
|
||||||
export KISS_FORCE=0
|
export KISS_FORCE=0
|
||||||
|
|
||||||
# Show diff on system updates.
|
|
||||||
#
|
|
||||||
# This will spawn '$PAGER' (fallback to 'less') with a diff
|
|
||||||
# of each changed file in the system update.
|
|
||||||
#
|
|
||||||
# Set it to '1' to enable.
|
|
||||||
export KISS_AUDIT=0
|
|
||||||
|
|
||||||
# Hook into kiss through a script.
|
# Hook into kiss through a script.
|
||||||
#
|
#
|
||||||
# This can be used set custom CFLAGS per package, modify builds,
|
# This can be used set custom CFLAGS per package, modify builds,
|
||||||
|
15
kiss
15
kiss
@ -1061,11 +1061,6 @@ pkg_updates() {
|
|||||||
# shellcheck disable=2046,2086
|
# shellcheck disable=2046,2086
|
||||||
{ IFS=:; set -- $KISS_PATH; IFS=$old_ifs; }
|
{ 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
|
# Update each repository in '$KISS_PATH'. It is assumed that
|
||||||
# each repository is 'git' tracked.
|
# each repository is 'git' tracked.
|
||||||
for repo; do
|
for repo; do
|
||||||
@ -1097,7 +1092,6 @@ pkg_updates() {
|
|||||||
|
|
||||||
if [ -w "$PWD" ] && [ "$uid" != 0 ]; then
|
if [ -w "$PWD" ] && [ "$uid" != 0 ]; then
|
||||||
git fetch
|
git fetch
|
||||||
git diff >> "$mak_dir/log"
|
|
||||||
git merge
|
git merge
|
||||||
|
|
||||||
else
|
else
|
||||||
@ -1111,16 +1105,14 @@ pkg_updates() {
|
|||||||
# case that the repository is owned by a 3rd user.
|
# case that the repository is owned by a 3rd user.
|
||||||
(
|
(
|
||||||
user=$(stat -c %U "$PWD")
|
user=$(stat -c %U "$PWD")
|
||||||
pull="git fetch && git diff >>'$mak_dir/log' && git merge"
|
|
||||||
|
|
||||||
[ "$user" = root ] ||
|
[ "$user" = root ] ||
|
||||||
log "Dropping permissions to $user for pull"
|
log "Dropping permissions to $user for pull"
|
||||||
|
|
||||||
case $su in
|
case $su in
|
||||||
su) as_root "$pull" ;;
|
su) as_root "git fetch && git merge" ;;
|
||||||
|
|
||||||
*) "$su" git fetch
|
*) "$su" git fetch
|
||||||
"$su" git diff >> "$mak_dir/log"
|
|
||||||
"$su" git merge
|
"$su" git merge
|
||||||
esac
|
esac
|
||||||
)
|
)
|
||||||
@ -1171,11 +1163,6 @@ pkg_updates() {
|
|||||||
|
|
||||||
log "Packages to update: ${outdated% }"
|
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.
|
# Tell 'pkg_build' to always prompt before build.
|
||||||
pkg_update=1
|
pkg_update=1
|
||||||
|
|
||||||
|
8
kiss.1
8
kiss.1
@ -54,14 +54,6 @@ export KISS_PATH=/var/db/kiss/repo/core:/var/db/kiss/repo/extra:/var/db/kiss/rep
|
|||||||
# Set it to '1' to force.
|
# Set it to '1' to force.
|
||||||
export KISS_FORCE=0
|
export KISS_FORCE=0
|
||||||
|
|
||||||
# Show diff on system updates.
|
|
||||||
#
|
|
||||||
# This will spawn '$PAGER' (fallback to 'less') with a diff
|
|
||||||
# of each changed file in the system update.
|
|
||||||
#
|
|
||||||
# Set it to '1' to enable.
|
|
||||||
export KISS_AUDIT=0
|
|
||||||
|
|
||||||
# Hook into kiss through a script.
|
# Hook into kiss through a script.
|
||||||
#
|
#
|
||||||
# This can be used set custom CFLAGS per package, modify builds,
|
# This can be used set custom CFLAGS per package, modify builds,
|
||||||
|
Loading…
Reference in New Issue
Block a user