From a7d8af5f49a599f4eecdd157586722e6414dbd96 Mon Sep 17 00:00:00 2001 From: Francois Pons Date: Thu, 5 Jul 2001 14:55:55 +0000 Subject: fixed wrong dependencies resolution on local rpm. improved urpmf. updated man pages. --- urpmf | 62 +++++++++++++++++++++++++++++++++++++++++++++++++------------- 1 file changed, 49 insertions(+), 13 deletions(-) (limited to 'urpmf') diff --git a/urpmf b/urpmf index 4101df4f..dc1e471f 100755 --- a/urpmf +++ b/urpmf @@ -7,19 +7,55 @@ ECHO=`which gettext 2> /dev/null` [ -z "$ECHO" ] && ECHO="echo" || ECHO="$ECHO -s" TEXTDOMAIN="urpmi" - -if [ "$#" -gt 1 ] || [ "$1" = "-h" ] || [ "$1" = "--help" ]; then - $ECHO "usage: rpmf []" - exit 1 -fi +export TEXTDOMAIN dir="/var/lib/urpmi" +options= - -if /bin/ls $dir/hdlist.* >/dev/null 2>/dev/null; then - parsehdlist --files --quiet $dir/hdlist.* | grep -E "$1" -else - $ECHO "urpmi is not installed" - exit 1 -fi - +while true +do + case $1 in + -h|--help) + $ECHO "urpmf version" `rpm -q rpmtools --qf '%{VERSION}'` + $ECHO "Copyright (C) 1999,2000,2001 MandrakeSoft." + $ECHO "This is free software and may be redistributed under the terms of the GNU GPL." + echo + $ECHO "usage: urpmf [options] " + $ECHO " --quiet - do not print tag name (default if no tag given on command" + $ECHO " line, incompatible with interactive mode)." + $ECHO " --all - print all tags." + $ECHO " --name - print tag name: rpm filename (assumed if no tag given on" + $ECHO " command line but without package name)." + $ECHO " --group - print tag group: group." + $ECHO " --size - print tag size: size." + $ECHO " --serial - print tag serial: serial." + $ECHO " --summary - print tag summary: summary." + $ECHO " --description - print tag description: description." + $ECHO " --provides - print tag provides: all provides (mutliple lines)." + $ECHO " --requires - print tag requires: all requires (multiple lines)." + $ECHO " --files - print tag files: all files (multiple lines)." + $ECHO " --conflicts - print tag conflicts: all conflicts (multiple lines)." + $ECHO " --obsoletes - print tag obsoletes: all obsoletes (multiple lines)." + $ECHO " --prereqs - print tag prereqs: all prereqs (multiple lines)." + exit 1 + ;; + --*) + options="$1 $options" + shift + ;; + *) + if [ $# -gt 1 ]; then + $ECHO "usage: urpmf [options] " + $ECHO "try urpmf --help for more options" + exit 1 + fi + if /bin/ls $dir/hdlist.* >/dev/null 2>/dev/null; then + parsehdlist ${options:---files --quiet} $dir/hdlist.* | grep -E "$1" + exit $? + else + $ECHO "urpmi is not installed" + exit 1 + fi + ;; + esac +done -- cgit v1.2.1