Commit e6c3fb44 authored by Vitaly Lipatov's avatar Vitaly Lipatov

epm repack: use epm print info instead of $DISTRVENDOR

parent 3703b101
Allowed variables:
* $EGET (wget like utility)
* $DISTRVENDOR (distro_info utility)
Allowed command: Allowed command:
* epm (run the same epm called from) * epm (run the same epm called from)
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
[ "$1" != "--run" ] && echo "Uninstall etersoft build of glibc" && exit [ "$1" != "--run" ] && echo "Uninstall etersoft build of glibc" && exit
distro="$($DISTRVENDOR -d)" ; [ "$distro" = "ALTLinux" ] || [ "$distro" = "ALTServer" ] || { echo "Only ALTLinux is supported" ; exit 1 ; } distro="$(epm print info -d)" ; [ "$distro" = "ALTLinux" ] || [ "$distro" = "ALTServer" ] || { echo "Only ALTLinux is supported" ; exit 1 ; }
epm downgrade glibc-core glibc-preinstall epm downgrade glibc-core glibc-preinstall
exit 0 exit 0
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
[ "$1" != "--run" ] && echo "Install glusterfs7 (or upgrade from glusterfs6)" && exit [ "$1" != "--run" ] && echo "Install glusterfs7 (or upgrade from glusterfs6)" && exit
distro="$($DISTRVENDOR -d)" ; [ "$distro" = "ALTLinux" ] || [ "$distro" = "ALTServer" ] || { echo "Only ALTLinux is supported" ; exit 1 ; } distro="$(epm print info -d)" ; [ "$distro" = "ALTLinux" ] || [ "$distro" = "ALTServer" ] || { echo "Only ALTLinux is supported" ; exit 1 ; }
if epmqp --quiet glusterfs6- ; then if epmqp --quiet glusterfs6- ; then
# Upgrade if was installed # Upgrade if was installed
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
[ "$1" != "--run" ] && echo "Install glusterfs8 (or upgrade from glusterfs7)" && exit [ "$1" != "--run" ] && echo "Install glusterfs8 (or upgrade from glusterfs7)" && exit
distro="$($DISTRVENDOR -d)" ; [ "$distro" = "ALTLinux" ] || [ "$distro" = "ALTServer" ] || { echo "Only ALTLinux is supported" ; exit 1 ; } distro="$(epm print info -d)" ; [ "$distro" = "ALTLinux" ] || [ "$distro" = "ALTServer" ] || { echo "Only ALTLinux is supported" ; exit 1 ; }
GFSOLD=glusterfs7 GFSOLD=glusterfs7
GFSNEW=glusterfs8 GFSNEW=glusterfs8
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
[ "$1" != "--run" ] && echo "Install glusterfs9 (or upgrade from glusterfs8)" && exit [ "$1" != "--run" ] && echo "Install glusterfs9 (or upgrade from glusterfs8)" && exit
distro="$($DISTRVENDOR -d)" ; [ "$distro" = "ALTLinux" ] || [ "$distro" = "ALTServer" ] || { echo "Only ALTLinux is supported" ; exit 1 ; } distro="$(epm print info -d)" ; [ "$distro" = "ALTLinux" ] || [ "$distro" = "ALTServer" ] || { echo "Only ALTLinux is supported" ; exit 1 ; }
GFSOLD=glusterfs8 GFSOLD=glusterfs8
GFSNEW=glusterfs9 GFSNEW=glusterfs9
......
...@@ -2,16 +2,19 @@ ...@@ -2,16 +2,19 @@
[ "$1" != "--run" ] && echo "Remove all 32 bit packages from 64 bit system" && exit [ "$1" != "--run" ] && echo "Remove all 32 bit packages from 64 bit system" && exit
[ "$($DISTRVENDOR -a)" != "x86_64" ] && echo "Only x86_64 is supported" && exit 1 [ "$(epm print info -a)" != "x86_64" ] && echo "Only x86_64 is supported" && exit 1
case "$($DISTRVENDOR -s)" in case "$(epm print info -s)" in
alt) alt)
epm --verbose --simulate remove $(epmqp "^i586-") epm --verbose --simulate remove $(epmqp "^i586-")
;; ;;
ubuntu|debian) ubuntu|debian)
epm --verbose --simulate remove $(epmqp "^i386-") epm --verbose --simulate remove $(epmqp "^i386-")
;; ;;
fedora|centos|redos)
epm --verbose --simulate remove $(epmqp "\.i686$")
;;
*) *)
fatal "unsupported vendor $($DISTRVENDOR -s)" fatal "unsupported vendor $(epm print info -s)"
;; ;;
esac esac
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
[ "$1" != "--run" ] && echo "Install php7 (or upgrade from php5)" && exit [ "$1" != "--run" ] && echo "Install php7 (or upgrade from php5)" && exit
distrbase="$($DISTRVENDOR -s)" ; [ "$distrbase" = "alt" ] || { echo "Only ALTLinux is supported as for now" ; exit 1 ; } distrbase="$(epm print info -s)" ; [ "$distrbase" = "alt" ] || { echo "Only ALTLinux is supported as for now" ; exit 1 ; }
if epmqp --quiet php5- ; then if epmqp --quiet php5- ; then
# Upgrade all installed php5 # Upgrade all installed php5
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
[ "$1" != "--run" ] && echo "Install php8.1 (or upgrade from a previous version)" && exit [ "$1" != "--run" ] && echo "Install php8.1 (or upgrade from a previous version)" && exit
distrbase="$($DISTRVENDOR -s)" ; [ "$distrbase" = "alt" ] || { echo "Only ALTLinux is supported as for now" ; exit 1 ; } distrbase="$(epm print info -s)" ; [ "$distrbase" = "alt" ] || { echo "Only ALTLinux is supported as for now" ; exit 1 ; }
if epmqp --quiet php7- ; then if epmqp --quiet php7- ; then
# Upgrade all installed php7 # Upgrade all installed php7
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
[ "$1" != "--run" ] && echo "Install php8.1 (or upgrade from a previous version)" && exit [ "$1" != "--run" ] && echo "Install php8.1 (or upgrade from a previous version)" && exit
distrbase="$($DISTRVENDOR -s)" ; [ "$distrbase" = "alt" ] || { echo "Only ALTLinux is supported as for now" ; exit 1 ; } distrbase="$(epm print info -s)" ; [ "$distrbase" = "alt" ] || { echo "Only ALTLinux is supported as for now" ; exit 1 ; }
if epmqp --quiet php7- ; then if epmqp --quiet php7- ; then
# Upgrade all installed php7 # Upgrade all installed php7
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
[ "$1" != "--run" ] && echo "Install php8.2 (or upgrade from a previous version)" && exit [ "$1" != "--run" ] && echo "Install php8.2 (or upgrade from a previous version)" && exit
distrbase="$($DISTRVENDOR -s)" ; [ "$distrbase" = "alt" ] || { echo "Only ALTLinux is supported as for now" ; exit 1 ; } distrbase="$(epm print info -s)" ; [ "$distrbase" = "alt" ] || { echo "Only ALTLinux is supported as for now" ; exit 1 ; }
# TODO: check for apache2-mod_php7 # TODO: check for apache2-mod_php7
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
[ "$1" != "--run" ] && echo "Remove all possible python2 packages" && exit [ "$1" != "--run" ] && echo "Remove all possible python2 packages" && exit
distro="$($DISTRVENDOR -d)" ; [ "$distro" = "ALTLinux" ] || [ "$distro" = "ALTServer" ] || { echo "Only ALTLinux is supported" ; exit 1 ; } distro="$(epm print info -d)" ; [ "$distro" = "ALTLinux" ] || [ "$distro" = "ALTServer" ] || { echo "Only ALTLinux is supported" ; exit 1 ; }
PACKAGES="$(epm qp python-module)" PACKAGES="$(epm qp python-module)"
......
...@@ -2,8 +2,8 @@ ...@@ -2,8 +2,8 @@
MAIN=wine MAIN=wine
vendor="$($DISTRVENDOR -s)" ; [ "$vendor" = "alt" ] || { echo "Only ALT distros is supported for now" ; exit 1 ; } vendor="$(epm print info -s)" ; [ "$vendor" = "alt" ] || { echo "Only ALT distros is supported for now" ; exit 1 ; }
arch="$($DISTRVENDOR -a)" arch="$(epm print info -a)"
PKGCOMMON="wine-mono wine-gecko winetricks" PKGCOMMON="wine-mono wine-gecko winetricks"
......
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