From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: <gentoo-commits+bounces-514729-garchives=archives.gentoo.org@lists.gentoo.org> Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 8E320138010 for <garchives@archives.gentoo.org>; Mon, 15 Oct 2012 05:37:46 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 52BB2E04EB; Mon, 15 Oct 2012 05:37:36 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id BC6E9E04EB for <gentoo-commits@lists.gentoo.org>; Mon, 15 Oct 2012 05:37:35 +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 C29CE33C246 for <gentoo-commits@lists.gentoo.org>; Mon, 15 Oct 2012 05:37:34 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by hornbill.gentoo.org (Postfix) with ESMTP id 616C8E5436 for <gentoo-commits@lists.gentoo.org>; Mon, 15 Oct 2012 05:37:33 +0000 (UTC) From: "Robin H. Johnson" <robbat2@gentoo.org> To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Robin H. Johnson" <robbat2@gentoo.org> Message-ID: <1350279445.7fdf3fc01a127b6c3c3ed4cf9c0611c7c1b69f6c.robbat2@gentoo> Subject: [gentoo-commits] proj/genkernel:master commit in: / X-VCS-Repository: proj/genkernel X-VCS-Files: gen_compile.sh gen_package.sh X-VCS-Directories: / X-VCS-Committer: robbat2 X-VCS-Committer-Name: Robin H. Johnson X-VCS-Revision: 7fdf3fc01a127b6c3c3ed4cf9c0611c7c1b69f6c X-VCS-Branch: master Date: Mon, 15 Oct 2012 05:37:33 +0000 (UTC) Precedence: bulk List-Post: <mailto:gentoo-commits@lists.gentoo.org> List-Help: <mailto:gentoo-commits+help@lists.gentoo.org> List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org> List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org> List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org> X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: a4007b4a-dd04-46ce-964f-419731b16a04 X-Archives-Hash: ea2a0414fb5bd9dba31a4a42570358ea commit: 7fdf3fc01a127b6c3c3ed4cf9c0611c7c1b69f6c Author: Robin H. Johnson <robbat2 <AT> gentoo <DOT> org> AuthorDate: Mon Oct 15 05:37:11 2012 +0000 Commit: Robin H. Johnson <robbat2 <AT> gentoo <DOT> org> CommitDate: Mon Oct 15 05:37:25 2012 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/genkernel.git;a=commit;h=7fdf3fc0 Fix corner cases on OUTPUTDIR. If you give the kernel O= with the same dir as the source, it will complain about an unclean tree. Signed-off-by: Robin H. Johnson <robbat2 <AT> gentoo.org> --- gen_compile.sh | 2 +- gen_package.sh | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/gen_compile.sh b/gen_compile.sh index 87fd586..71f5a68 100755 --- a/gen_compile.sh +++ b/gen_compile.sh @@ -25,7 +25,7 @@ compile_kernel_args() { then ARGS="${ARGS} ARCH=\"${KERNEL_ARCH}\"" fi - if [ -n "${KERNEL_OUTPUTDIR}" ] + if [ -n "${KERNEL_OUTPUTDIR}" -a "${KERNEL_OUTPUTDIR}" != "${KERNEL_DIR}" ] then ARGS="${ARGS} O=\"${KERNEL_OUTPUTDIR}\"" fi diff --git a/gen_package.sh b/gen_package.sh index b83ccc1..ed7a5f4 100755 --- a/gen_package.sh +++ b/gen_package.sh @@ -20,7 +20,7 @@ gen_minkernpackage() { then gen_die "Cannot locate kernel binary" fi - cd "${KERNEL_DIR}" + cd "${KERNEL_OUTPUTDIR}" cp "${tmp_kernel_binary}" "${TEMP}/minkernpackage/kernel-${KV}" || gen_die 'Could not the copy kernel for the min kernel package!' cp ".config" "${TEMP}/minkernpackage/config-${ARCH}-${KV}" || gen_die 'Could not the copy kernel config for the min kernel package!' if isTrue "${GENZIMAGE}" @@ -38,7 +38,7 @@ gen_minkernpackage() { then /bin/tar -xj -C ${TEMP}/minkernpackage -f ${KERNCACHE} System.map-${ARCH}-${KV} else - cp "${KERNEL_DIR}/System.map" "${TEMP}/minkernpackage/System.map-${ARCH}-${KV}" || gen_die 'Could not copy System.map for the kernel package!'; + cp "${KERNEL_OUTPUTDIR}/System.map" "${TEMP}/minkernpackage/System.map-${ARCH}-${KV}" || gen_die 'Could not copy System.map for the kernel package!'; fi cd "${TEMP}/minkernpackage" @@ -75,9 +75,9 @@ gen_kerncache() gen_die "Cannot locate kernel binary" fi - cd "${KERNEL_DIR}" + cd "${KERNEL_OUTPUTDIR}" cp "${tmp_kernel_binary}" "${TEMP}/kerncache/kernel-${ARCH}-${KV}" || gen_die 'Could not the copy kernel for the kernel package!' - cp "${KERNEL_DIR}/.config" "${TEMP}/kerncache/config-${ARCH}-${KV}" + cp "${KERNEL_OUTPUTDIR}/.config" "${TEMP}/kerncache/config-${ARCH}-${KV}" if [[ "$(file --brief --mime-type "${KERNEL_CONFIG}")" == application/x-gzip ]]; then # Support --kernel-config=/proc/config.gz, mainly @@ -85,7 +85,7 @@ gen_kerncache() else cp "${KERNEL_CONFIG}" "${TEMP}/kerncache/config-${ARCH}-${KV}.orig" fi - cp "${KERNEL_DIR}/System.map" "${TEMP}/kerncache/System.map-${ARCH}-${KV}" + cp "${KERNEL_OUTPUTDIR}/System.map" "${TEMP}/kerncache/System.map-${ARCH}-${KV}" if isTrue "${GENZIMAGE}" then cp "${tmp_kernel_binary2}" "${TEMP}/kerncache/kernelz-${ARCH}-${KV}" || gen_die "Could not copy the kernelz for the kernel package" @@ -170,7 +170,7 @@ gen_kerncache_is_valid() else if [ -e "${KERNCACHE}" ] then - KERNEL_CONFIG="/${KERNEL_DIR}/.config" + KERNEL_CONFIG="/${KERNEL_OUTPUTDIR}/.config" if [ "${CMD_KERNEL_CONFIG}" != '' ] then KERNEL_CONFIG="${CMD_KERNEL_CONFIG}"