Commit 0e91b8c0 authored by Vitaly Lipatov's avatar Vitaly Lipatov

backported to M60P as 1.0.7-alt0.M60P.1 (with rpmbph script)

parents e1f431b0 619658c2
...@@ -83,6 +83,9 @@ case $progname in ...@@ -83,6 +83,9 @@ case $progname in
epms) epms)
epm_cmd=search epm_cmd=search
;; ;;
epmq)
epm_cmd=query
;;
epmqf) epmqf)
epm_cmd=query_file epm_cmd=query_file
;; ;;
...@@ -108,46 +111,26 @@ check_command() ...@@ -108,46 +111,26 @@ check_command()
-i|install|add) # HELPCMD: install package(s) from remote repositories or from local file -i|install|add) # HELPCMD: install package(s) from remote repositories or from local file
epm_cmd=install epm_cmd=install
;; ;;
reinstall) # HELPCMD: reinstall package(s) from remote repositories or from local file
epm_cmd=reinstall
;;
-e|-P|remove|delete) # HELPCMD: remove (delete) package(s) from the database and the system -e|-P|remove|delete) # HELPCMD: remove (delete) package(s) from the database and the system
epm_cmd=remove epm_cmd=remove
;; ;;
autoremove) # HELPCMD: auto remove unneeded package(s) -s|search) # HELPCMD: search in remote package repositories
epm_cmd=autoremove epm_cmd=search
;;
-qi|info|show) # HELPCMD: print package detail info
epm_cmd=info
;;
requires|deplist) # HELPCMD: print package requires
epm_cmd=requires
;;
clean) # HELPCMD: clean local package cache
epm_cmd=clean
;;
-qa|list|packages|-l) # HELPCMD: list of installed package(s)
epm_cmd=packages
;; ;;
-qp|query_package) # HELPCMD: search in the list of installed packages -qp|query_package) # HELPCMD: search in the list of installed packages
epm_cmd=query_package epm_cmd=query_package
;; ;;
update) # HELPCMD: update remote package repository databases -qf|which|belongs) # HELPCMD: query package(s) owning file
epm_cmd=update epm_cmd=query_file
;;
dist-upgrade|upgrade) # HELPCMD: performs upgrades of package software distributions
epm_cmd=upgrade
;; ;;
-s|search) # HELPCMD: search in remote package repositories
epm_cmd=search reinstall) # HELPCMD: reinstall package(s) from remote repositories or from local file
epm_cmd=reinstall
;; ;;
-q|installed) # HELPCMD: check presence of package(s) -q|installed) # HELPCMD: check presence of package(s)
epm_cmd=query epm_cmd=query
;; ;;
-qf|which|belongs) # HELPCMD: query package(s) owning file -sf|sf|filesearch) # HELPCMD: search in which package a file is included
epm_cmd=query_file
;;
-sf|sf|filesearch|search_file) # HELPCMD: search in which package a file is included
epm_cmd=search_file epm_cmd=search_file
;; ;;
-ql|filelist) # HELPCMD: print package file list -ql|filelist) # HELPCMD: print package file list
...@@ -156,14 +139,21 @@ check_command() ...@@ -156,14 +139,21 @@ check_command()
check|fix|verify) # HELPCMD: check local package base integrity and fix it check|fix|verify) # HELPCMD: check local package base integrity and fix it
epm_cmd=check epm_cmd=check
;; ;;
checkpkg|integrity) # HELPCMD: check package integrity
epm_cmd=checkpkg
;;
changelog|cl) # HELPCMD: show changelog for package changelog|cl) # HELPCMD: show changelog for package
epm_cmd=changelog epm_cmd=changelog
;; ;;
simulate) # HELPCMD: simulate install (check requires) -qi|info|show) # HELPCMD: print package detail info
epm_cmd=simulate epm_cmd=info
;;
requires|deplist) # HELPCMD: print package requires
epm_cmd=requires
;;
-qa|list|packages|-l) # HELPCMD: list of installed package(s)
epm_cmd=packages
;;
update) # HELPCMD: update remote package repository databases
epm_cmd=update
;; ;;
addrepo|ar) # HELPCMD: add package repo addrepo|ar) # HELPCMD: add package repo
epm_cmd=addrepo epm_cmd=addrepo
...@@ -174,6 +164,23 @@ check_command() ...@@ -174,6 +164,23 @@ check_command()
removerepo|rr) # HELPCMD: remove package repo removerepo|rr) # HELPCMD: remove package repo
epm_cmd=removerepo epm_cmd=removerepo
;; ;;
clean) # HELPCMD: clean local package cache
epm_cmd=clean
;;
autoremove) # HELPCMD: auto remove unneeded package(s)
epm_cmd=autoremove
;;
upgrade|dist-upgrade) # HELPCMD: performs upgrades of package software distributions
epm_cmd=upgrade
;;
simulate) # HELPCMD: simulate install (it does check requires, minimally)
epm_cmd=simulate
;;
checkpkg|integrity) # HELPCMD: check package integrity
epm_cmd=checkpkg
;;
*) *)
return 1 return 1
;; ;;
......
...@@ -99,7 +99,7 @@ epm_changelog() ...@@ -99,7 +99,7 @@ epm_changelog()
local pkg local pkg
for pkg in $pkg_names ; do for pkg in $pkg_names ; do
if pkg_names=$pkg epm_query ; then if is_installed $pkg ; then
__epm_changelog_local_names $pkg __epm_changelog_local_names $pkg
else else
__epm_changelog_unlocal_names $pkg __epm_changelog_unlocal_names $pkg
......
...@@ -67,7 +67,7 @@ __epm_filelist_name() ...@@ -67,7 +67,7 @@ __epm_filelist_name()
CMD="pacman -Ql" CMD="pacman -Ql"
;; ;;
slackpkg) slackpkg)
epm_query >/dev/null || fatal "Query filelist for non installed packages does not realized" is_installed $pkg_names || fatal "Query filelist for non installed packages does not realized"
docmd awk 'BEGIN{desk=1}{if(/^FILE LIST:$/){desk=0} else if (desk==0) {print}}' /var/log/packages/${pkg_filenames}* docmd awk 'BEGIN{desk=1}{if(/^FILE LIST:$/){desk=0} else if (desk==0) {print}}' /var/log/packages/${pkg_filenames}*
return return
;; ;;
...@@ -77,7 +77,7 @@ __epm_filelist_name() ...@@ -77,7 +77,7 @@ __epm_filelist_name()
esac esac
docmd $CMD $pkg_names && return docmd $CMD $pkg_names && return
epm_query >/dev/null || fatal "Query filelist for non installed packages does not realized" is_installed $pkg_names || fatal "Query filelist for non installed packages does not realized"
} }
......
...@@ -26,7 +26,7 @@ __epm_info_rpm_low() ...@@ -26,7 +26,7 @@ __epm_info_rpm_low()
docmd rpm -qip $pkg_files docmd rpm -qip $pkg_files
fi fi
[ -z "$pkg_names" ] && return [ -z "$pkg_names" ] && return
pkg_filenames=$pkg_names epm_query >/dev/null && docmd rpm -qi $pkg_names && return is_installed $pkg_names && docmd rpm -qi $pkg_names && return
} }
epm_info() epm_info()
...@@ -41,7 +41,7 @@ case $PMTYPE in ...@@ -41,7 +41,7 @@ case $PMTYPE in
docmd dpkg -I $pkg_files docmd dpkg -I $pkg_files
fi fi
[ -z "$pkg_names" ] && return [ -z "$pkg_names" ] && return
pkg_filenames=$pkg_names epm_query >/dev/null && docmd dpkg -p $pkg_names && return is_installed $pkg_names && docmd dpkg -p $pkg_names && return
docmd apt-cache show $pkg_names docmd apt-cache show $pkg_names
;; ;;
yum-rpm) yum-rpm)
......
...@@ -23,7 +23,7 @@ filter_out_installed_packages() ...@@ -23,7 +23,7 @@ filter_out_installed_packages()
{ {
[ -z "$skip_installed" ] && cat && return [ -z "$skip_installed" ] && cat && return
# TODO: rewrite with use epm_query # TODO: rewrite with use is_installed
# TODO: use this more effectively way # TODO: use this more effectively way
#for i in $(cat) ; do #for i in $(cat) ; do
# rpm -q $i >/dev/null && continue # rpm -q $i >/dev/null && continue
......
...@@ -56,7 +56,7 @@ __epm_query_file() ...@@ -56,7 +56,7 @@ __epm_query_file()
;; ;;
esac esac
docmd $CMD $pkg_files docmd $CMD $@
} }
__epm_query_name() __epm_query_name()
...@@ -77,17 +77,22 @@ __epm_query_name() ...@@ -77,17 +77,22 @@ __epm_query_name()
#return #return
;; ;;
npackd) npackd)
CMD="npackdcl path --package=$pkg_names" CMD="npackdcl path --package=$@"
;; ;;
*) *)
_query_via_packages_list $pkg_names _query_via_packages_list $@
return return
;; ;;
esac esac
docmd $CMD $pkg_names docmd $CMD $@
} }
# check if pkg is installed
is_installed()
{
pkg_filenames="$@" epm_query >/dev/null
}
epm_query() epm_query()
{ {
......
...@@ -145,6 +145,8 @@ epm_remove() ...@@ -145,6 +145,8 @@ epm_remove()
return return
fi fi
[ -n "$pkg_files" ] && fatal "FIXME: remove by package file is not supported yet"
[ -n "$pkg_filenames" ] || fatal "Run remove without args" [ -n "$pkg_filenames" ] || fatal "Run remove without args"
epm_remove_low $pkg_filenames && return epm_remove_low $pkg_filenames && return
......
epm
\ No newline at end of file
# This spec is backported to ALTLinux p6 automatically by rpmbph script. Do not edit it. # This spec is backported to ALTLinux p6 automatically by rpmbph script. Do not edit it.
# #
Name: eepm Name: eepm
Version: 1.0.6 Version: 1.0.7
Release: alt0.M60P.1 Release: alt0.M60P.1
Summary: Etersoft EPM package manager Summary: Etersoft EPM package manager
...@@ -51,9 +51,14 @@ with various distros. ...@@ -51,9 +51,14 @@ with various distros.
%_bindir/distr_info %_bindir/distr_info
%changelog %changelog
* Sat Nov 24 2012 Vitaly Lipatov <lav@altlinux.ru> 1.0.6-alt0.M60P.1 * Sat Dec 08 2012 Vitaly Lipatov <lav@altlinux.ru> 1.0.7-alt0.M60P.1
- backport to ALTLinux p6 (by rpmbph script) - backport to ALTLinux p6 (by rpmbph script)
* Sat Dec 08 2012 Vitaly Lipatov <lav@altlinux.ru> 1.0.7-alt1
- add epmq command as alias to epm -q (epm query)
- epm: rearrange command help
- epm-remove: warning about no support remove by package file
* Sat Nov 24 2012 Vitaly Lipatov <lav@altlinux.ru> 1.0.6-alt1 * Sat Nov 24 2012 Vitaly Lipatov <lav@altlinux.ru> 1.0.6-alt1
- epm: add changelog (cl) command - epm: add changelog (cl) command
- add support for work without tput, with uncompat tput, allow USETTY=0 for disable tput use - add support for work without tput, with uncompat tput, allow USETTY=0 for disable tput use
......
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