From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 28720138334 for ; Mon, 29 Jul 2019 20:10:36 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id C6951E086F; Mon, 29 Jul 2019 20:10:30 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id AABDDE086F for ; Mon, 29 Jul 2019 20:10:30 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id B98CE348F8A for ; Mon, 29 Jul 2019 20:10:29 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 5E2BB760 for ; Mon, 29 Jul 2019 20:10:25 +0000 (UTC) From: "Thomas Deutschmann" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Thomas Deutschmann" Message-ID: <1564430541.b4a90d77ea10bf9ca993c7b464d4d789535e1577.whissi@gentoo> Subject: [gentoo-commits] proj/genkernel:master commit in: / X-VCS-Repository: proj/genkernel X-VCS-Files: gen_determineargs.sh gen_funcs.sh X-VCS-Directories: / X-VCS-Committer: whissi X-VCS-Committer-Name: Thomas Deutschmann X-VCS-Revision: b4a90d77ea10bf9ca993c7b464d4d789535e1577 X-VCS-Branch: master Date: Mon, 29 Jul 2019 20:10:25 +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-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 019cf782-da2b-44da-9185-ec7bffaca883 X-Archives-Hash: edafbc1d4c7543d0320a7abd7e6ffce3 commit: b4a90d77ea10bf9ca993c7b464d4d789535e1577 Author: Thomas Deutschmann gentoo org> AuthorDate: Mon Jul 29 13:47:45 2019 +0000 Commit: Thomas Deutschmann gentoo org> CommitDate: Mon Jul 29 20:02:21 2019 +0000 URL: https://gitweb.gentoo.org/proj/genkernel.git/commit/?id=b4a90d77 gen_determineargs.sh: determine_real_args(): Don't allow TMPDIR with spaces This just won't work -- many packages like util-linux don't support spaces in builddir path and will fail when applying libtool magic. Signed-off-by: Thomas Deutschmann gentoo.org> gen_determineargs.sh | 7 +++++++ gen_funcs.sh | 16 ++++++++++++++++ 2 files changed, 23 insertions(+) diff --git a/gen_determineargs.sh b/gen_determineargs.sh index b64cdba..9170080 100755 --- a/gen_determineargs.sh +++ b/gen_determineargs.sh @@ -380,6 +380,13 @@ determine_real_args() { dump_debugcache + if isTrue "$(has_space_characters "${TMPDIR}")" + then + # Packages like util-linux will fail to compile when path to + # build dir contains spaces + gen_die "--tmpdir '${TMPDIR}' contains space character(s) which are not supported!" + fi + if [ ! -d "${TMPDIR}" ] then mkdir -p "${TMPDIR}" || gen_die "Failed to create '${TMPDIR}'!" diff --git a/gen_funcs.sh b/gen_funcs.sh index e700ae1..c042513 100755 --- a/gen_funcs.sh +++ b/gen_funcs.sh @@ -209,6 +209,22 @@ can_run_programs_compiled_by_genkernel() { echo "${can_run_programs}" } +has_space_characters() { + [[ ${#} -ne 1 ]] \ + && gen_die "$(get_useful_function_stack "${FUNCNAME}")Invalid usage of ${FUNCNAME}(): Function takes exactly one argument (${#} given)!" + + local testvalue=${1} + local has_space_characters=no + + local space_pattern='[[:space:]]' + if [[ "${testvalue}" =~ ${space_pattern} ]] + then + has_space_characters=yes + fi + + echo "${has_space_characters}" +} + is_gzipped() { [[ ${#} -ne 1 ]] \ && gen_die "$(get_useful_function_stack "${FUNCNAME}")Invalid usage of ${FUNCNAME}(): Function takes exactly one argument (${#} given)!"