local CONFFILE="${TMPWORKINGDIRECTORY}/rootdir/etc/apt/apt.conf.d/00force-compressor"
echo "Acquire::CompressionTypes::Order { \"${COMPRESS}\"; };
Dir::Bin::uncompressed \"/does/not/exist\";" > "$CONFFILE"
+ for COMP in $(aptconfig dump 'APT::Compressor' --format '%f%n' | cut -d':' -f 5 | uniq); do
+ if [ -z "$COMP" -o "$COMP" = '.' -o "$COMP" = "$COMPRESSOR" ]; then continue; fi
+ echo "Dir::Bin::${COMP} \"/does/not/exist\";" >> "$CONFFILE"
+ echo "APT::Compressor::${COMP}::Name \"${COMP}-disabled\";" >> "$CONFFILE"
+ done
}
setupsimplenativepackage() {
msggroup
}
+catfile() {
+ if [ "${1##*.}" = 'deb' ]; then
+ stat >&2 "$1" || true
+ file >&2 "$1" || true
+ else
+ cat >&2 "$1" || true
+ fi
+}
msgfailoutput() {
msgreportheader 'msgfailoutput'
local MSG="$1"
echo >&2
while [ -n "$2" ]; do shift; done
echo "#### Complete file: $1 ####"
- cat >&2 "$1" || true
+ catfile "$1"
echo '#### grep output ####'
elif [ "$1" = 'test' ]; then
echo >&2
ls >&2 "$2" || true
elif test -e "$2"; then
echo "#### Complete file: $2 ####"
- cat >&2 "$2" || true
+ catfile "$2"
fi
fi
}
echo >&2
while [ -n "$2" ]; do
echo "#### Complete file: $2 ####"
- cat >&2 "$2" || true
+ catfile "$2"
shift
done
echo '#### cmp output ####'
fi
- cat >&2 "$OUTPUT"
+ catfile "$OUTPUT"
msgfail "$MSG"
}
} | sort
}
forallsupportedcompressors() {
+ rm -f "${TMPWORKINGDIRECTORY}/rootdir/etc/apt/apt.conf.d/00force-compressor"
for COMP in $(aptconfig dump 'APT::Compressor' --format '%f%n' | cut -d':' -f 5 | uniq); do
if [ -z "$COMP" -o "$COMP" = '.' ]; then continue; fi
"$@" "$COMP"