Commit 83a99bed authored by Vitaly Lipatov's avatar Vitaly Lipatov

add more pacman commands

parent f6169e0b
...@@ -40,6 +40,8 @@ case $PMTYPE in ...@@ -40,6 +40,8 @@ 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"
# Only for alone packages:
#sudocmd repo-add $pkg_filenames
;; ;;
npackd) npackd)
docmd npackdcl add-repo --url=$pkg_filenames docmd npackdcl add-repo --url=$pkg_filenames
......
...@@ -51,9 +51,10 @@ __epm_changelog_local_names() ...@@ -51,9 +51,10 @@ __epm_changelog_local_names()
;; ;;
emerge) emerge)
docmd view /usr/portage/category/$1/ChangeLog | less docmd view /usr/portage/category/$1/ChangeLog | less
# docmd equery changes -f $1 | less
;; ;;
pacman) pacman)
docmd pacman -Qc package | less docmd pacman -Qc $1 | less
;; ;;
*) *)
fatal "Do not known command for $PMTYPE" fatal "Do not known command for $PMTYPE"
......
...@@ -49,6 +49,9 @@ case $PMTYPE in ...@@ -49,6 +49,9 @@ case $PMTYPE in
docmd rpm -Va --nofiles --nodigest docmd rpm -Va --nofiles --nodigest
;; ;;
pacman)
sudocmd revdep-rebuild
;;
urpm-rpm) urpm-rpm)
sudocmd urpme --auto-orphans sudocmd urpme --auto-orphans
;; ;;
......
...@@ -33,6 +33,9 @@ case $PMTYPE in ...@@ -33,6 +33,9 @@ case $PMTYPE in
urpm-rpm) urpm-rpm)
sudocmd urpmi --clean sudocmd urpmi --clean
;; ;;
pacman)
sudocmd pacman -Sc
;;
zypper-rpm) zypper-rpm)
sudocmd zypper clean sudocmd zypper clean
;; ;;
......
...@@ -63,7 +63,8 @@ __epm_filelist_name() ...@@ -63,7 +63,8 @@ __epm_filelist_name()
CMD="rpm -ql" CMD="rpm -ql"
;; ;;
pacman) pacman)
CMD="pacman -Ql" docmd pacman -Ql $pkg_names | sed -e "s|.* ||g"
return
;; ;;
slackpkg) slackpkg)
is_installed $pkg_names || fatal "Query filelist for non installed packages does not realized" is_installed $pkg_names || fatal "Query filelist for non installed packages does not realized"
......
...@@ -56,6 +56,7 @@ case $PMTYPE in ...@@ -56,6 +56,7 @@ case $PMTYPE in
docmd zypper info $pkg_names docmd zypper info $pkg_names
;; ;;
pacman) pacman)
is_installed $pkg_names && docmd pacman -Qi $pkg_names && return
docmd pacman -Si $pkg_names docmd pacman -Si $pkg_names
;; ;;
npackd) npackd)
......
...@@ -34,6 +34,9 @@ epm_remove_low() ...@@ -34,6 +34,9 @@ epm_remove_low()
emerge) emerge)
sudocmd emerge --unmerge $@ sudocmd emerge --unmerge $@
return ;; return ;;
pacman)
sudocmd pacman -R $@
return ;;
slackpkg) slackpkg)
sudocmd /sbin/removepkg $@ sudocmd /sbin/removepkg $@
return ;; return ;;
...@@ -63,7 +66,7 @@ epm_remove_names() ...@@ -63,7 +66,7 @@ epm_remove_names()
sudocmd emerge -aC $@ sudocmd emerge -aC $@
return ;; return ;;
pacman) pacman)
sudocmd pacman -R $@ sudocmd pacman -Rs $@
return ;; return ;;
yum-rpm) yum-rpm)
sudocmd yum remove $@ sudocmd yum remove $@
...@@ -103,7 +106,7 @@ epm_remove_nonint() ...@@ -103,7 +106,7 @@ epm_remove_nonint()
sudocmd urpme --auto $@ sudocmd urpme --auto $@
return ;; return ;;
pacman) pacman)
sudocmd pacman -R --noconfirm $@ sudocmd pacman -Rs --noconfirm $@
return ;; return ;;
yum-rpm) yum-rpm)
sudocmd yum -y remove $@ sudocmd yum -y remove $@
...@@ -130,6 +133,9 @@ epm_print_remove_command() ...@@ -130,6 +133,9 @@ epm_print_remove_command()
pkgsrc) pkgsrc)
echo "pkg_delete -r $@" echo "pkg_delete -r $@"
;; ;;
pacman)
echo "pacman -R $@"
;;
emerge) emerge)
echo "emerge --unmerge $@" echo "emerge --unmerge $@"
;; ;;
......
...@@ -22,7 +22,7 @@ epm_requires() ...@@ -22,7 +22,7 @@ epm_requires()
local CMD local CMD
[ -n "$pkg_filenames" ] || fatal "Run query without names" [ -n "$pkg_filenames" ] || fatal "Run query without names"
# by file package # by package file
case $PMTYPE in case $PMTYPE in
apt-rpm|urpm-rpm|zypper-rpm|yum-rpm) apt-rpm|urpm-rpm|zypper-rpm|yum-rpm)
CMD="rpm -q --requires -p" CMD="rpm -q --requires -p"
...@@ -39,7 +39,7 @@ esac ...@@ -39,7 +39,7 @@ esac
[ -n "$pkg_files" ] && docmd $CMD $pkg_files [ -n "$pkg_files" ] && docmd $CMD $pkg_files
# by file name # by package name
case $PMTYPE in case $PMTYPE in
apt-rpm|urpm-rpm|zypper-rpm) apt-rpm|urpm-rpm|zypper-rpm)
# FIXME: use hi level commands # FIXME: use hi level commands
...@@ -48,6 +48,9 @@ case $PMTYPE in ...@@ -48,6 +48,9 @@ case $PMTYPE in
yum-rpm) yum-rpm)
CMD="yum deplist" CMD="yum deplist"
;; ;;
pacman)
CMD="pactree"
;;
apt-dpkg) apt-dpkg)
CMD="apt-cache depends" CMD="apt-cache depends"
;; ;;
......
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