From f4dbf4b5c29726714f9ca1547fb8d4a024f3510d Mon Sep 17 00:00:00 2001 From: Silvan Calarco Date: Sat, 7 Jun 2014 19:20:56 +0200 Subject: [PATCH] autodist-repository, webbuild-cgi: use 'ls --color=none' to access local repository to speed up when using NFS --- autodist-repository | 4 ++-- webbuild/webbuild-cgi | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/autodist-repository b/autodist-repository index e83b665..d1f8f68 100755 --- a/autodist-repository +++ b/autodist-repository @@ -690,7 +690,7 @@ done for rep in ${AUTODIST_REPOSITORIES_LOCAL_REPS[*]} ${AUTODIST_REPOSITORIES_REMOTE_REPS[*]}; do [[ "$rep" =~ "$searchrep" ]] || continue [ -r ${LOCAL_REPS_BASE_DIR}/$rep/SRPMS.base ] || continue - ls ${LOCAL_REPS_BASE_DIR}/$rep/SRPMS.base | grep $GREP_OPTS "$searchstring" 2>/dev/null | \ + ls --color=none ${LOCAL_REPS_BASE_DIR}/$rep/SRPMS.base | grep $GREP_OPTS "$searchstring" 2>/dev/null | \ while read PKGLINE; do [ "$PKGLINE" ] && { echo "$rep(source): ${PKGLINE/ *}" @@ -698,7 +698,7 @@ done done for a in ${AUTODIST_ARCHS[*]}; do [ -r ${LOCAL_REPS_BASE_DIR}/$rep/RPMS.$a ] || continue - ls ${LOCAL_REPS_BASE_DIR}/$rep/RPMS.$a | grep $GREP_OPTS "$searchstring" 2>/dev/null | \ + ls --color=none ${LOCAL_REPS_BASE_DIR}/$rep/RPMS.$a | grep $GREP_OPTS "$searchstring" 2>/dev/null | \ while read PKGLINE; do [ "$PKGLINE" ] && { echo "$rep($a): ${PKGLINE/ *}" diff --git a/webbuild/webbuild-cgi b/webbuild/webbuild-cgi index 056b4b1..0c61bac 100755 --- a/webbuild/webbuild-cgi +++ b/webbuild/webbuild-cgi @@ -891,7 +891,7 @@ if [ "$MAINTAINERMODE" = "true" -o ! "${AUTOPORT_UPDATE[$ENVIRONMENT]}" ]; then SRPMBUTTONDISABLED="disabled=disabled" if [ -e $local_ftp/$REPOSITORY ]; then if [ $local_ftp/$REPOSITORY/SRPMS.base -nt $WEBBUILD_STATEDIR/cache/repository-src-$REPOSITORY ]; then - ls $local_ftp/$REPOSITORY/SRPMS.base/ | grep ".src.rpm$" | sort -f > $WEBBUILD_STATEDIR/cache/repository-src-$REPOSITORY + ls --color=none $local_ftp/$REPOSITORY/SRPMS.base/ | grep ".src.rpm$" | sort -f > $WEBBUILD_STATEDIR/cache/repository-src-$REPOSITORY fi else curl $REPS_BASE_URL/$REPOSITORY/SRPMS.base/ | grep .src.rpm | \ @@ -2112,7 +2112,7 @@ if [ "$MAINTAINERMODE" = "true" ]; then echo -n "" echo -n "
" if [ $local_ftp/$REPOSITORY/SRPMS.base -nt $WEBBUILD_STATEDIR/cache/repository-src-$REPOSITORY ]; then - ls $local_ftp/$REPOSITORY/SRPMS.base/ | grep ".src.rpm$" | sort -f > $WEBBUILD_STATEDIR/cache/repository-src-$REPOSITORY + ls --color=none $local_ftp/$REPOSITORY/SRPMS.base/ | grep ".src.rpm$" | sort -f > $WEBBUILD_STATEDIR/cache/repository-src-$REPOSITORY fi while read f; do pkgname=${f/.src.rpm}