Commit 9606806d authored by Vitaly Lipatov's avatar Vitaly Lipatov

hasher: add workaround for commented lines in apt.conf, print out used apt.conf.

parent 989d6514
......@@ -59,14 +59,15 @@ print_tmp_sourceslist()
{
local SLIST
test -r "$1" || fatal "$1 is missed"
# TODO add comments support
# Note: /etc/apt and /etc/eterbuild/apt is supported
if rhas "$1" "^/etc" ; then
SLIST=`cat "$1" | \
grep "/sources.list" | sed -e 's|.*"\(.*\)".*|\1|g'`
grep "/sources.list" | tail -n1 | sed -e 's|.*"\(.*\)".*|\1|g'`
else
SLIST=`cat "$1" | \
sed -e "s|\"/etc/.*apt/sources.list|\"$ETERBUILDETC/apt/sources.list|g" | \
grep "/sources.list" | sed -e 's|.*"\(.*\)".*|\1|g'`
grep "/sources.list" | tail -n1 | sed -e 's|.*"\(.*\)".*|\1|g'`
fi
[ -n "$SLIST" ] || SLIST="/etc/apt/sources.list"
test -r "$SLIST" || fatal "'$SLIST' - sources.list path from $1 is missed"
......@@ -93,6 +94,9 @@ EOF
fi
[ -n "$QUIETMODE" ] && return
echo
echog "Apt conf $APTCONF:"
cat $APTCONF
echo
echog "Apt sources from $APTCONF:"
cat $OURSOURCES | grep -v "^#" | grep -v "^\$" | grep rpm | sed -e "s|rpm| rpm|"
echo
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment