From 3c9b3d974222194518ab49fdd66c82a321532311 Mon Sep 17 00:00:00 2001 From: "mauro.giachero" Date: Fri, 23 Jan 2009 16:12:36 +0000 Subject: [PATCH] Fix slack-desc parsing regression from r361 Prior to r361, there were two places where the slack-desc was parsed: in the "package browser" and in the "search results". r361 tossed most of the "package browser" code, including that part. It happens that the two implementation were different, and of course the removed one was the better of the two. This patch applies a further improved implementation to the current code. Thanks to "jsunx1" for providing the original implementation and for pointing out the regression. Thanks to Chess Griffin for preparing and sending me a patch restoring the old behavior. Signed-off-by: Mauro Giachero --- src/usr/bin/sbopkg | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/usr/bin/sbopkg b/src/usr/bin/sbopkg index e11a3f5..c0fcad5 100755 --- a/src/usr/bin/sbopkg +++ b/src/usr/bin/sbopkg @@ -1568,8 +1568,8 @@ gen_search_package () { if [ "$DIAG" = 1 ]; then for i in $RESULTS; do DESC=$(grep -hZm1 ^$(echo "$i" | - cut -d/ -f2) ./$i/slack-desc* | cut -d\( -f2- | - cut -d\) -f1) + cut -d/ -f2) ./$i/slack-desc* | + sed 's/^[^(]*( *\(.*[^ ]\) *)[^)]*$/\1/') if [[ "$CATEGORY" = "*" ]]; then NAME=$i else