mirror of
https://github.com/Kicksecure/security-misc.git
synced 2024-12-26 05:09:24 -05:00
replace no longer required /usr/lib/security-misc/apt-get-wrapper
with apt-get --error-on=any
This commit is contained in:
parent
8eae635668
commit
240ec7672a
@ -106,7 +106,6 @@ make %{?_smp_mflags}
|
|||||||
/lib/systemd/system/remove-system-map.service
|
/lib/systemd/system/remove-system-map.service
|
||||||
/usr/lib/security-misc/apt-get-update
|
/usr/lib/security-misc/apt-get-update
|
||||||
/usr/lib/security-misc/apt-get-update-sanity-test
|
/usr/lib/security-misc/apt-get-update-sanity-test
|
||||||
/usr/lib/security-misc/apt-get-wrapper
|
|
||||||
/usr/lib/security-misc/panic-on-oops
|
/usr/lib/security-misc/panic-on-oops
|
||||||
/usr/lib/security-misc/remove-system.map
|
/usr/lib/security-misc/remove-system.map
|
||||||
/usr/share/glib-2.0/schemas/30_security-misc.gschema.override
|
/usr/share/glib-2.0/schemas/30_security-misc.gschema.override
|
||||||
|
@ -24,7 +24,7 @@ trap "sigterm_trap" SIGTERM SIGINT
|
|||||||
timeout \
|
timeout \
|
||||||
--kill-after="$kill_after" \
|
--kill-after="$kill_after" \
|
||||||
"$timeout_after" \
|
"$timeout_after" \
|
||||||
/usr/lib/security-misc/apt-get-wrapper update "$@" &
|
apt-get update --error-on=any "$@" &
|
||||||
|
|
||||||
lastpid="$!"
|
lastpid="$!"
|
||||||
wait "$lastpid"
|
wait "$lastpid"
|
||||||
|
@ -1,50 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
## Copyright (C) 2012 - 2021 ENCRYPTED SUPPORT LP <adrelanos@whonix.org>
|
|
||||||
## See the file COPYING for copying conditions.
|
|
||||||
|
|
||||||
set -e
|
|
||||||
set -o pipefail
|
|
||||||
set -o errtrace
|
|
||||||
|
|
||||||
cleanup() {
|
|
||||||
if [ -d "$temp_dir" ]; then
|
|
||||||
rm --recursive --force "$temp_dir"
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
temp_dir="$(mktemp --directory)"
|
|
||||||
logfile="$temp_dir/log"
|
|
||||||
|
|
||||||
trap "cleanup" EXIT
|
|
||||||
|
|
||||||
apt_get_exit_code="0"
|
|
||||||
|
|
||||||
## Thanks to:
|
|
||||||
## dmw
|
|
||||||
## http://stackoverflow.com/a/26263980/2605155
|
|
||||||
## for the python way to create a pty.
|
|
||||||
|
|
||||||
python3.9 -c 'import pty, sys; pty.spawn(sys.argv[1:])' \
|
|
||||||
| apt-get "$@" 2>&1 \
|
|
||||||
| tee -a "$logfile" \
|
|
||||||
|| { apt_get_exit_code="$?"; true; };
|
|
||||||
|
|
||||||
if [ ! "$apt_get_exit_code" = "0" ]; then
|
|
||||||
exit "$apt_get_exit_code"
|
|
||||||
fi
|
|
||||||
|
|
||||||
log="$(cat "$logfile")"
|
|
||||||
|
|
||||||
while read -r -d $'\n' line; do
|
|
||||||
line_lower_case="${line,,}"
|
|
||||||
first_two="${line_lower_case:0:2}"
|
|
||||||
if [ "$first_two" = "e:" ]; then
|
|
||||||
exit 125
|
|
||||||
fi
|
|
||||||
if [ "$first_two" = "w:" ]; then
|
|
||||||
exit 125
|
|
||||||
fi
|
|
||||||
done < <( echo "$log" )
|
|
||||||
|
|
||||||
exit "$apt_get_exit_code"
|
|
Loading…
Reference in New Issue
Block a user