Commit 9c875228 authored by Vitaly Lipatov's avatar Vitaly Lipatov

add ArchLinux support (pacman) to all commands

parent 110333f7
...@@ -40,6 +40,9 @@ case $PMTYPE in ...@@ -40,6 +40,9 @@ case $PMTYPE in
zypper-rpm) zypper-rpm)
CMD="rpm -ql" CMD="rpm -ql"
;; ;;
pacman)
CMD="pacman -Ql"
;;
*) *)
fatal "Do not known query command for $PMTYPE" fatal "Do not known query command for $PMTYPE"
;; ;;
......
...@@ -22,13 +22,16 @@ epm_info() ...@@ -22,13 +22,16 @@ epm_info()
{ {
case $PMTYPE in case $PMTYPE in
apt-rpm|apt-dpkg) apt-rpm|apt-dpkg)
docmd apt-cache show $pkg_names || exit docmd apt-cache show $pkg_names
;; ;;
yum-rpm) yum-rpm)
docmd $SUDO yum info $pkg_names || exit docmd yum info $pkg_names
;; ;;
zypper-rpm) zypper-rpm)
docmd zypper info $pkg_names || exit docmd zypper info $pkg_names
;;
pacman)
docmd pacman -Si $pkg_names
;; ;;
*) *)
fatal "Do not known command for $PMTYPE" fatal "Do not known command for $PMTYPE"
......
...@@ -64,6 +64,9 @@ epm_install_names() ...@@ -64,6 +64,9 @@ epm_install_names()
pkg_add) pkg_add)
docmd $SUDO pkg_add -r $@ docmd $SUDO pkg_add -r $@
return ;; return ;;
pacman)
docmd $SUDO pacman -S $@
return ;;
*) *)
fatal "Do not known install command for $PMTYPE" fatal "Do not known install command for $PMTYPE"
;; ;;
...@@ -89,6 +92,9 @@ epm_ni_install_names() ...@@ -89,6 +92,9 @@ epm_ni_install_names()
pkg_add) pkg_add)
docmd $SUDO pkg_add -r $@ docmd $SUDO pkg_add -r $@
return ;; return ;;
pacman)
docmd $SUDO pacman -S --noconfirm $@
return ;;
*) *)
fatal "Do not known appropriate install command for $PMTYPE" fatal "Do not known appropriate install command for $PMTYPE"
;; ;;
...@@ -121,6 +127,9 @@ epm_install_files() ...@@ -121,6 +127,9 @@ epm_install_files()
docmd $SUDO rpm -Uvh --force $@ && return docmd $SUDO rpm -Uvh --force $@ && return
docmd $SUDO yum --nogpgcheck local install $@ docmd $SUDO yum --nogpgcheck local install $@
return ;; return ;;
pacman)
docmd $SUDO pacman -U $@
return ;;
esac esac
# other systems can install file package via ordinary command # other systems can install file package via ordinary command
......
...@@ -39,6 +39,9 @@ case $PMTYPE in ...@@ -39,6 +39,9 @@ case $PMTYPE in
zypper-rpm) zypper-rpm)
CMD="rpm -qa" CMD="rpm -qa"
;; ;;
pacman)
CMD="pacman -Qs"
;;
*) *)
fatal "Do not known query command for $PMTYPE" fatal "Do not known query command for $PMTYPE"
;; ;;
......
...@@ -61,6 +61,9 @@ __do_query() ...@@ -61,6 +61,9 @@ __do_query()
zypper-rpm) zypper-rpm)
CMD="rpm -qf" CMD="rpm -qf"
;; ;;
pacman)
CMD="pacman -Qo"
;;
*) *)
fatal "Do not known query command for $PMTYPE" fatal "Do not known query command for $PMTYPE"
;; ;;
......
...@@ -38,6 +38,9 @@ epm_reinstall_names() ...@@ -38,6 +38,9 @@ epm_reinstall_names()
pkg_add) pkg_add)
docmd $SUDO pkg_add -r $@ docmd $SUDO pkg_add -r $@
return ;; return ;;
pacman)
docmd $SUDO pacman -U $@
return ;;
*) *)
fatal "Do not known install command for $PMTYPE" fatal "Do not known install command for $PMTYPE"
;; ;;
......
...@@ -88,6 +88,12 @@ case $PMTYPE in ...@@ -88,6 +88,12 @@ case $PMTYPE in
zypper-rpm) zypper-rpm)
CMD="zypper remove" CMD="zypper remove"
;; ;;
emerge)
CMD="emerge --unmerge"
;;
pacman)
CMD="pacman -R --noconfirm"
;;
*) *)
fatal "Do not known command for $PMTYPE" fatal "Do not known command for $PMTYPE"
;; ;;
......
...@@ -37,6 +37,9 @@ case $PMTYPE in ...@@ -37,6 +37,9 @@ case $PMTYPE in
zypper-rpm) zypper-rpm)
CMD="zypper search" CMD="zypper search"
;; ;;
pacman)
CMD="pacman -Ss"
;;
*) *)
fatal "Do not known search command for $PMTYPE" fatal "Do not known search command for $PMTYPE"
;; ;;
......
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
epm_simulate() epm_simulate()
{ {
local CMD local CMD
[ -n "$pkg_names" ] || fatal "Run $epm_cmd without packages" [ -n "$pkg_filenames" ] || fatal "Run $epm_cmd without packages"
case $PMTYPE in case $PMTYPE in
apt-rpm|apt-dpkg) apt-rpm|apt-dpkg)
...@@ -40,11 +40,15 @@ epm_simulate() ...@@ -40,11 +40,15 @@ epm_simulate()
emerge) emerge)
echo "FIXME: Skip with emerge" echo "FIXME: Skip with emerge"
return ;; return ;;
pacman)
showcmd $SUDO pacman -v -S $pkg_filenames
echo no | $SUDO pacman -v -S $pkg_filenames
return ;;
*) *)
fatal "Do not known install command for $PMTYPE" fatal "Do not known simulate command for $PMTYPE"
;; ;;
esac esac
docmd $SUDO $CMD $pkg_names docmd $SUDO $CMD $pkg_filenames
} }
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