Commit 62ca6594 authored by Vitaly Lipatov's avatar Vitaly Lipatov

rpmreqs: add showcmd for rpmquery and apt-get

parent c3df2fbf
...@@ -153,6 +153,7 @@ trans_rpmdeps_to_pkgname_lav() ...@@ -153,6 +153,7 @@ trans_rpmdeps_to_pkgname_lav()
TFILE=$(make_temp_file) TFILE=$(make_temp_file)
PKGFILES= PKGFILES=
if [ -n "$REQCONVLIST" ] ; then if [ -n "$REQCONVLIST" ] ; then
showcmd apt-get install --print-uris ...
PKGFILES=$(LANG=C apt-get install --print-uris $REQCONVLIST 2>$TFILE | grep -E "(^Selecting|.* is already the newest version.)" | sed -e "s|^Selecting ||g" | sed -e "s| is already the newest version.||g" | sed -e "s| .*||g" | sort -u | filter_pkgname) || warning "Error return code from apt-get install" PKGFILES=$(LANG=C apt-get install --print-uris $REQCONVLIST 2>$TFILE | grep -E "(^Selecting|.* is already the newest version.)" | sed -e "s|^Selecting ||g" | sed -e "s| is already the newest version.||g" | sed -e "s| .*||g" | sort -u | filter_pkgname) || warning "Error return code from apt-get install"
if grep -q "is a virtual package provided by" $TFILE ; then if grep -q "is a virtual package provided by" $TFILE ; then
local INSTALLMARK="\[Installed\]" local INSTALLMARK="\[Installed\]"
...@@ -217,6 +218,7 @@ passwdqc-control" ...@@ -217,6 +218,7 @@ passwdqc-control"
if [ "$1" = "-p" ] ; then if [ "$1" = "-p" ] ; then
[ -s "$2" ] || fatal "Missed file $2" [ -s "$2" ] || fatal "Missed file $2"
fi fi
showcmd rpmquery --requires "$@"
REQLIST=$(get_rpm_package_requires "$@") || fatal "can't get primary requires" REQLIST=$(get_rpm_package_requires "$@") || fatal "can't get primary requires"
trans_rpmdeps_to_pkgname_lav $REQLIST trans_rpmdeps_to_pkgname_lav $REQLIST
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