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 14F35138247 for ; Tue, 14 Jan 2014 19:03:56 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 16997E09EA; Tue, 14 Jan 2014 19:03:50 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id D7BF7E09C4 for ; Tue, 14 Jan 2014 19:03:48 +0000 (UTC) Received: from mail-ie0-f181.google.com (mail-ie0-f181.google.com [209.85.223.181]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: floppym) by smtp.gentoo.org (Postfix) with ESMTPSA id BF50233EE7F for ; Tue, 14 Jan 2014 19:03:47 +0000 (UTC) Received: by mail-ie0-f181.google.com with SMTP id at1so876685iec.26 for ; Tue, 14 Jan 2014 11:03:46 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=Qt5/enMWROleEMtnLKsjHfseCVhAPSpdC9VRJ3JBoZk=; b=YthMu1xihqQdQzFm9NQWmrM3XCfx8kIH60rjzLMwb3hUGtTFCefR+oJ1wQLIomU+pJ f/kBvUduE4+WaZILYiJfHoUGBMxqJE/1ZhrQPc2PsfJN7DIQIVFLh0McO/jIpgIixRYW BwVssNA6MYBbbM1ytDXXBvMFKeCcz222SBs3MzcLoay4749/q/gtv1aS81RjAbxyFfgw OG6/ngg/IJYSnKf2u+yw6fmGIUV3KJ32g7cHiJ1kOJa55ot9r6+BtrbYmobmkUtjiMdL C+v449cdaNAyBNKSNr0TFpGMomiD4CijAJh43MTyOj0YAAYKiTuGx3CdIo49ijjPoMdn J+FA== Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org MIME-Version: 1.0 X-Received: by 10.43.153.138 with SMTP id la10mr78128icc.10.1389726226252; Tue, 14 Jan 2014 11:03:46 -0800 (PST) Received: by 10.64.86.167 with HTTP; Tue, 14 Jan 2014 11:03:46 -0800 (PST) In-Reply-To: References: Date: Tue, 14 Jan 2014 14:03:46 -0500 Message-ID: Subject: Re: [gentoo-user] How to Set Environment Variables in Ebuilds From: Mike Gilbert To: gentoo-user@lists.gentoo.org Content-Type: text/plain; charset=UTF-8 X-Archives-Salt: ee9902c4-58e8-4e5d-b114-9f6067dbcd9e X-Archives-Hash: 5c63c0f605e7eb240567509f40057b2d On Mon, Jan 13, 2014 at 10:27 PM, Masanori Ogino wrote: > Hello. > > I wrote an ebuild and it executes a small Python script bundled in the > source. The Python script requires a environment variable to be set. > > I tried something like: > > NAME=value ${ECONF_SOURCE:-.}/script_file.py > > and > > export NAME=value > ${ECONF_SOURCE:-.}/script_file.py > > but the both fail to pass the parameter via the environment variable to the > script. > > How can I do it? Please point it out if I overlooked something. > Either of the method you listed about should work. Are you sure the script is looking for an environment variable?