summaryrefslogtreecommitdiffstats
path: root/urpmf
diff options
context:
space:
mode:
authorFrancois Pons <fpons@mandriva.com>2001-07-05 14:55:55 +0000
committerFrancois Pons <fpons@mandriva.com>2001-07-05 14:55:55 +0000
commita7d8af5f49a599f4eecdd157586722e6414dbd96 (patch)
treebd53a889546ef1eadd2c6b630f5805250d781407 /urpmf
parent8da0fb2c7218443243777a30964c1695c579e68c (diff)
downloadurpmi-a7d8af5f49a599f4eecdd157586722e6414dbd96.tar
urpmi-a7d8af5f49a599f4eecdd157586722e6414dbd96.tar.gz
urpmi-a7d8af5f49a599f4eecdd157586722e6414dbd96.tar.bz2
urpmi-a7d8af5f49a599f4eecdd157586722e6414dbd96.tar.xz
urpmi-a7d8af5f49a599f4eecdd157586722e6414dbd96.zip
fixed wrong dependencies resolution on local rpm.
improved urpmf. updated man pages.
Diffstat (limited to 'urpmf')
-rwxr-xr-xurpmf62
1 files changed, 49 insertions, 13 deletions
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 [<file>]"
- 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] <file>"
+ $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] <file>"
+ $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