From patchwork Fri Oct 26 12:42:32 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johannes Stezenbach X-Patchwork-Id: 194466 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id 7966B2C009A for ; Fri, 26 Oct 2012 23:42:50 +1100 (EST) Comment: DKIM? See http://www.dkim.org DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=sourceware.org; s=default; x=1351860171; h=Comment: DomainKey-Signature:Received:Received:Received:Received:Received: Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To:User-Agent: Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Subscribe: List-Archive:List-Post:List-Help:Sender:Delivered-To; bh=/W7ZGhM 98nMeQMFQT0gOhJy76qo=; b=k9zBIvrueVvKnSp+EoPluRNxU0bLhTUGpYQhk7a 81KKS7SrF+nv3lrf0w5LBDjMdIY/D/lw1fA7RIR+CYNdRa2LGxrvcLh0E+AzHn9y oJIIjRkE0ugGcnwAAHD1L3hov1hwSfrhcuRVcihHlvAumtxQPgV1B7lcV1kYemHL yCRk= Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=default; d=sourceware.org; h=Received:Received:X-SWARE-Spam-Status:X-Spam-Check-By:Received:Received:Received:Date:From:To:Cc:Subject:Message-ID:References:MIME-Version:Content-Type:Content-Disposition:In-Reply-To:User-Agent:X-Spam-21-Score:X-Spam-21-Report:X-IsSubscribed:Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Subscribe:List-Archive:List-Post:List-Help:Sender:Delivered-To; b=iCd9AVDaNaZMnOy3LcpcgOi5ZQORSg9r2roOhU9nQCBmGvdE6Y8vmVAVckUb2u bRpwmL4dQ0N8JcVZgY3UDtc1okl5J1S9nTHcasXqH5EhLwWiFUU802YRpFKypiII S0a8utSne0Qayn39oq6nK8le1fbauXByrgq0V4NpWFz+s=; Received: (qmail 323 invoked by alias); 26 Oct 2012 12:42:45 -0000 Received: (qmail 312 invoked by uid 22791); 26 Oct 2012 12:42:43 -0000 X-SWARE-Spam-Status: No, hits=-2.3 required=5.0 tests=AWL, BAYES_00, RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from bar.sig21.net (HELO bar.sig21.net) (80.81.252.164) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 26 Oct 2012 12:42:36 +0000 Received: from p5099b351.dip0.t-ipconnect.de ([80.153.179.81] helo=zzz.local) by bar.sig21.net with esmtpsa (TLS1.0:RSA_ARCFOUR_SHA1:16) (Exim 4.72) (envelope-from ) id 1TRjFB-0002QA-Cu; Fri, 26 Oct 2012 14:42:34 +0200 Received: from js by zzz.local with local (Exim 4.80) (envelope-from ) id 1TRjFA-0004SA-LD; Fri, 26 Oct 2012 14:42:32 +0200 Date: Fri, 26 Oct 2012 14:42:32 +0200 From: Johannes Stezenbach To: "Yann E. MORIN" Cc: crossgcc@sourceware.org Subject: Re: [PATCH 0 of 1] Alternative debug-shell implementation Message-ID: <20121026124232.GB27584@sig21.net> References: <20121015153110.GA31836@sig21.net> <201210162053.29191.yann.morin.1998@free.fr> <20121017101521.GA24940@sig21.net> <201210171338.38792.yann.morin.1998@free.fr> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <201210171338.38792.yann.morin.1998@free.fr> User-Agent: Mutt/1.5.21 (2010-09-15) X-Spam-21-Score: -2.9 (--) X-Spam-21-Report: No, score=-2.9 required=8.0 tests=ALL_TRUSTED=-1, BAYES_00=-1.9 autolearn=ham X-IsSubscribed: yes Mailing-List: contact crossgcc-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: crossgcc-owner@sourceware.org Delivered-To: mailing list crossgcc@sourceware.org Hi Yann, On Wed, Oct 17, 2012 at 01:38:38PM +0200, Yann E. MORIN wrote: > On Wednesday 17 October 2012 12:15:21 Johannes Stezenbach wrote: > > > > On Mon, Oct 15, 2012 at 09:53:55PM +0200, Yann E. MORIN wrote: > > > > > Here is an alternate implementation of debug-shell, that I was working on > > > > > following your previous submission. > > > My patch had this test: > > > > + if [ -t 0 -a -t 6 -a -t 2 ]; then > > + ... > > + else > > + CT_DoLog WARN "CT_DEBUG_CT_FIXUP_SHELL disabled due to I/O redirection" > > + fi > > > > I haven't tested what happens if you run "c-ng build |& tee log" and > > then try to run an interactive shell, but I guess it can't work? > > Right, I'll see what I can do to add ths check. I just ran into an endless loop with today's ct-ng, which was caused by a patch failing to apply in CT_Patch. The problem is that the failed command uses stdin redirection. [INFO ] Extracting and patching toolchain components [EXTRA] Extracting 'eglibc-2_16' [EXTRA] Patching 'eglibc-2_16' [ERROR] [ERROR] >> [ERROR] >> Build failed in step 'Extracting and patching toolchain components' [ERROR] >> called in step '(top-level)' [ERROR] >> [ERROR] >> Error happened in: CT_DoExecLog[scripts/functions@257] [ERROR] >> called from: CT_Patch[scripts/functions@1054] [ERROR] >> called from: do_libc_extract[scripts/build/libc/glibc-eglibc.sh-common@10] [ERROR] >> called from: main[scripts/crosstool-NG.sh@580] Current command: 'patch' '--no-backup-if-mismatch' '-g0' '-F1' '-p1' '-f' exited with error code: 1 Please fix it up and finish by exiting the shell with one of these values: 1 fixed, continue with next build command 2 repeat this build command 3 abort build ct-ng:~/toolchain/eglibc/build/.build/src/eglibc-2_16> exit Please exit with one of these values: (... repeat ...) The easiest fix for this particular case would be to use "patch -i patch" instead of "patch &6 + exec >&6 2>&7 <&8 printf "\r \n\nCurrent command" if [ -n "${cur_cmd}" ]; then printf ":\n %s\n" "${cur_cmd}" @@ -131,7 +131,7 @@ set +o hashall # Log policy: # - first of all, save stdout so we can see the live logs: fd #6 -exec 6>&1 +exec 6>&1 7>&2 8<&0 # - then point stdout to the log file tmp_log_file="${CT_TOP_DIR}/build.log" rm -f "${tmp_log_file}"