From 2472fd1fdd001a956ba52811b43c5425958d9a26 Mon Sep 17 00:00:00 2001 From: Benjamin Trigona-Harany Date: Mon, 17 May 2021 19:08:07 +0200 Subject: [PATCH] sbopkg: Checking for updates is now twice as fast. Signed-off-by: Willy Sudiarto Raharjo --- src/usr/doc/THANKS | 1 + src/usr/sbin/sbopkg | 6 +++--- tools/ChangeLog-latest.txt | 4 +++- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/usr/doc/THANKS b/src/usr/doc/THANKS index a77d263..dd25dc1 100644 --- a/src/usr/doc/THANKS +++ b/src/usr/doc/THANKS @@ -101,3 +101,4 @@ We moved to github, so revision number no longer used Geremia djunzu nobodino + Benjamin Trigona-Harany diff --git a/src/usr/sbin/sbopkg b/src/usr/sbin/sbopkg index 1f16f36..6bd19a9 100755 --- a/src/usr/sbin/sbopkg +++ b/src/usr/sbin/sbopkg @@ -712,7 +712,7 @@ check_for_updates() { local TEMPFILE=$SBOPKGTMP/sbopkg_updates_tempfile local ERRORMSG=$SBOPKGTMP/sbopkg_updates_errormsg local PROGRESSCOUNTER=0 - local FIND_FLAGS="$REPO_DIR -mindepth 3 -maxdepth 3" + local FIND_FLAGS="-mindepth 3 -maxdepth 3" local NEWSB NEWINFO NEWVER local VERSION_EXPRESSION local UPDATELIST VERSION_FILE PROGRESSBAR_INTERRUPTED @@ -781,13 +781,13 @@ check_for_updates() { get_new_name NAME $OLDNAME # Find the current SlackBuild - NEWSB=$(find $FIND_FLAGS -name $NAME.SlackBuild) + NEWSB=$(ls $REPO_DIR/*/$NAME/$NAME.SlackBuild 2> /dev/null) if [[ -z $NEWSB ]]; then # Maybe we're running an old repository where the rename # didn't take place if [[ $NAME != $OLDNAME ]]; then NAME=$OLDNAME - NEWSB=$(find $FIND_FLAGS -name $NAME.SlackBuild) + NEWSB=$(ls $REPO_DIR/*/$NAME/$NAME.SlackBuild 2> /dev/null) fi fi diff --git a/tools/ChangeLog-latest.txt b/tools/ChangeLog-latest.txt index df3cc10..e3bde49 100644 --- a/tools/ChangeLog-latest.txt +++ b/tools/ChangeLog-latest.txt @@ -1,6 +1,6 @@ SBOPKG NEWS -sbopkg-dev (2021-03-13 02:54:50 UTC) +sbopkg-dev (2021-05-18 18:32:02 UTC) FEATURES * sqg: Parallelize building of single and all packages by option -j. Patch by Marcel Saegebarth. @@ -34,6 +34,8 @@ sbopkg-dev (2021-03-13 02:54:50 UTC) Patch by Geremia (#62) * sbopkg: Faster clone on SBo-git configuration Patch by djunzu (#67) + * sbopkg: Checking for updates is now twice faster. + Patch by Benjamin Trigona-Harany (#68) MODIFICATIONS * bash-completion: Complete -i and -b when git repo is used