From owner-freebsd-ports@FreeBSD.ORG Tue Apr 30 17:46:38 2013 Return-Path: Delivered-To: ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id C22F89EC for ; Tue, 30 Apr 2013 17:46:38 +0000 (UTC) (envelope-from lists@eitanadler.com) Received: from mail-pa0-f51.google.com (mail-pa0-f51.google.com [209.85.220.51]) by mx1.freebsd.org (Postfix) with ESMTP id 9D1921094 for ; Tue, 30 Apr 2013 17:46:38 +0000 (UTC) Received: by mail-pa0-f51.google.com with SMTP id lj1so471721pab.24 for ; Tue, 30 Apr 2013 10:46:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=eitanadler.com; s=0xdeadbeef; h=x-received:mime-version:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; bh=IjFjtI8wndYQaOWXICXNAAKefN7BcNXblAIUw1X4T9E=; b=GAetnIXLUs+F0XA9jxOWkXOYbDY3Wdbjr29RjxWu4SyQepUAhIC9ySuhISEtdi4cWA GGgvGpOfU3zF+F61U1IB/AkK8x1PXMQTdBn/yVDdONhYyWzWC+dOMr1cULwg+53PazrZ lcfamHK1b+s2cWPyYsMeNb2zrFSbrh/aQP9PI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:mime-version:in-reply-to:references:from:date:message-id :subject:to:cc:content-type:x-gm-message-state; bh=IjFjtI8wndYQaOWXICXNAAKefN7BcNXblAIUw1X4T9E=; b=BXROxdMWp2N2X9O7WSv8oxpMwObOYuHz879IjOpdRBRrQQANUY014rI60EtcezJuCD 9xpGs7QGdmpSPEkf3aN3Fd+mZF5dZXuN4iRZBqbZd+BoMKi1+owPDZpAAms9zMdeNtqu CJkk6Qo/gvX4i/FmkC41pDybXhaae6J0WERBV+8Pjd9N1BkUzFkJkWg2PyyU2AUaNlkG 85GgCcQ5wW0YW2Y4JYTeBajMffc3ml3jQZZpnDDLH15o9gU6SpSMX/QM2EA30QZXZpDh ceVl4Gr8v5vo5LQnoXSi3wFG8OAmoH1QZU84r3yCgN1kLRtdxCJTkxksuDsp1l+ZBtps 519A== X-Received: by 10.68.36.230 with SMTP id t6mr78556367pbj.218.1367343997636; Tue, 30 Apr 2013 10:46:37 -0700 (PDT) MIME-Version: 1.0 Received: by 10.66.159.97 with HTTP; Tue, 30 Apr 2013 10:46:07 -0700 (PDT) In-Reply-To: <20130430174130.GQ3577@ithaqua.etoilebsd.net> References: <20130430103821.GJ3577@ithaqua.etoilebsd.net> <20130430173500.GP3577@ithaqua.etoilebsd.net> <20130430174130.GQ3577@ithaqua.etoilebsd.net> From: Eitan Adler Date: Tue, 30 Apr 2013 13:46:07 -0400 Message-ID: Subject: Re: [BRAINSTORM] shebang fixing framework To: Baptiste Daroussin Content-Type: text/plain; charset=UTF-8 X-Gm-Message-State: ALoCoQm+z0/3U17xc0l+CSYM6kQRR5zzmTiDqfCjwY0D/qqy//rs0YySUXfPWwf256ceEPNU1lsN Cc: ports@freebsd.org X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Apr 2013 17:46:38 -0000 On 30 April 2013 13:41, Baptiste Daroussin wrote: > On Tue, Apr 30, 2013 at 01:38:03PM -0400, Eitan Adler wrote: >> On 30 April 2013 13:35, Baptiste Daroussin wrote: >> > All of this will be damn slow operations, we want to keep this as fast as >> > possible, even if per-ports it seems quite fast, when you are about the build >> > the whole ports tree few seconds there and there will become hours >> >> Yes, that is why I ended with "I guess it isn't too bad.", although I >> guess it wasn't clear I meant needing lang_FILES. >> >> I'd prefer shebangfix_FILES and have all the language fixes apply >> without needing to specify which one. > > most of the case you will know what file needs what shebang, so why trying all > possible case when you can get it directly? If applied as a regex it doesn't really matter. I'm thinking it will look something like sed -e regex_for_perl \ -e regex_for_python \ -e regex_for_php \ ${shebangfix_FILES} or some variant thereof now that I think about it a bit more it may even be faster than forking once per language. -- Eitan Adler