Commit 3574ffa9 authored by Vitaly Lipatov's avatar Vitaly Lipatov

fix slackpkg install/reinstall/remove/simulate

parent 6709bdbf
...@@ -74,6 +74,7 @@ epm_install_names() ...@@ -74,6 +74,7 @@ epm_install_names()
docmd $SUDO mpkg install $@ docmd $SUDO mpkg install $@
return ;; return ;;
slackpkg) slackpkg)
# TODO: use upgrade if package is already installed
docmd $SUDO slackpkg install $@ docmd $SUDO slackpkg install $@
return ;; return ;;
*) *)
...@@ -106,7 +107,8 @@ epm_ni_install_names() ...@@ -106,7 +107,8 @@ epm_ni_install_names()
docmd $SUDO pacman -S --noconfirm $@ docmd $SUDO pacman -S --noconfirm $@
return ;; return ;;
slackpkg) slackpkg)
docmd $SUDO slackpkg install $@ # TODO: use upgrade if package is already installed
docmd $SUDO slackpkg -batch=on -default_answer=yes install $@
return ;; return ;;
*) *)
fatal "Do not known appropriate install command for $PMTYPE" fatal "Do not known appropriate install command for $PMTYPE"
......
...@@ -62,6 +62,9 @@ epm_reinstall_files() ...@@ -62,6 +62,9 @@ epm_reinstall_files()
apt-pkg) apt-pkg)
docmd $SUDO dpkg -i $@ docmd $SUDO dpkg -i $@
return ;; return ;;
slackpkg)
docmd $SUDO installpkg $@
return ;;
esac esac
# other systems can install file package via ordinary command # other systems can install file package via ordinary command
......
...@@ -119,6 +119,9 @@ epm_remove_nonint() ...@@ -119,6 +119,9 @@ epm_remove_nonint()
zypper-rpm) zypper-rpm)
docmd $SUDO zypper --non-interactive remove $@ docmd $SUDO zypper --non-interactive remove $@
return ;; return ;;
slackpkg)
docmd $SUDO slackpkg -batch=on -default_answer=yes remove $@
return ;;
*) *)
fatal "Do not known command for $PMTYPE" fatal "Do not known command for $PMTYPE"
;; ;;
......
...@@ -39,6 +39,9 @@ case $PMTYPE in ...@@ -39,6 +39,9 @@ case $PMTYPE in
pacman) pacman)
CMD="pacman -Qo" CMD="pacman -Qo"
;; ;;
slackpkg)
CMD="slackpkg file-search"
;;
*) *)
fatal "Do not known search file command for $PMTYPE" fatal "Do not known search file command for $PMTYPE"
;; ;;
......
...@@ -50,7 +50,8 @@ epm_simulate() ...@@ -50,7 +50,8 @@ epm_simulate()
echo no | $SUDO pacman -v -S $filenames echo no | $SUDO pacman -v -S $filenames
return ;; return ;;
slackpkg) slackpkg)
return 0 ;; docmd slackpkg -batch=on -default_answer=yes download
;;
*) *)
fatal "Do not known simulate command for $PMTYPE" fatal "Do not known simulate 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