Commit cf871bc0 authored by Vitaly Lipatov's avatar Vitaly Lipatov

assure we have a command rpm/dpkg when work with a package file

parent c12c585e
......@@ -34,6 +34,7 @@ __epm_changelog_files()
# TODO: detect every file
case $(get_package_type $1) in
rpm)
assure_exists rpm
docmd_foreach "rpm -p --changelog" $@ | less
;;
# deb)
......
......@@ -24,9 +24,11 @@ check_pkg_integrity()
case $(get_package_type $PKG) in
rpm)
assure_exists rpm
docmd rpm --checksig $PKG
;;
deb)
assure_exists dpkg
# FIXME: debsums -ca package ?
docmd dpkg --contents $PKG >/dev/null && echo "Package $PKG is correct."
;;
......
......@@ -25,6 +25,7 @@ epm_conflicts_files()
case $(get_package_type $pkg_files) in
rpm)
assure_exists rpm
docmd "rpm -q --conflicts -p" $pkg_files
;;
#deb)
......
......@@ -64,9 +64,11 @@ __epm_filelist_file()
# TODO: allow a new packages
case $(get_package_type $1) in
rpm)
assure_exists rpm
CMD="rpm -qlp"
;;
deb)
assure_exists dpkg
CMD="dpkg --contents"
;;
*)
......
......@@ -27,9 +27,11 @@ epm_provides_files()
case $PKGTYPE in
rpm)
assure_exists rpm
docmd rpm -q --provides -p $pkg_files
;;
deb)
assure_exists dpkg
# FIXME: will we provide ourself?
docmd dpkg -I $pkg_files | grep "^ *Provides:" | sed "s|^ *Provides:||g"
;;
......
......@@ -27,9 +27,11 @@ epm_requires_files()
case "$PKGTYPE" in
rpm)
assure_exists rpm
docmd rpm -q --requires -p $pkg_files
;;
deb)
assure_exists dpkg
a= docmd dpkg -I $pkg_files | grep "^ *Depends:" | sed "s|^ *Depends:||g"
;;
*)
......
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