autodist-repository, webbuild-cgi: use 'ls --color=none' to access local repository to speed up when using NFS

This commit is contained in:
Silvan Calarco 2014-06-07 19:20:56 +02:00
parent 13e52f18d5
commit f4dbf4b5c2
2 changed files with 4 additions and 4 deletions

View File

@ -690,7 +690,7 @@ done
for rep in ${AUTODIST_REPOSITORIES_LOCAL_REPS[*]} ${AUTODIST_REPOSITORIES_REMOTE_REPS[*]}; do for rep in ${AUTODIST_REPOSITORIES_LOCAL_REPS[*]} ${AUTODIST_REPOSITORIES_REMOTE_REPS[*]}; do
[[ "$rep" =~ "$searchrep" ]] || continue [[ "$rep" =~ "$searchrep" ]] || continue
[ -r ${LOCAL_REPS_BASE_DIR}/$rep/SRPMS.base ] || 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 while read PKGLINE; do
[ "$PKGLINE" ] && { [ "$PKGLINE" ] && {
echo "$rep(source): ${PKGLINE/ *}" echo "$rep(source): ${PKGLINE/ *}"
@ -698,7 +698,7 @@ done
done done
for a in ${AUTODIST_ARCHS[*]}; do for a in ${AUTODIST_ARCHS[*]}; do
[ -r ${LOCAL_REPS_BASE_DIR}/$rep/RPMS.$a ] || continue [ -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 while read PKGLINE; do
[ "$PKGLINE" ] && { [ "$PKGLINE" ] && {
echo "$rep($a): ${PKGLINE/ *}" echo "$rep($a): ${PKGLINE/ *}"

View File

@ -891,7 +891,7 @@ if [ "$MAINTAINERMODE" = "true" -o ! "${AUTOPORT_UPDATE[$ENVIRONMENT]}" ]; then
SRPMBUTTONDISABLED="disabled=disabled" SRPMBUTTONDISABLED="disabled=disabled"
if [ -e $local_ftp/$REPOSITORY ]; then if [ -e $local_ftp/$REPOSITORY ]; then
if [ $local_ftp/$REPOSITORY/SRPMS.base -nt $WEBBUILD_STATEDIR/cache/repository-src-$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 fi
else else
curl $REPS_BASE_URL/$REPOSITORY/SRPMS.base/ | grep .src.rpm | \ curl $REPS_BASE_URL/$REPOSITORY/SRPMS.base/ | grep .src.rpm | \
@ -2112,7 +2112,7 @@ if [ "$MAINTAINERMODE" = "true" ]; then
echo -n "<label><input type=checkbox name=pkgsselectallcheckbox value=\"\" onclick=checkAllBoxes('packagescheckbox',this.checked);>select/unselect all</label>" echo -n "<label><input type=checkbox name=pkgsselectallcheckbox value=\"\" onclick=checkAllBoxes('packagescheckbox',this.checked);>select/unselect all</label>"
echo -n "<div class=multiselect>" echo -n "<div class=multiselect>"
if [ $local_ftp/$REPOSITORY/SRPMS.base -nt $WEBBUILD_STATEDIR/cache/repository-src-$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 fi
while read f; do while read f; do
pkgname=${f/.src.rpm} pkgname=${f/.src.rpm}