[csw-devel] SF.net SVN: gar:[9177] csw/mgar/gar/v2/bin/checkpkg

wahwah at users.sourceforge.net wahwah at users.sourceforge.net
Sun Mar 14 23:11:55 CET 2010


Revision: 9177
          http://gar.svn.sourceforge.net/gar/?rev=9177&view=rev
Author:   wahwah
Date:     2010-03-14 22:11:55 +0000 (Sun, 14 Mar 2010)

Log Message:
-----------
mGAR v2: checkpkg, removed the initial extraction of pkginfo files.

Modified Paths:
--------------
    csw/mgar/gar/v2/bin/checkpkg

Modified: csw/mgar/gar/v2/bin/checkpkg
===================================================================
--- csw/mgar/gar/v2/bin/checkpkg	2010-03-14 21:59:12 UTC (rev 9176)
+++ csw/mgar/gar/v2/bin/checkpkg	2010-03-14 22:11:55 UTC (rev 9177)
@@ -152,8 +152,6 @@
 	exit 1
 fi
 
-printf "Examining pkginfo files: "
-
 for f in "$@"
 do
 
@@ -190,35 +188,35 @@
 
 [ -d ${EXTRACTDIR} ] || mkdir ${EXTRACTDIR}
 
-# FIXME: This doesn't support multiple packages
-TMPFILE=$EXTRACTDIR/pkginfo
+# # FIXME: This doesn't support multiple packages
+# TMPFILE=$EXTRACTDIR/pkginfo
+# 
+# 
+# printf "$pkgname "
+# dd if=$f skip=1 | (cd $EXTRACTDIR; cpio -ivd $pkgname/pkginfo >/dev/null 2>&1)
+# if [[ $? -ne 0 ]] ; then
+# 	print "ERROR: could not extract $f"
+# 	print "with (cd $EXTRACTDIR; cpio -ivd $pkgname/pkginfo)"
+# 	ls -l $EXTRACTDIR
+# 	rm -rf $EXTRACTDIR $TMPARCHIVE
+# 	exit 1
+# fi
+# 
+# mv $EXTRACTDIR/$pkgname/pkginfo $EXTRACTDIR ; rmdir $EXTRACTDIR/$pkgname
+# 
+# software=`sed -n 's/^NAME=\([^ -]*\) -.*$/\1/p' $TMPFILE`
+# version=`sed -n 's/^VERSION=//p' $TMPFILE`
+# desc=`sed -n 's/^DESC=//p' $TMPFILE`
+# email=`sed -n 's/^EMAIL=//p' $TMPFILE`
+# maintname=`sed -n 's/^VENDOR=.*for CSW by //p' $TMPFILE`
+# hotline=`sed -n 's/^HOTLINE=//p' $TMPFILE`
+# basedir=`sed -n 's/^BASEDIR=//p' $TMPFILE`
+# pkgarch=`sed -n 's/^ARCH=//p' $TMPFILE|head -1`
+# 
+# rm $TMPFILE
 
-
-printf "$pkgname "
-dd if=$f skip=1 | (cd $EXTRACTDIR; cpio -ivd $pkgname/pkginfo >/dev/null 2>&1)
-if [[ $? -ne 0 ]] ; then
-	print "ERROR: could not extract $f"
-	print "with (cd $EXTRACTDIR; cpio -ivd $pkgname/pkginfo)"
-	ls -l $EXTRACTDIR
-	rm -rf $EXTRACTDIR $TMPARCHIVE
-	exit 1
-fi
-
-mv $EXTRACTDIR/$pkgname/pkginfo $EXTRACTDIR ; rmdir $EXTRACTDIR/$pkgname
-
-software=`sed -n 's/^NAME=\([^ -]*\) -.*$/\1/p' $TMPFILE`
-version=`sed -n 's/^VERSION=//p' $TMPFILE`
-desc=`sed -n 's/^DESC=//p' $TMPFILE`
-email=`sed -n 's/^EMAIL=//p' $TMPFILE`
-maintname=`sed -n 's/^VENDOR=.*for CSW by //p' $TMPFILE`
-hotline=`sed -n 's/^HOTLINE=//p' $TMPFILE`
-basedir=`sed -n 's/^BASEDIR=//p' $TMPFILE`
-pkgarch=`sed -n 's/^ARCH=//p' $TMPFILE|head -1`
-
-rm $TMPFILE
-
 # strip out '' chars, because it interferes with mysql
-desc=`print $desc | sed "s/'//g"`
+# desc=`print $desc | sed "s/'//g"`
 
 #############################################################
 # We now have the package expanded, in "directory" form, in
@@ -256,9 +254,6 @@
 tmparchives="$tmparchives $TMPARCHIVE"
 done
 
-# Terminating the line with pkgnames
-echo
-
 # Plugin section.
 #
 # Plugins should live in checkpkg.d subdirectory in the same directory in which
@@ -303,9 +298,9 @@
 			log_files="${log_files} ${plugin_log}"
 			plugin_name="`echo ${plugin} | sed -e 's+.*/checkpkg-++' | sed -e 's+\.py$++'`"
 			error_tag_file="tags.${plugin_name}"
-			printf "${BOLD}${module_name_format}${COLOR_RESET} running..." "${plugin_name}"
 			debugmsg "Executing: ${plugin} $extra_options -b \"${checkpkg_stats_basedir}\"" \
-		                 "-o \"${EXTRACTDIR}/${error_tag_file}\" `echo ${md5sums}`"
+		           "-o \"${EXTRACTDIR}/${error_tag_file}\" `echo ${md5sums}`"
+			printf "${BOLD}${module_name_format}${COLOR_RESET} running..." "${plugin_name}"
 			${plugin} \
 				$extra_options \
 				-b "${checkpkg_stats_basedir}" \
@@ -313,7 +308,8 @@
 				${md5sums} \
 				> "${plugin_log}" 2>&1
 			if [[ "$?" -ne 0 ]]; then
-				printf "\r${module_name_format} ${RED}[ERROR]${COLOR_RESET}        \\n" "${plugin_name}"
+				printf "\r${module_name_format} ${RED}[ERROR]${COLOR_RESET}        \\n" \
+				       "${plugin_name}"
 				test_suite_ok=0
 			else
 				printf "\r${module_name_format} [Done]        \\n" "${plugin_name}"
@@ -339,23 +335,19 @@
 done
 
 # This check is special; it uses one executable for all the checks written in Python.
-print "Running Python tests..."
+print "Analyzing collected statistics..."
 ${command_basedir}/checkpkg_run_modules.py \
     ${extra_options} \
     -b "${checkpkg_stats_basedir}" \
     -o "${EXTRACTDIR}/tags.python-checks" \
     ${md5sums}
 if [[ "$?" -ne 0 ]]; then
-  print "There was a problem running Python tests."
+  print "There was a problem analyzing package stats."
   test_suite_ok=0
-else
-  print "Python tests done."
 fi
 
 if [[ ${test_suite_ok} -ne 1 ]]; then
-	errmsg "One or more modular tests have finished with an error."
-else
-	print "All modular tests completed.  Analyzing the reports."
+	errmsg "One or more tests have finished with an error."
 fi
 
 if [[ "${DEBUG}" != "" ]]; then


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.


More information about the devel mailing list