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.60) (envelope-from ) id 1RKiyv-0005mn-VN for garchives@archives.gentoo.org; Mon, 31 Oct 2011 03:56:18 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 91DAA21C040 for ; Mon, 31 Oct 2011 03:56:17 +0000 (UTC) Received: from mail.pnpitalia.it (85-18-21-122.ip.fastwebnet.it [85.18.21.122]) by robin.gentoo.org (8.13.5/8.13.5) with ESMTP id j92KvLkv029186 for ; Sun, 2 Oct 2005 20:57:21 GMT Received: from localhost (localhost [127.0.0.1]) by mail.pnpitalia.it (Postfix) with ESMTP id 9E63D7AD700 for ; Sun, 2 Oct 2005 23:05:19 +0200 (CEST) Received: from mail.pnpitalia.it ([127.0.0.1]) by localhost (db [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 16673-04 for ; Sun, 2 Oct 2005 23:05:19 +0200 (CEST) Received: from [192.168.4.153] (host-4-153.pnpitalia.it [192.168.4.153]) by mail.pnpitalia.it (Postfix) with ESMTP id 21B4B7AD6FF for ; Sun, 2 Oct 2005 23:05:19 +0200 (CEST) Message-ID: <43404C01.4070309@gentoo.org> Date: Sun, 02 Oct 2005 23:07:13 +0200 From: Francesco R User-Agent: Mozilla Thunderbird 1.0.6 (Windows/20050716) X-Accept-Language: en-us, en Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@gentoo.org Reply-to: gentoo-dev@lists.gentoo.org MIME-Version: 1.0 To: gentoo-dev@lists.gentoo.org Subject: [gentoo-dev] lights on internals X-Enigmail-Version: 0.92.1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Scanned: amavisd-new at db X-Archives-Salt: df37978f-284a-4965-b8f4-fef92c7c539e X-Archives-Hash: e4d731797af3bb137dc5a4f76b207484 The ready to cut ebuild at the bottom print it's environment (variable and functions) to a bunch of files into /var/tmp/fakebuild/. May be useful for who want to have a look at "what" and "when" is avaible during the various emerge phases (but not limited to). usage: # env -i \ PORTDIR_OVERLAY=/the/path/ \ fakebuild_progr=100 \ ebuild fakebuild-1.ebuild digest # env -i \ fakebuild_progr=200 \ PORTDIR_OVERLAY=/the/path/ \ emerge --buildpkgonly =fakebuild-1 hint: try also the following: - remove the egrep, sort after "typeset" to have also the sorce code of the functions - remove "{pkg,src}*" functions (after the previous step) to have a look at the predefined functions. --- app-misc/fakebuild -- # Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ DESCRIPTION="fake ebuild to test environment" HOMEPAGE="http://dev.gentoo.org/~vivo/" SRC_URI="" LICENSE="GPL-2" SLOT="0" KEYWORDS="~x86" print_env() { local fakebuild_output_dir="/var/tmp/fakebuild" mkdir -p "${fakebuild_output_dir}" || die [[ -z "${fakebuild_progr}" ]] && fakebuild_progr=100 fakebuild_progr=$(( $fakebuild_progr +1 )) export fakebuild_progr local fakebuild_ext="${1}.${fakebuild_progr}" # not sorting, break multiline vars einfo "${fakebuild_output_dir}/env_${fakebuild_ext}" env \ &> "${fakebuild_output_dir}/env_${fakebuild_ext}" # Remove egrep and sort to see the source of every fx einfo "${fakebuild_output_dir}/fxlist_${fakebuild_ext}" typeset \ | egrep '^\b.* \(\)' \ | sort \ &> "${fakebuild_output_dir}/fxlist_${fakebuild_ext}" } print_env "global_scope" pkg_setup() { print_env "pkg_setup" ; } src_unpack() { print_env "src_unpack" ; } src_compile() { print_env "src_compile" ; } src_test() { print_env "src_test" ; } src_install() { print_env "src_install" ; } pkg_preinst() { print_env "pkg_preinst" ; } pkg_postinst() { print_env "pkg_postinst" ; } --- app-misc/fakebuild -- -- ________ ___ _ _ ____ _____ ___ ____ ____ ___ / ___/_ \_ \/ \ / / ___/ ___/ _ / ___/ _ \ /_ \ / __/ _/__ / \ \/ / /__/ _/_ _\ \/ /__/ / / / / _/ /_/ /_/\_\/_/_/_/ \__/\___/____//___ \___/\____/ / /\_\o Simultaneous breaking of databases and backups since '90s. World wide since 2005.0 -- gentoo-dev@gentoo.org mailing list