public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] portage r11917 - in main/branches/2.1.6: bin pym/portage
@ 2008-11-15  2:25 Zac Medico (zmedico)
  0 siblings, 0 replies; only message in thread
From: Zac Medico (zmedico) @ 2008-11-15  2:25 UTC (permalink / raw
  To: gentoo-commits

Author: zmedico
Date: 2008-11-15 02:25:05 +0000 (Sat, 15 Nov 2008)
New Revision: 11917

Modified:
   main/branches/2.1.6/bin/dobin
   main/branches/2.1.6/bin/dodoc
   main/branches/2.1.6/bin/doexe
   main/branches/2.1.6/bin/doinfo
   main/branches/2.1.6/bin/doins
   main/branches/2.1.6/bin/doman
   main/branches/2.1.6/bin/domo
   main/branches/2.1.6/bin/newbin
   main/branches/2.1.6/bin/newconfd
   main/branches/2.1.6/bin/newdoc
   main/branches/2.1.6/bin/newenvd
   main/branches/2.1.6/bin/newexe
   main/branches/2.1.6/bin/newinitd
   main/branches/2.1.6/bin/newins
   main/branches/2.1.6/bin/newlib.a
   main/branches/2.1.6/bin/newlib.so
   main/branches/2.1.6/bin/newman
   main/branches/2.1.6/bin/newsbin
   main/branches/2.1.6/pym/portage/__init__.py
Log:
Fix new* and do* ebuild helpers to generate consistent error messages for
missing files and generate an appropriate QA Notice when such an error is
detected in the build log. Thanks to Diego 'Flameeyes' Petten?\195?\178 <flameeyes@g.o>
for the suggestion. (trunk r11916)


Modified: main/branches/2.1.6/bin/dobin
===================================================================
--- main/branches/2.1.6/bin/dobin	2008-11-15 02:23:43 UTC (rev 11916)
+++ main/branches/2.1.6/bin/dobin	2008-11-15 02:25:05 UTC (rev 11917)
@@ -20,7 +20,7 @@
 	if [[ -e ${x} ]] ; then
 		install -m0755 -o ${PORTAGE_INST_UID:-0} -g ${PORTAGE_INST_GID:-0} "${x}" "${D}${DESTTREE}/bin"
 	else
-		vecho "!!! ${0##*/}: ${x} does not exist" 1>&2
+		echo "!!! ${0##*/}: $x does not exist" 1>&2
 		false
 	fi
 	((ret+=$?))

Modified: main/branches/2.1.6/bin/dodoc
===================================================================
--- main/branches/2.1.6/bin/dodoc	2008-11-15 02:23:43 UTC (rev 11916)
+++ main/branches/2.1.6/bin/dodoc	2008-11-15 02:25:05 UTC (rev 11917)
@@ -20,7 +20,7 @@
 		install -m0644 "${x}" "${dir}"
 		ecompress --queue "${dir}/${x##*/}"
 	elif [ ! -e "${x}" ] ; then
-		echo "dodoc: ${x} does not exist" 1>&2
+		echo "!!! ${0##*/}: $x does not exist" 1>&2
 		((++ret))
 	fi
 done

Modified: main/branches/2.1.6/bin/doexe
===================================================================
--- main/branches/2.1.6/bin/doexe	2008-11-15 02:23:43 UTC (rev 11916)
+++ main/branches/2.1.6/bin/doexe	2008-11-15 02:25:05 UTC (rev 11917)
@@ -24,5 +24,6 @@
 	else
 		mysrc="${x}"
 	fi
-	install ${EXEOPTIONS} "${mysrc}" "${D}${_E_EXEDESTTREE_}"
+	install $EXEOPTIONS "$mysrc" "$D$_E_EXEDESTTREE_" || \
+		echo "!!! ${0##*/}: $mysrc does not exist" 1>&2
 done

Modified: main/branches/2.1.6/bin/doinfo
===================================================================
--- main/branches/2.1.6/bin/doinfo	2008-11-15 02:23:43 UTC (rev 11916)
+++ main/branches/2.1.6/bin/doinfo	2008-11-15 02:25:05 UTC (rev 11917)
@@ -12,4 +12,11 @@
 	install -d "${D}usr/share/info" || exit 1
 fi
 
-exec install -m0644 "$@" "${D}usr/share/info"
+install -m0644 "$@" "${D}usr/share/info"
+rval=$?
+if [ $rval -ne 0 ] ; then
+	for x in "$@" ; do
+		[ -e "$x" ] || echo "!!! ${0##*/}: $x does not exist" 1>&2
+	done
+fi
+exit $rval

Modified: main/branches/2.1.6/bin/doins
===================================================================
--- main/branches/2.1.6/bin/doins	2008-11-15 02:23:43 UTC (rev 11916)
+++ main/branches/2.1.6/bin/doins	2008-11-15 02:25:05 UTC (rev 11917)
@@ -43,6 +43,7 @@
 	install ${INSOPTIONS} "${mysrc}" "${D}${INSDESTTREE}/${mydir}"
 	rval=$?
 	[[ -n ${cleanup} ]] && rm -f "${cleanup}"
+	[ $rval -ne 0 ] && echo "!!! ${0##*/}: $mysrc does not exist" 1>&2
 	return $rval
 }
 

Modified: main/branches/2.1.6/bin/doman
===================================================================
--- main/branches/2.1.6/bin/doman	2008-11-15 02:23:43 UTC (rev 11916)
+++ main/branches/2.1.6/bin/doman	2008-11-15 02:25:05 UTC (rev 11917)
@@ -50,7 +50,7 @@
 			install -m0644 "${x}" "${D}/usr/share/man/${mandir}/${name}"
 			((ret+=$?))
 		elif [[ ! -e ${x} ]] ; then
-			vecho "doman: ${x} does not exist" 1>&2
+			echo "!!! ${0##*/}: $x does not exist" 1>&2
 			((++ret))
 		fi
 	else

Modified: main/branches/2.1.6/bin/domo
===================================================================
--- main/branches/2.1.6/bin/domo	2008-11-15 02:23:43 UTC (rev 11916)
+++ main/branches/2.1.6/bin/domo	2008-11-15 02:25:05 UTC (rev 11917)
@@ -21,6 +21,6 @@
 		fi
 		install -m0644 "${x}" "${mydir}/${MOPREFIX}.mo"
 	else
-		echo "${0}: ${x} does not exist"
+		echo "!!! ${0##*/}: $x does not exist" 1>&2
 	fi
 done

Modified: main/branches/2.1.6/bin/newbin
===================================================================
--- main/branches/2.1.6/bin/newbin	2008-11-15 02:23:43 UTC (rev 11916)
+++ main/branches/2.1.6/bin/newbin	2008-11-15 02:25:05 UTC (rev 11917)
@@ -8,6 +8,11 @@
 	exit 1
 fi
 
+if [ ! -e "$1" ] ; then
+	echo "!!! ${0##*/}: $1 does not exist" 1>&2
+	exit 1
+fi
+
 rm -rf "${T}/${2}" && \
 cp -f "${1}" "${T}/${2}" && \
 exec dobin "${T}/${2}"

Modified: main/branches/2.1.6/bin/newconfd
===================================================================
--- main/branches/2.1.6/bin/newconfd	2008-11-15 02:23:43 UTC (rev 11916)
+++ main/branches/2.1.6/bin/newconfd	2008-11-15 02:25:05 UTC (rev 11917)
@@ -8,6 +8,11 @@
 	exit 1
 fi
 
+if [ ! -e "$1" ] ; then
+	echo "!!! ${0##*/}: $1 does not exist" 1>&2
+	exit 1
+fi
+
 rm -rf "${T}/${2}" && \
 cp -f "${1}" "${T}/${2}" && \
 exec doconfd "${T}/${2}"

Modified: main/branches/2.1.6/bin/newdoc
===================================================================
--- main/branches/2.1.6/bin/newdoc	2008-11-15 02:23:43 UTC (rev 11916)
+++ main/branches/2.1.6/bin/newdoc	2008-11-15 02:25:05 UTC (rev 11917)
@@ -8,6 +8,11 @@
 	exit 1
 fi
 
+if [ ! -e "$1" ] ; then
+	echo "!!! ${0##*/}: $1 does not exist" 1>&2
+	exit 1
+fi
+
 rm -rf "${T}/${2}" && \
 cp -f "${1}" "${T}/${2}" && \
 exec dodoc "${T}/${2}"

Modified: main/branches/2.1.6/bin/newenvd
===================================================================
--- main/branches/2.1.6/bin/newenvd	2008-11-15 02:23:43 UTC (rev 11916)
+++ main/branches/2.1.6/bin/newenvd	2008-11-15 02:25:05 UTC (rev 11917)
@@ -8,6 +8,11 @@
 	exit 1
 fi
 
+if [ ! -e "$1" ] ; then
+	echo "!!! ${0##*/}: $1 does not exist" 1>&2
+	exit 1
+fi
+
 rm -rf "${T}/${2}" && \
 cp -f "${1}" "${T}/${2}" && \
 exec doenvd "${T}/${2}"

Modified: main/branches/2.1.6/bin/newexe
===================================================================
--- main/branches/2.1.6/bin/newexe	2008-11-15 02:23:43 UTC (rev 11916)
+++ main/branches/2.1.6/bin/newexe	2008-11-15 02:25:05 UTC (rev 11917)
@@ -8,6 +8,11 @@
 	exit 1
 fi
 
+if [ ! -e "$1" ] ; then
+	echo "!!! ${0##*/}: $1 does not exist" 1>&2
+	exit 1
+fi
+
 rm -rf "${T}/${2}" && \
 cp -f "${1}" "${T}/${2}" && \
 exec doexe "${T}/${2}"

Modified: main/branches/2.1.6/bin/newinitd
===================================================================
--- main/branches/2.1.6/bin/newinitd	2008-11-15 02:23:43 UTC (rev 11916)
+++ main/branches/2.1.6/bin/newinitd	2008-11-15 02:25:05 UTC (rev 11917)
@@ -8,6 +8,11 @@
 	exit 1
 fi
 
+if [ ! -e "$1" ] ; then
+	echo "!!! ${0##*/}: $1 does not exist" 1>&2
+	exit 1
+fi
+
 rm -rf "${T}/${2}" && \
 cp -f "${1}" "${T}/${2}" && \
 exec doinitd "${T}/${2}"

Modified: main/branches/2.1.6/bin/newins
===================================================================
--- main/branches/2.1.6/bin/newins	2008-11-15 02:23:43 UTC (rev 11916)
+++ main/branches/2.1.6/bin/newins	2008-11-15 02:25:05 UTC (rev 11917)
@@ -8,6 +8,11 @@
 	exit 1
 fi
 
+if [ ! -e "$1" ] ; then
+	echo "!!! ${0##*/}: $1 does not exist" 1>&2
+	exit 1
+fi
+
 rm -rf "${T}/${2}" || exit $?
 cp -f "${1}" "${T}/${2}" || exit $?
 doins "${T}/${2}"

Modified: main/branches/2.1.6/bin/newlib.a
===================================================================
--- main/branches/2.1.6/bin/newlib.a	2008-11-15 02:23:43 UTC (rev 11916)
+++ main/branches/2.1.6/bin/newlib.a	2008-11-15 02:25:05 UTC (rev 11917)
@@ -8,6 +8,11 @@
 	exit 1
 fi
 
+if [ ! -e "$1" ] ; then
+	echo "!!! ${0##*/}: $1 does not exist" 1>&2
+	exit 1
+fi
+
 rm -rf "${T}/${2}" && \
 cp -f "${1}" "${T}/${2}" && \
 exec dolib.a "${T}/${2}"

Modified: main/branches/2.1.6/bin/newlib.so
===================================================================
--- main/branches/2.1.6/bin/newlib.so	2008-11-15 02:23:43 UTC (rev 11916)
+++ main/branches/2.1.6/bin/newlib.so	2008-11-15 02:25:05 UTC (rev 11917)
@@ -8,6 +8,11 @@
 	exit 1
 fi
 
+if [ ! -e "$1" ] ; then
+	echo "!!! ${0##*/}: $1 does not exist" 1>&2
+	exit 1
+fi
+
 rm -rf "${T}/${2}" && \
 cp -f "${1}" "${T}/${2}" && \
 exec dolib.so "${T}/${2}"

Modified: main/branches/2.1.6/bin/newman
===================================================================
--- main/branches/2.1.6/bin/newman	2008-11-15 02:23:43 UTC (rev 11916)
+++ main/branches/2.1.6/bin/newman	2008-11-15 02:25:05 UTC (rev 11917)
@@ -8,6 +8,11 @@
 	exit 1
 fi
 
+if [ ! -e "$1" ] ; then
+	echo "!!! ${0##*/}: $1 does not exist" 1>&2
+	exit 1
+fi
+
 rm -rf "${T}/${2}" && \
 cp -f "${1}" "${T}/${2}" && \
 exec doman "${T}/${2}"

Modified: main/branches/2.1.6/bin/newsbin
===================================================================
--- main/branches/2.1.6/bin/newsbin	2008-11-15 02:23:43 UTC (rev 11916)
+++ main/branches/2.1.6/bin/newsbin	2008-11-15 02:25:05 UTC (rev 11917)
@@ -8,6 +8,11 @@
 	exit 1
 fi
 
+if [ ! -e "$1" ] ; then
+	echo "!!! ${0##*/}: $1 does not exist" 1>&2
+	exit 1
+fi
+
 rm -rf "${T}/${2}" && \
 cp -f "${1}" "${T}/${2}" && \
 exec dosbin "${T}/${2}"

Modified: main/branches/2.1.6/pym/portage/__init__.py
===================================================================
--- main/branches/2.1.6/pym/portage/__init__.py	2008-11-15 02:23:43 UTC (rev 11916)
+++ main/branches/2.1.6/pym/portage/__init__.py	2008-11-15 02:25:05 UTC (rev 11917)
@@ -4492,6 +4492,9 @@
 	bash_command_not_found = []
 	bash_command_not_found_re = re.compile(
 		r'(.*): line (\d*): (.*): command not found$')
+	helper_missing_file = []
+	helper_missing_file_re = re.compile(
+		r'^!!! (do|new).*: .* does not exist$')
 
 	configure_opts_warn = []
 	configure_opts_warn_re = re.compile(
@@ -4508,6 +4511,9 @@
 			if bash_command_not_found_re.match(line) is not None:
 				bash_command_not_found.append(line.rstrip("\n"))
 
+			if helper_missing_file_re.match(line) is not None:
+				helper_missing_file.append(line.rstrip("\n"))
+
 			if configure_opts_warn_re.match(line) is not None:
 				configure_opts_warn.append(line.rstrip("\n"))
 	finally:
@@ -4544,6 +4550,12 @@
 		msg.extend("\t" + line for line in bash_command_not_found)
 		_eqawarn(msg)
 
+	if helper_missing_file:
+		msg = ["QA Notice: file does not exist:"]
+		msg.append("")
+		msg.extend("\t" + line[4:] for line in helper_missing_file)
+		_eqawarn(msg)
+
 	if configure_opts_warn:
 		msg = ["QA Notice: Unrecognized configure options:"]
 		msg.append("")




^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2008-11-15  2:25 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-11-15  2:25 [gentoo-commits] portage r11917 - in main/branches/2.1.6: bin pym/portage Zac Medico (zmedico)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox