From owner-freebsd-ports@freebsd.org Fri Nov 20 17:50:14 2015 Return-Path: Delivered-To: freebsd-ports@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CC46CA33D86; Fri, 20 Nov 2015 17:50:14 +0000 (UTC) (envelope-from mailinglists@toco-domains.de) Received: from toco-domains.de (mail.toco-domains.de [IPv6:2a01:4f8:150:50a5::6]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8F37D1DB9; Fri, 20 Nov 2015 17:50:14 +0000 (UTC) (envelope-from mailinglists@toco-domains.de) Received: from [192.168.0.120] (port-212-202-156-99.static.qsc.de [212.202.156.99]) by toco-domains.de (Postfix) with ESMTPA id 8138E1B22035; Fri, 20 Nov 2015 18:50:03 +0100 (CET) Subject: Re: Call for Help: need script for patching ports tree, building with poudriere To: Ricky G , Craig Rodrigues References: Cc: "freebsd-testing@freebsd.org" , "freebsd-ports@freebsd.org" From: =?UTF-8?Q?Torsten_Z=c3=bchlsdorff?= Message-ID: <564EDE98.9070508@toco-domains.de> Date: Fri, 20 Nov 2015 09:49:28 +0100 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Nov 2015 17:50:14 -0000 Hello Ricky, > Hello, Decided to not add a config file to keep it simpler, so you'll > need to edit the variables to your needs below the options. The only > packages that it may need is portlint, porttools and/or poudriere. > Let me know what you think or needs improvement. Thank you very much for your script! I took a short look at it and have some questions/suggestions: Line 119/120: There you're burning an if. I have more skill in bash than in sh - but is there no negation possible? Line 162: BUILD_LIST="`(cat ${PATCH_FILE} | grep -o '^Index:[ ].*' | sed 's/Index: // ; s/Mk.*// ; s/Tools.*// ; s/Templates.*// ; s/Keywords.*//' | grep -o -e '.*\/.*\/' | sed 's/.*\/.*\/files\/$// ; s/\/$//' | sort | awk '!a[$0]++')`" This line is relative complicated. Is there any reason not to let svn do the work? Like: BUILD_LIST="`${SVN} status | grep -o -e '.*\/.*\/' | awk '{ print $2 }'` Your way is faster (and more accurate, since i'm currently too short on time), but the other way would allow applying multiple patches and manual changes without any problems. But i'm not sure if this is really needed. Line 201: svn revert -R would do the same, both of our approaches have a problem: the ignore for example added files. Greetings, Torsten