Commit 7bfca544 authored by Vitaly Lipatov's avatar Vitaly Lipatov

add initial support for windows package manager Npackd

parent df3a85b9
...@@ -42,6 +42,9 @@ case $PMTYPE in ...@@ -42,6 +42,9 @@ case $PMTYPE in
pacman) pacman)
echo "You need manually add repo to /etc/pacman.conf" echo "You need manually add repo to /etc/pacman.conf"
;; ;;
npackd)
docmd npackdcl add-repo --url=$pkg_filenames
;;
slackpkg) slackpkg)
echo "You need manually add repo to /etc/slackpkg/mirrors" echo "You need manually add repo to /etc/slackpkg/mirrors"
;; ;;
......
...@@ -45,6 +45,10 @@ case $PMTYPE in ...@@ -45,6 +45,10 @@ case $PMTYPE in
pacman) pacman)
docmd pacman -Si $pkg_names docmd pacman -Si $pkg_names
;; ;;
npackd)
# FIXME: --version=
docmd npackdcl info --package=$pkg_names
;;
slackpkg) slackpkg)
docmd /usr/sbin/slackpkg info $pkg_names docmd /usr/sbin/slackpkg info $pkg_names
;; ;;
......
...@@ -111,6 +111,10 @@ epm_ni_install_names() ...@@ -111,6 +111,10 @@ epm_ni_install_names()
pacman) pacman)
sudocmd pacman -S --noconfirm $@ sudocmd pacman -S --noconfirm $@
return ;; return ;;
npackd)
# npackdcl update --package=<package> (remove old and install new)
docmd npackdcl add --package=$@
return ;;
slackpkg) slackpkg)
# TODO: use upgrade if package is already installed # TODO: use upgrade if package is already installed
sudocmd /usr/sbin/slackpkg -batch=on -default_answer=yes install $@ sudocmd /usr/sbin/slackpkg -batch=on -default_answer=yes install $@
...@@ -171,6 +175,9 @@ epm_print_install_command() ...@@ -171,6 +175,9 @@ epm_print_install_command()
slackpkg) slackpkg)
echo "/sbin/installpkg $@" echo "/sbin/installpkg $@"
;; ;;
npackd)
echo "npackdcl add --package=$@"
;;
*) *)
fatal "Do not known appropriate install command for $PMTYPE" fatal "Do not known appropriate install command for $PMTYPE"
;; ;;
......
...@@ -40,6 +40,9 @@ case $PMTYPE in ...@@ -40,6 +40,9 @@ case $PMTYPE in
pacman) pacman)
CMD="pacman -Qs" CMD="pacman -Qs"
;; ;;
npackd)
CMD="npackdcl list"
;;
slackpkg) slackpkg)
CMD="ls -1 /var/log/packages/" CMD="ls -1 /var/log/packages/"
;; ;;
......
...@@ -37,6 +37,9 @@ case $PMTYPE in ...@@ -37,6 +37,9 @@ case $PMTYPE in
#dpkg -l $pkg_filenames | grep "^ii" #dpkg -l $pkg_filenames | grep "^ii"
#return #return
;; ;;
npackd)
CMD="npackdcl path --package=$pkg_filenames"
;;
*) *)
epm_packages | grep "$pkg_filenames" epm_packages | grep "$pkg_filenames"
return return
......
...@@ -72,6 +72,9 @@ epm_remove_names() ...@@ -72,6 +72,9 @@ epm_remove_names()
mpkg) mpkg)
sudocmd mpkg remove $@ sudocmd mpkg remove $@
return ;; return ;;
npackd)
docmd npackdcl remove --package=$@
return ;;
slackpkg) slackpkg)
sudocmd /usr/sbin/slackpkg remove $@ sudocmd /usr/sbin/slackpkg remove $@
return ;; return ;;
......
...@@ -42,6 +42,9 @@ case $PMTYPE in ...@@ -42,6 +42,9 @@ case $PMTYPE in
pacman) pacman)
echo "You need remove repo from /etc/pacman.conf" echo "You need remove repo from /etc/pacman.conf"
;; ;;
npackd)
docmd npackdcl remove-repo --url=$pkg_filenames
;;
slackpkg) slackpkg)
echo "You need remove repo from /etc/slackpkg/mirrors" echo "You need remove repo from /etc/slackpkg/mirrors"
;; ;;
......
...@@ -49,6 +49,9 @@ case $PMTYPE in ...@@ -49,6 +49,9 @@ case $PMTYPE in
mpkg) mpkg)
CMD="mpkg search" CMD="mpkg search"
;; ;;
npackd)
fatal "FIXME: Have not idea for search with npackdcl list"
;;
slackpkg) slackpkg)
CMD="/usr/sbin/slackpkg search" CMD="/usr/sbin/slackpkg search"
;; ;;
......
...@@ -187,6 +187,9 @@ case $DISTRNAME in ...@@ -187,6 +187,9 @@ case $DISTRNAME in
SUSE|SLED|SLES) SUSE|SLED|SLES)
CMD="zypper-rpm" CMD="zypper-rpm"
;; ;;
Windows)
CMD="npackd"
;;
*) *)
fatal "Do not known DISTRNAME $DISTRNAME" fatal "Do not known DISTRNAME $DISTRNAME"
;; ;;
......
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