=== modified file 'bin/fsb' --- bin/fsb 2017-10-12 23:19:36 +0000 +++ bin/fsb 2017-06-01 03:13:08 +0000 @@ -61,8 +61,6 @@ # basic initialisation -path=( $FSB_SCRIPTS_DIR $path ) - if ! [[ $terminfo[colors] -ge 8 ]]; then FSB_NO_COLORS=1 fi === modified file 'functions/fsb_chroot_bash' --- functions/fsb_chroot_bash 2017-10-12 23:19:36 +0000 +++ functions/fsb_chroot_bash 2013-05-15 20:09:14 +0000 @@ -1,2 +1,8 @@ -# vim: ft=zsh noet -fsb_chroot_bash_nocheck "$@" || die "command failed: ${(j: :)${(q)@}}" +local -a cmd +if [[ -o xtrace ]]; then + cmd=( zsh -x $build_dir/chroot.sh /bin/bash --login -x ) +else + cmd=( $build_dir/chroot.sh /bin/bash --login ) +fi +cmd+=( -c "${(j: :)${(q)@}}" ) +"${cmd[@]}" || die "command failed: ${(j: :)${(q)@}}" === removed file 'functions/fsb_chroot_bash_nocheck' --- functions/fsb_chroot_bash_nocheck 2017-10-12 23:19:36 +0000 +++ functions/fsb_chroot_bash_nocheck 1970-01-01 00:00:00 +0000 @@ -1,9 +0,0 @@ -# vim: ft=zsh noet -local -a cmd -if [[ -o xtrace ]]; then - cmd=( zsh -x $build_dir/chroot.sh /bin/bash --login -x ) -else - cmd=( $build_dir/chroot.sh /bin/bash --login ) -fi -cmd+=( -c "${(j: :)${(q)@}}" ) -"${cmd[@]}" === removed file 'functions/fsb_emerge_hackfix' --- functions/fsb_emerge_hackfix 2017-10-12 23:19:36 +0000 +++ functions/fsb_emerge_hackfix 1970-01-01 00:00:00 +0000 @@ -1,50 +0,0 @@ -# vim: ft=zsh noet -typeset -g FSB_EMERGE_JOBS -: ${FSB_EMERGE_JOBS:=$(cat /proc/cpuinfo | grep '^processor' | wc -l)} - -local emerge_ret emerge_calls current_failure previous_failure failure resolution -local -a emerge_cmd chroot_cmd last_emerge_status - -if [[ -o xtrace ]]; then - chroot_cmd=( zsh -x $build_dir/chroot.sh /bin/bash --login -x ) -else - chroot_cmd=( $build_dir/chroot.sh /bin/bash --login ) -fi - -emerge_cmd=( FEATURES=-userpriv emerge --jobs $FSB_EMERGE_JOBS --verbose-conflicts ) - -emerge_calls=1 -previous_failure="" -fsb_chroot_bash_nocheck $emerge_cmd "$@" -emerge_ret=$? - -while (($emerge_ret)); do - last_emerge_status=( ${(f)"$(emerge_log_sanitizer.sed <$build_dir/var/log/emerge.log | last_emerge.awk)"} ) - current_failure=$(printf "%s\n" $last_emerge_status[2,-1] | cut -f 2 | sort) - if [[ $previous_failure == $current_failure ]]; then - die "Hackfix: Stuck on repeating error" - fi - - for failure in $last_emerge_status[2,-1]; do - resolution=$(portage_logcat $=failure $build_dir | awk -v EMERGE_CMD="$emerge_cmd" ' -/configure: error: XML::Parser perl module is required/ { - print EMERGE_CMD " -1 XML-Parser" - exit 0 -} - ') - if [[ -n $resolution ]]; then - break - fi - done - - if [[ -z $resolution ]]; then - die "Emerge failed and no autoresolution: $*" - fi - - $chroot_cmd -c "$resolution" || die "Hackfix autoresolution failed: $resolution" - - emerge_calls=$[ $emerge_cmd + 1 ] - fsb_chroot_bash_nocheck $emerge_cmd "$@" - emerge_ret=$? -done -return $emerge_ret