From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.77) (envelope-from ) id 1SnvBb-0007iE-AO for garchives@archives.gentoo.org; Sun, 08 Jul 2012 17:22:19 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 605F5E0123; Sun, 8 Jul 2012 17:22:02 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 1D39EE0123 for ; Sun, 8 Jul 2012 17:22:02 +0000 (UTC) Received: from hornbill.gentoo.org (hornbill.gentoo.org [94.100.119.163]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 6130C1B400A for ; Sun, 8 Jul 2012 17:22:01 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by hornbill.gentoo.org (Postfix) with ESMTP id 170BBE5433 for ; Sun, 8 Jul 2012 17:22:00 +0000 (UTC) From: "Sebastian Pipping" To: gentoo-commits@lists.gentoo.org Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sebastian Pipping" Message-ID: <1341767830.0db56cdc9d5166abaaaf0b23406cf06d775e2bca.sping@gentoo> Subject: [gentoo-commits] proj/genkernel:master commit in: / X-VCS-Repository: proj/genkernel X-VCS-Files: ChangeLog gen_configkernel.sh gen_package.sh X-VCS-Directories: / X-VCS-Committer: sping X-VCS-Committer-Name: Sebastian Pipping X-VCS-Revision: 0db56cdc9d5166abaaaf0b23406cf06d775e2bca X-VCS-Branch: master Date: Sun, 8 Jul 2012 17:22: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 Content-Transfer-Encoding: quoted-printable X-Archives-Salt: b6050cf1-cd1b-453e-91ce-19c061ce2f20 X-Archives-Hash: 9e040a79ff92b92d9a2aff856608ba50 commit: 0db56cdc9d5166abaaaf0b23406cf06d775e2bca Author: Sebastian Pipping pipping org> AuthorDate: Sun Jul 1 12:03:51 2012 +0000 Commit: Sebastian Pipping gentoo org> CommitDate: Sun Jul 8 17:17:10 2012 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/genkernel.git= ;a=3Dcommit;h=3D0db56cdc Support --kernel-config=3D/proc/config.gz (bug #421027) --- ChangeLog | 4 ++++ gen_configkernel.sh | 8 +++++++- gen_package.sh | 19 +++++++++++++++++-- 3 files changed, 28 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 7d5ad59..7b90ca8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -5,6 +5,10 @@ # Distributed under the GPL v2 # $Id$ =20 + 01 Jul 2012; Sebastian Pipping gen_configkernel.sh, + gen_package.sh: + Support --kernel-config=3D/proc/config.gz (bug #421027) + 11 Jun 2012; Sebastian Pipping genkernel: Bump version to 3.4.36 =20 diff --git a/gen_configkernel.sh b/gen_configkernel.sh index 5d619fa..b0837dd 100755 --- a/gen_configkernel.sh +++ b/gen_configkernel.sh @@ -56,7 +56,13 @@ config_kernel() { # or we might remove configurations someone is trying to test. if isTrue "${MRPROPER}" || [ ! -f "${KERNEL_DIR}/.config" ] then - cp "${KERNEL_CONFIG}" "${KERNEL_DIR}/.config" || gen_die 'Could not co= py configuration file!' + local message=3D'Could not copy configuration file!' + if [[ "$(file --brief --mime-type "${KERNEL_CONFIG}")" =3D=3D applicat= ion/x-gzip ]]; then + # Support --kernel-config=3D/proc/config.gz, mainly + zcat "${KERNEL_CONFIG}" > "${KERNEL_DIR}/.config" || gen_die "${messa= ge}" + else + cp "${KERNEL_CONFIG}" "${KERNEL_DIR}/.config" || gen_die "${message}" + fi fi =20 if isTrue "${OLDCONFIG}" diff --git a/gen_package.sh b/gen_package.sh index e7c6142..b83ccc1 100755 --- a/gen_package.sh +++ b/gen_package.sh @@ -78,7 +78,13 @@ gen_kerncache() cd "${KERNEL_DIR}" cp "${tmp_kernel_binary}" "${TEMP}/kerncache/kernel-${ARCH}-${KV}" || g= en_die 'Could not the copy kernel for the kernel package!' cp "${KERNEL_DIR}/.config" "${TEMP}/kerncache/config-${ARCH}-${KV}" - cp "${KERNEL_CONFIG}" "${TEMP}/kerncache/config-${ARCH}-${KV}.orig" + + if [[ "$(file --brief --mime-type "${KERNEL_CONFIG}")" =3D=3D applicati= on/x-gzip ]]; then + # Support --kernel-config=3D/proc/config.gz, mainly + zcat "${KERNEL_CONFIG}" > "${TEMP}/kerncache/config-${ARCH}-${KV}.orig= " + else + cp "${KERNEL_CONFIG}" "${TEMP}/kerncache/config-${ARCH}-${KV}.orig" + fi cp "${KERNEL_DIR}/System.map" "${TEMP}/kerncache/System.map-${ARCH}-${K= V}" if isTrue "${GENZIMAGE}" then @@ -180,7 +186,16 @@ gen_kerncache_is_valid() else test1=3D$(grep -v "^#" ${TEMP}/config-${ARCH}-${KV} | md5sum | cut = -d " " -f 1) fi - test2=3D$(grep -v "^#" ${KERNEL_CONFIG} | md5sum | cut -d " " -f 1) + + if [[ "$(file --brief --mime-type "${KERNEL_CONFIG}")" =3D=3D applic= ation/x-gzip ]]; then + # Support --kernel-config=3D/proc/config.gz, mainly + local CONFGREP=3Dzgrep + else + local CONFGREP=3Dgrep + fi + test2=3D$("${CONFGREP}" -v "^#" ${KERNEL_CONFIG} | md5sum | cut -d "= " -f 1) + + if [ "${test1}" =3D=3D "${test2}" ] then echo