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 1MYF35-0002lw-2m for garchives@archives.gentoo.org; Tue, 04 Aug 2009 08:07:07 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 1BDEBE0465; Tue, 4 Aug 2009 08:07:06 +0000 (UTC) Received: from mail-ew0-f210.google.com (mail-ew0-f210.google.com [209.85.219.210]) by pigeon.gentoo.org (Postfix) with ESMTP id C4742E0465 for ; Tue, 4 Aug 2009 08:07:05 +0000 (UTC) Received: by ewy6 with SMTP id 6so373750ewy.34 for ; Tue, 04 Aug 2009 01:07:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:subject:date :user-agent:references:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:message-id; bh=px6X3//G2ZY0Uq1ZtYIkhcxaJn9h6lIJ4WGpZ2LzJ3M=; b=q+CmIs5tIr5e0y9Ss+QLvZWDXh5meqG4qb7Hkf0AU9xWaPIWX+UTRjvHWXj50FyFD7 oeFKA/4jN6JEm8SqVepN5O1tMNgpVcRA7If41waHe2K+6d9zcvh1iamVRlwfi0FPifBE /VJY47buqtCV8SnTlXLv6oqwc6exLW9Velt+Y= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:subject:date:user-agent:references:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :message-id; b=hz9GoeRCENL6wjszLPVn074EmgPbQn53A0szBa4F7YH98hnfUzMdVTOZaEZEXLotbl uky2QQsNchPQ5wr3zIEZXQaJuHMexh53uznq2TXZ2FHM+gWWvRSQk6NuxHJGfRiZWkuJ frOmvk8yH5QxsNhKW1VTbR43ZQS85h98t2dcM= Received: by 10.210.57.3 with SMTP id f3mr1525651eba.94.1249373225242; Tue, 04 Aug 2009 01:07:05 -0700 (PDT) Received: from nazgul.localnet ([196.210.202.145]) by mx.google.com with ESMTPS id 7sm2429741eyg.45.2009.08.04.01.07.03 (version=SSLv3 cipher=RC4-MD5); Tue, 04 Aug 2009 01:07:04 -0700 (PDT) From: Alan McKinnon To: gentoo-user@lists.gentoo.org Subject: Re: [gentoo-user] bash stopped running python scripts... Date: Tue, 4 Aug 2009 10:05:45 +0200 User-Agent: KMail/1.11.4 (Linux/2.6.30-gentoo-r4; KDE/4.2.4; x86_64; ; ) References: <4A774F13.1060307@kutulu.org> <200908032348.05377.alan.mckinnon@gmail.com> <4A775FF0.503@kutulu.org> In-Reply-To: <4A775FF0.503@kutulu.org> 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 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200908041005.45470.alan.mckinnon@gmail.com> X-Archives-Salt: 96b8270e-444e-441f-be79-95e01a829ac4 X-Archives-Hash: 16e1f412fe4088ec77dc71799c850486 On Tuesday 04 August 2009 00:08:48 Mike Edenfield wrote: > > I have the identical file, it works here. > > That's very odd, as everything I've read over the past hour indicates > that it's not supposed to work if you put a shell script in that line, > but that's clearly not always true. I didn't diff it, just compared yours and mine visually > What's the #! line in your /usr/bin/emerge file? $ head /usr/bin/emerge #!/usr/bin/python # Copyright 2006-2009 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Id: emerge 13131 2009-03-18 01:43:41Z zmedico $ import sys # This block ensures that ^C interrupts are handled quietly. try: import signal > > > Your original post has a "X connection to localhost:11.0 broken" error, > > which is mighty unusual. The error is common enough, but has nothing to > > do with python. > > I know where that particular error is coming from. The first > non-comment line in /usr/bin/emerge is "import sys". Since bash is > interpreting the script instead of python, when it gets to that line, it > runs ImageMagick's "import" command. It just indicates that bash > ignored the #! line and kept going. Ah, now stuff makes sense, like your reference to ImageMagick > The bug Remy sent me to did have two working solutions: replacing the > shell script with a symlink, or replacing "#!/usr/bin/python" with > "#!/usr/bin/env python" in emerge/ebuild, both of which point the #! > line at a real executable. I'm now curious why that shell script works > for anyone. -- alan dot mckinnon at gmail dot com