public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Michal Gorny (mgorny)" <mgorny@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] gentoo-x86 commit in eclass: ChangeLog autotools-multilib.eclass multilib-build.eclass
Date: Sun, 10 Feb 2013 11:44:00 +0000 (UTC)	[thread overview]
Message-ID: <20130210114400.72DF42171D@flycatcher.gentoo.org> (raw)

mgorny      13/02/10 11:44:00

  Modified:             ChangeLog autotools-multilib.eclass
                        multilib-build.eclass
  Log:
  Move header checking function into multilib-build for wider reuse.

Revision  Changes    Path
1.671                eclass/ChangeLog

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.671&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.671&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?r1=1.670&r2=1.671

Index: ChangeLog
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v
retrieving revision 1.670
retrieving revision 1.671
diff -u -r1.670 -r1.671
--- ChangeLog	10 Feb 2013 11:42:48 -0000	1.670
+++ ChangeLog	10 Feb 2013 11:44:00 -0000	1.671
@@ -1,6 +1,10 @@
 # ChangeLog for eclass directory
 # Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.670 2013/02/10 11:42:48 mgorny Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.671 2013/02/10 11:44:00 mgorny Exp $
+
+  10 Feb 2013; Michał Górny <mgorny@gentoo.org> autotools-multilib.eclass,
+  multilib-build.eclass:
+  Move header checking function into multilib-build for wider reuse.
 
   10 Feb 2013; Michał Górny <mgorny@gentoo.org> eutils.eclass:
   QA-warn if epunt_cxx does not find any checks to punt.



1.9                  eclass/autotools-multilib.eclass

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/autotools-multilib.eclass?rev=1.9&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/autotools-multilib.eclass?rev=1.9&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/autotools-multilib.eclass?r1=1.8&r2=1.9

Index: autotools-multilib.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/autotools-multilib.eclass,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- autotools-multilib.eclass	1 Feb 2013 21:39:50 -0000	1.8
+++ autotools-multilib.eclass	10 Feb 2013 11:44:00 -0000	1.9
@@ -1,6 +1,6 @@
 # Copyright 1999-2013 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/autotools-multilib.eclass,v 1.8 2013/02/01 21:39:50 mgorny Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/autotools-multilib.eclass,v 1.9 2013/02/10 11:44:00 mgorny Exp $
 
 # @ECLASS: autotools-multilib.eclass
 # @MAINTAINER:
@@ -50,34 +50,7 @@
 		autotools-utils_src_install
 
 		# Make sure all headers are the same for each ABI.
-		autotools-multilib_cksum() {
-			find "${ED}"usr/include -type f \
-				-exec cksum {} + | sort -k2
-		}
-
-		local cksum=$(autotools-multilib_cksum)
-		local cksum_file=${T}/.autotools-multilib_cksum
-
-		if [[ -f ${cksum_file} ]]; then
-			local cksum_prev=$(< "${cksum_file}")
-
-			if [[ ${cksum} != ${cksum_prev} ]]; then
-				echo "${cksum}" > "${cksum_file}.new"
-
-				eerror "Header files have changed between ABIs."
-
-				if type -p diff &>/dev/null; then
-					eerror "$(diff -du "${cksum_file}" "${cksum_file}.new")"
-				else
-					eerror "Old checksums in: ${cksum_file}"
-					eerror "New checksums in: ${cksum_file}.new"
-				fi
-
-				die "Header checksum mismatch, aborting."
-			fi
-		else
-			echo "${cksum}" > "${cksum_file}"
-		fi
+		multilib_check_headers
 	}
 
 	multilib_foreach_abi autotools-multilib_secure_install



1.2                  eclass/multilib-build.eclass

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/multilib-build.eclass?rev=1.2&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/multilib-build.eclass?rev=1.2&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/multilib-build.eclass?r1=1.1&r2=1.2

Index: multilib-build.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/multilib-build.eclass,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- multilib-build.eclass	1 Feb 2013 21:39:50 -0000	1.1
+++ multilib-build.eclass	10 Feb 2013 11:44:00 -0000	1.2
@@ -1,6 +1,6 @@
 # Copyright 1999-2013 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/multilib-build.eclass,v 1.1 2013/02/01 21:39:50 mgorny Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/multilib-build.eclass,v 1.2 2013/02/10 11:44:00 mgorny Exp $
 
 # @ECLASS: multilib-build.eclass
 # @MAINTAINER:
@@ -137,5 +137,43 @@
 	multijob_finish
 }
 
+# @FUNCTION: multilib_check_headers
+# @DESCRIPTION:
+# Check whether the header files are consistent between ABIs.
+#
+# This function needs to be called after each ABI's installation phase.
+# It obtains the header file checksums and compares them with previous
+# runs (if any). Dies if header files differ.
+multilib_check_headers() {
+	_multilib_header_cksum() {
+		find "${ED}"usr/include -type f \
+			-exec cksum {} + | sort -k2
+	}
+
+	local cksum=$(_multilib_header_cksum)
+	local cksum_file=${T}/.multilib_header_cksum
+
+	if [[ -f ${cksum_file} ]]; then
+		local cksum_prev=$(< "${cksum_file}")
+
+		if [[ ${cksum} != ${cksum_prev} ]]; then
+			echo "${cksum}" > "${cksum_file}.new"
+
+			eerror "Header files have changed between ABIs."
+
+			if type -p diff &>/dev/null; then
+				eerror "$(diff -du "${cksum_file}" "${cksum_file}.new")"
+			else
+				eerror "Old checksums in: ${cksum_file}"
+				eerror "New checksums in: ${cksum_file}.new"
+			fi
+
+			die "Header checksum mismatch, aborting."
+		fi
+	else
+		echo "${cksum}" > "${cksum_file}"
+	fi
+}
+
 _MULTILIB_BUILD=1
 fi





             reply	other threads:[~2013-02-10 11:44 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-10 11:44 Michal Gorny (mgorny) [this message]
  -- strict thread matches above, loose matches on Subject: below --
2013-05-14 17:33 [gentoo-commits] gentoo-x86 commit in eclass: ChangeLog autotools-multilib.eclass multilib-build.eclass Michal Gorny (mgorny)
2013-02-01 21:39 Michal Gorny (mgorny)

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130210114400.72DF42171D@flycatcher.gentoo.org \
    --to=mgorny@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox