From 5def702b5611ce9cd5ea6cd715838505cbd23873 Mon Sep 17 00:00:00 2001 From: "Tom G. Christensen" Date: Wed, 14 Jul 2004 10:08:11 +0000 Subject: [PATCH] Make the output from the unpackaged files check much more readable. --- buildpkg.packaging.solaris | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/buildpkg.packaging.solaris b/buildpkg.packaging.solaris index b113fd3..7f16f05 100644 --- a/buildpkg.packaging.solaris +++ b/buildpkg.packaging.solaris @@ -366,19 +366,26 @@ check_unpackaged() { local upf local i + local indent4=" " + $FIND . -type f -print|$SED -e 's/\.\///g' > $tmpdir/files.tmp $FIND . -type l -print|$SED -e 's/\.\///g' >> $tmpdir/files.tmp $FIND . -type d -print|$SED -e 's/\.\///g'|$GREP -v '^\.' >> $tmpdir/files.tmp $SORT $metadir/files.tmp|$UNIQ > $tmpdir/f1 $SORT $tmpdir/files.tmp > $tmpdir/f2 if [ ! "$($CMP $tmpdir/f1 $tmpdir/f2)" == "" ]; then - upf="$($DIFF -u $tmpdir/f1 $tmpdir/f2)" - for i in $upf - do - echo $i - done - $RM -f $tmpdir/f1 $tmpdir/f2 - error $E_UNPACKAGED_FILES check_unpackaged + upf="$($CAT $tmpdir/f1 $tmpdir/f2 | $SORT | $UNIQ -u)" + if [ ! -z "$upf" ]; then + echo "There are unpackaged files in the stagedir:" + for i in $upf + do + echo "${indent4}${i}" + done + fi + $RM -f $tmpdir/f1 $tmpdir/f2 + if [ "$ignore_unpackaged_files" -eq 0 ]; then + error $E_UNPACKAGED_FILES check_unpackaged + fi fi $RM -f $tmpdir/f1 $tmpdir/f2 } @@ -425,9 +432,7 @@ generic_pack() setdir "$stagedir$prefix" fi parse_def - if [ "$ignore_unpackaged_files" -eq 0 ]; then - check_unpackaged - fi + check_unpackaged # Create a list of all the packages that we are going to build for i in $(list_pkgs) do