Commit 71470596 authored by Vitaly Lipatov's avatar Vitaly Lipatov

epm repo: add workaround for AstraLinux (add-apt-repository is broken)

parent a9336d33
......@@ -164,6 +164,15 @@ __epm_addrepo_deb()
return
fi
if [ "$DISTRNAME" = "AstraLinux" ] ; then
echo "Use workaround for AstraLinux"
# aptsources.distro.NoDistroTemplateException: Error: could not find a distribution template for AstraLinuxCE/orel
echo "" | sudocmd tee -a /etc/apt/sources.list
echo "$repo" | sudocmd tee -a /etc/apt/sources.list
exit
fi
# keywords
case "$1" in
docker)
......
......@@ -104,6 +104,18 @@ case $PMTYPE in
apt-dpkg)
assure_exists apt-add-repository software-properties-common
set_sudo
if [ "$DISTRNAME" = "AstraLinux" ] ; then
echo "Use workaround for AstraLinux"
[ -n "$*" ] || fatal "empty repo name"
# aptsources.distro.NoDistroTemplateException: Error: could not find a distribution template for AstraLinuxCE/orel
sudocmd sed -i -e "s|.*$*.*||" /etc/apt/sources.list
if [ -d /etc/apt/sources.list.d ] && ls /etc/apt/sources.list.d/*.list >/dev/null 2>/dev/null ; then
sudocmd sed -i -e "s|.*$*.*||" /etc/apt/sources.list.d/*.list
fi
exit
fi
# FIXME: it is possible there is troubles to pass the args
sudocmd apt-add-repository --remove "$*"
info "Check file /etc/apt/sources.list if needed"
......
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