Commit 1c43524c authored by Vitaly Lipatov's avatar Vitaly Lipatov

hasher: fix sources.list substing

parent a6edc17a
......@@ -27,10 +27,11 @@ print_tmp_aptconf()
test -r "$1" || fatal "$1 is missed"
# Note: /etc/apt and /etc/eterbuild/apt is supported
cat "$1" | \
sed -e "s|\"/etc/.*apt/sources.list|\"$OURTMPDIR/sources.list|g"
sed -e "s|\"/etc/.*/sources.list|\"$OURTMPDIR/sources.list|g"
# sed -e "s|\"/etc/.*apt/sources.list|\"$ETERBUILDETC/apt/sources.list|g"
}
# printout sources.list with filtering
# workaround about hard coded arch in sources.list
print_tmp_sourceslist()
{
......@@ -38,9 +39,13 @@ print_tmp_sourceslist()
test -r "$1" || fatal "$1 is missed"
# Note: /etc/apt and /etc/eterbuild/apt is supported
SLIST=`cat "$1" | \
sed -e "s|\"/etc/.*apt/sources.list|\"$ETERBUILDETC/apt/sources.list|g" | \
sed -e "s|\"/etc/.*/sources.list|\"$ETERBUILDETC/apt/sources.list|g" | \
grep "apt/sources.list" "$1" | sed -e 's|.*"\(.*\)".*|\1|g'`
#SLIST=`echo "$SLIST" | \
# sed -e "s|/etc/.*/sources.list|\"$OURTMPDIR/sources.list|g"`
SLIST="$ETERBUILDETC/apt/`basename $SLIST`"
test -r "$SLIST" || fatal "'$SLIST' - sources.list path from $1 is missed"
[ -n "$VERBOSE" ] && cat "$SLIST"
cat "$SLIST" | \
sed -e "s|i586|$DEFAULTARCH|g"
}
......@@ -48,7 +53,7 @@ print_tmp_sourceslist()
prepare_aptconfig()
{
print_tmp_aptconf $APTCONF >$OURTMPDIR/apt.conf.$MENV || fatal "Can't create apt.conf"
print_tmp_sourceslist $APTCONF >$OURTMPDIR/sources.list.$MENV || fatal "Can't create sources.list"
export OURAPTCONF=$OURTMPDIR/apt.conf.$MENV
print_tmp_sourceslist $APTCONF >$OURTMPDIR/sources.list.$MENV || fatal "Can't create sources.list"
export OURSOURCES=$OURTMPDIR/sources.list.$MENV
}
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