Commit 29349c9a authored by Anton Midyukov's avatar Anton Midyukov

bin/metadep-expander: do not abort build, if metapackage not available

Unavailable metapackages will be removed from the list. A warning will be displayed in the log.
parent 287adde5
......@@ -11,8 +11,8 @@ metapkgs="$(grep -e @META "$f" | grep -v '^#')"
for metapkg in $metapkgs; do
metapkg=${metapkg%@META}
if ! "$APT_CACHE" show "$metapkg" > /dev/null 2>&1; then
echo "Error: Metapackage $metapkg not available!!!"
exit 1
echo "Warning: Metapackage $metapkg not available!!!" >&2
continue
fi
t="`mktemp`"
LANG=C "$APT_CACHE" depends "$metapkg"| grep 'Depends:' |
......@@ -23,4 +23,8 @@ for metapkg in $metapkgs; do
sed -i "s/$metapkg@META/$metapkg/" "$f"
rm -f "$t"
done
# Cleanup not available metapackages
sed -i "/@META/d" "$f"
exit 0
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