From 0388269d9097fd242321a240b25490cc0804ef50 Mon Sep 17 00:00:00 2001 From: Davide Madrisan Date: Sun, 22 Jan 2012 19:03:48 +0100 Subject: [PATCH] pck-update: batter test when looking for unpackaged files Signed-off-by: Davide Madrisan --- plugins/pck-update.in | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/plugins/pck-update.in b/plugins/pck-update.in index 62c4070..25e7ee7 100644 --- a/plugins/pck-update.in +++ b/plugins/pck-update.in @@ -2284,14 +2284,16 @@ It seems good but do not forget to run quality and security tests.""${NORM}" [ $? -eq 0 ] || notify.error $"can't create temporary files" notify.debug "tmpunpackfiles = \`${NOTE}$tmpunpackfiles${NORM}'" - LC_ALL=C \ - rpmbuild -bl --nodeps --nobuild \ - $SRPM_SPECFILE_WITH_PATH $USER_RPMDEFINE_OPTS 2>&1 | \ - sed -e '/./{H;$!d;}' -e 'x;/RPM build errors:/!d;' | \ - while read line; do - case "$line" in *\ /*|/*) echo "$line" ;; esac - done | sed -e "$format_unpackaged_file_list" \ - > $tmpunpackfiles + local skipline=1 + while read line; do + case "$line" in + "error: Installed (but unpackaged) file(s) found:") + skipline=0; continue ;; + "") skipline=1 ;; + esac + [ "$skipline" = 1 ] || echo "$line" + done < <(LC_ALL=C rpmbuild -bl --nobuild \ + $SRPM_SPECFILE_WITH_PATH 2>&1) > $tmpunpackfiles if [ -s "$tmpunpackfiles" ]; then notify.error $"\