Commit ce10c02a authored by Vitaly Lipatov's avatar Vitaly Lipatov

epm repofix: replace sources.list only on ALT

parent 2c516fca
...@@ -74,6 +74,9 @@ case $PMTYPE in ...@@ -74,6 +74,9 @@ case $PMTYPE in
homebrew) homebrew)
docmd brew doctor docmd brew doctor
;; ;;
xbps)
sudocmd xbps-pkgdb -a
;;
*) *)
fatal "Have no suitable command for $PMTYPE" fatal "Have no suitable command for $PMTYPE"
;; ;;
......
...@@ -46,7 +46,7 @@ __try_fix_apt_source_list() ...@@ -46,7 +46,7 @@ __try_fix_apt_source_list()
fi fi
} }
__fix_apt_sources_list() __fix_alt_sources_list()
{ {
# for beauty spaces # for beauty spaces
local SUBST_ALT_RULE='s!^(.*)[/ ](ALTLinux|LINUX\@Etersoft)[/ ]*(Sisyphus|p8[/ ]branch|p7[/ ]branch|t7[/ ]branch|c7[/ ]branch|p6[/ ]branch|t6[/ ]branch)[/ ](x86_64|i586|x86_64-i586|noarch) !\1 \2/\3/\4 !gi' local SUBST_ALT_RULE='s!^(.*)[/ ](ALTLinux|LINUX\@Etersoft)[/ ]*(Sisyphus|p8[/ ]branch|p7[/ ]branch|t7[/ ]branch|c7[/ ]branch|p6[/ ]branch|t6[/ ]branch)[/ ](x86_64|i586|x86_64-i586|noarch) !\1 \2/\3/\4 !gi'
...@@ -77,26 +77,22 @@ epm_repofix() ...@@ -77,26 +77,22 @@ epm_repofix()
[ -z "$pkg_filenames" ] || fatal "No arguments are allowed here" [ -z "$pkg_filenames" ] || fatal "No arguments are allowed here"
case $PMTYPE in case $DISTRNAME in
apt-rpm) ALTLinux)
assure_exists apt-repo assure_exists apt-repo
[ -n "$quiet" ] || docmd apt-repo list [ -n "$quiet" ] || docmd apt-repo list
__fix_apt_sources_list /etc/apt/sources.list __fix_alt_sources_list /etc/apt/sources.list
__fix_apt_sources_list /etc/apt/sources.list.d/*.list __fix_alt_sources_list /etc/apt/sources.list.d/*.list
docmd apt-repo list docmd apt-repo list
# FIXME: what the best place? return
# rebuild rpm database
#sudocmd rm -fv /var/lib/rpm/__db*
#sudocmd rpm --rebuilddb
;;
yum-rpm|dnf-rpm)
# FIXME: what the best place?
#sudocmd rm -fv /var/lib/rpm/__db*
#sudocmd rpm --rebuilddb
;;
xbps)
sudocmd xbps-pkgdb -a
;; ;;
esac
case $PMTYPE in
# apt-rpm)
# ;;
# yum-rpm|dnf-rpm)
# ;;
*) *)
fatal "Have no suitable command for $PMTYPE" fatal "Have no suitable command for $PMTYPE"
;; ;;
......
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