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