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() ...@@ -59,14 +59,15 @@ print_tmp_sourceslist()
{ {
local SLIST local SLIST
test -r "$1" || fatal "$1 is missed" test -r "$1" || fatal "$1 is missed"
# TODO add comments support
# Note: /etc/apt and /etc/eterbuild/apt is supported # Note: /etc/apt and /etc/eterbuild/apt is supported
if rhas "$1" "^/etc" ; then if rhas "$1" "^/etc" ; then
SLIST=`cat "$1" | \ SLIST=`cat "$1" | \
grep "/sources.list" | sed -e 's|.*"\(.*\)".*|\1|g'` grep "/sources.list" | tail -n1 | sed -e 's|.*"\(.*\)".*|\1|g'`
else else
SLIST=`cat "$1" | \ SLIST=`cat "$1" | \
sed -e "s|\"/etc/.*apt/sources.list|\"$ETERBUILDETC/apt/sources.list|g" | \ 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 fi
[ -n "$SLIST" ] || SLIST="/etc/apt/sources.list" [ -n "$SLIST" ] || SLIST="/etc/apt/sources.list"
test -r "$SLIST" || fatal "'$SLIST' - sources.list path from $1 is missed" test -r "$SLIST" || fatal "'$SLIST' - sources.list path from $1 is missed"
...@@ -93,6 +94,9 @@ EOF ...@@ -93,6 +94,9 @@ EOF
fi fi
[ -n "$QUIETMODE" ] && return [ -n "$QUIETMODE" ] && return
echo echo
echog "Apt conf $APTCONF:"
cat $APTCONF
echo
echog "Apt sources from $APTCONF:" echog "Apt sources from $APTCONF:"
cat $OURSOURCES | grep -v "^#" | grep -v "^\$" | grep rpm | sed -e "s|rpm| rpm|" cat $OURSOURCES | grep -v "^#" | grep -v "^\$" | grep rpm | sed -e "s|rpm| rpm|"
echo 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