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