From c6dac8ec87a7f9498b65e622b164dfc8da4b1de4 Mon Sep 17 00:00:00 2001 From: Jonas Smedegaard Date: Sat, 26 Jun 2010 20:41:55 +0200 Subject: Silence output by default, and reorganize DEBUG levels. --- localdebpool | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/localdebpool b/localdebpool index a8062e3..28b7d42 100755 --- a/localdebpool +++ b/localdebpool @@ -114,7 +114,11 @@ genlist() { esac mkdir -p "$destdir" debugprint "genlist: \"$cmd . /dev/null pkg/$section/\"" "2" - ( cd "$srcdir" && $cmd . /dev/null pkg/$section/ ) > "$destdir/$file" + if [ -n "$DEBUG" ] && [ "$DEBUG" -ge 2 ]; then + ( cd "$srcdir" && $cmd . /dev/null pkg/$section/ ) > "$destdir/$file" + else + ( cd "$srcdir" && $cmd . /dev/null pkg/$section/ ) > "$destdir/$file" 2> /dev/null + fi if [ -s "$destdir/$file" ]; then debugprint "Finalizing list at \"$destdir/\"" "2" gzip -c "$destdir/$file" > "$destdir/$file.gz" @@ -192,7 +196,11 @@ else fi debugprint "Clean dangling symlinks below \"$PRVBASE\" and \"$PUBBASE\"..." -symlinks -dr ${DEBUG:+-v} "$PRVBASE" "$PUBBASE" +if [ -n "$DEBUG" ] && [ "$DEBUG" -ge 3 ]; then + symlinks -dr ${DEBUG:+-v} "$PRVBASE" "$PUBBASE" +else + symlinks -dr ${DEBUG:+-v} "$PRVBASE" "$PUBBASE" > /dev/null +fi # Create/update symlink farms $prvgrpdir and $pubpkgdir # @@ -243,7 +251,7 @@ allsections="$( \ | sectionsfromhintstream )" allsections="$(compactlist $allsections)" -debugprint "All sections: \"$allsections\"" +debugprint "All sections: \"$allsections\"" "2" dists="$(distsfromprvgrpdirs "$PRVBASE/sections")" dists="$(compactlist $dists)" -- cgit v1.2.3