summaryrefslogtreecommitdiff
path: root/localdebpool
diff options
context:
space:
mode:
authorJonas Smedegaard <dr@jones.dk>2010-06-26 20:41:55 +0200
committerJonas Smedegaard <dr@jones.dk>2010-06-26 20:41:55 +0200
commitc6dac8ec87a7f9498b65e622b164dfc8da4b1de4 (patch)
tree4c0348ef3bd7c7d86f688901c31ede245ca9205a /localdebpool
parent7753bdd66332eaaf4bf2e0e011d54330e35b0e0e (diff)
Silence output by default, and reorganize DEBUG levels.
Diffstat (limited to 'localdebpool')
-rwxr-xr-xlocaldebpool14
1 files 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)"