Mailinglist Archive: zypp-commit (266 mails)

< Previous Next >
[zypp-commit] r11707 - /trunk/sat-solver/tools/repo2solv.sh
  • From: mlschroe@xxxxxxxxxxxxxxxx
  • Date: Tue, 18 Nov 2008 17:02:39 -0000
  • Message-id: <20081118170239.CB4A69E4AB@xxxxxxxxxxxxxxxx>
Author: mlschroe
Date: Tue Nov 18 18:02:39 2008
New Revision: 11707

URL: http://svn.opensuse.org/viewcvs/zypp?rev=11707&view=rev
Log:
- support "-R" option for recursive plaindir search

Modified:
trunk/sat-solver/tools/repo2solv.sh

Modified: trunk/sat-solver/tools/repo2solv.sh
URL:
http://svn.opensuse.org/viewcvs/zypp/trunk/sat-solver/tools/repo2solv.sh?rev=11707&r1=11706&r2=11707&view=diff
==============================================================================
--- trunk/sat-solver/tools/repo2solv.sh (original)
+++ trunk/sat-solver/tools/repo2solv.sh Tue Nov 18 18:02:39 2008
@@ -24,11 +24,21 @@
unset CDPATH
parser_options=${PARSER_OPTIONS:-}

-if test "$1" = "-o" ; then
- exec > "$2"
- shift
- shift
-fi
+findopt="-prune"
+
+while true ; do
+ if test "$1" = "-o" ; then
+ exec > "$2"
+ shift
+ shift
+ elif test "$1" = "-R" ; then
+ # recursive
+ findopt=
+ shift
+ else
+ break
+ fi
+done

dir="$1"
cd "$dir" || exit 1
@@ -291,15 +301,5 @@
) | susetags2solv -c "${olddir}/content" $parser_options || exit 4
cd "$olddir"
else
- rpms=''
- for r in *.rpm ; do
- test -e "$r" || continue
- rpms="$rpms
-$r"
- done
- if test -n "$rpms" ; then
- echo "${rpms#?}" | rpms2solv -m -
- else
- exit 1
- fi
+ find * -name .\* -prune -o $findopt -name \*.delta.rpm -o -name \*.patch.rpm
-o -name \*.rpm -a -type f -print0 | rpms2solv -0 -m -
fi

--
To unsubscribe, e-mail: zypp-commit+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: zypp-commit+help@xxxxxxxxxxxx

< Previous Next >
This Thread
  • No further messages