Commit 45b0a61d authored by Vitaly Lipatov's avatar Vitaly Lipatov

add print modified sources.list support

parent b9038de3
...@@ -21,7 +21,7 @@ check_locking() ...@@ -21,7 +21,7 @@ check_locking()
fi fi
} }
# workaround about hard coded path to source.list in apt.conf # workaround about hard coded path to sources.list in apt.conf
print_tmp_aptconf() print_tmp_aptconf()
{ {
test -r "$1" || fatal "$1 is missed" test -r "$1" || fatal "$1 is missed"
...@@ -29,3 +29,17 @@ print_tmp_aptconf() ...@@ -29,3 +29,17 @@ print_tmp_aptconf()
cat "$1" | \ 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"
} }
# workaround about hard coded arch in sources.list
print_tmp_sourceslist()
{
local SLIST
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" | \
grep "apt/sources.list" "$1" | sed -e 's|.*"\(.*\)".*|\1|g'`
test -r "$SLIST" || fatal "'$SLIST' - sources.list path from $1 is missed"
cat "$SLIST" | \
sed -e "s|i586|$DEFAULTARCH|g"
}
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