From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id B1E15138968 for ; Sun, 10 Feb 2013 11:44:03 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 3E9B921C099; Sun, 10 Feb 2013 11:44:03 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id BD30C21C099 for ; Sun, 10 Feb 2013 11:44:02 +0000 (UTC) Received: from flycatcher.gentoo.org (flycatcher.gentoo.org [81.93.255.6]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id A97A733E4A1 for ; Sun, 10 Feb 2013 11:44:01 +0000 (UTC) Received: by flycatcher.gentoo.org (Postfix, from userid 2279) id 72DF42171D; Sun, 10 Feb 2013 11:44:00 +0000 (UTC) From: "Michal Gorny (mgorny)" To: gentoo-commits@lists.gentoo.org Reply-To: gentoo-dev@lists.gentoo.org, mgorny@gentoo.org Subject: [gentoo-commits] gentoo-x86 commit in eclass: ChangeLog autotools-multilib.eclass multilib-build.eclass X-VCS-Repository: gentoo-x86 X-VCS-Files: ChangeLog autotools-multilib.eclass multilib-build.eclass X-VCS-Directories: eclass X-VCS-Committer: mgorny X-VCS-Committer-Name: Michal Gorny Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Message-Id: <20130210114400.72DF42171D@flycatcher.gentoo.org> Date: Sun, 10 Feb 2013 11:44:00 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 1782bd99-8d8e-4870-820c-c7b927b36069 X-Archives-Hash: ee90e9a36e21095592935137140c2346 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 autotools-multilib.eclass, + multilib-build.eclass: + Move header checking function into multilib-build for wider reuse. 10 Feb 2013; Michał Górny 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