From owner-freebsd-testing@freebsd.org Fri Nov 20 23:11:09 2015 Return-Path: Delivered-To: freebsd-testing@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 DDE90A332D0; Fri, 20 Nov 2015 23:11:09 +0000 (UTC) (envelope-from ricky1252@hotmail.com) Received: from SNT004-OMC4S19.hotmail.com (snt004-omc4s19.hotmail.com [65.55.90.222]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (Client CN "*.outlook.com", Issuer "MSIT Machine Auth CA 2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A737615A9; Fri, 20 Nov 2015 23:11:09 +0000 (UTC) (envelope-from ricky1252@hotmail.com) Received: from SNT146-W42 ([65.55.90.199]) by SNT004-OMC4S19.hotmail.com over TLS secured channel with Microsoft SMTPSVC(7.5.7601.23008); Fri, 20 Nov 2015 15:11:08 -0800 X-TMN: [Fs/ibxqvcrhK2VnIjZKDewbOFqJApKqF] X-Originating-Email: [ricky1252@hotmail.com] Message-ID: From: Ricky G To: =?iso-8859-1?B?VG9yc3RlbiBa/Ghsc2RvcmZm?= CC: "freebsd-testing@freebsd.org" , "freebsd-ports@freebsd.org" Subject: RE: Call for Help: need script for patching ports tree, building with poudriere Date: Fri, 20 Nov 2015 18:11:08 -0500 Importance: Normal In-Reply-To: <564EDE98.9070508@toco-domains.de> References: , , , , <564EDE98.9070508@toco-domains.de> MIME-Version: 1.0 X-OriginalArrivalTime: 20 Nov 2015 23:11:08.0569 (UTC) FILETIME=[BD4BA090:01D123E8] Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.20 X-BeenThere: freebsd-testing@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Testing on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Nov 2015 23:11:10 -0000 > Thank you very much for your script! >=20 > I took a short look at it and have some questions/suggestions: >=20 > Line 119/120: > There you're burning an if. I have more skill in bash than in sh - but=20 > is there no negation possible? Honestly=2C the main reason I started this is to just see what I could do.= Feedback is most appreciated as improving my skills is one of my goals her= e. Bash and sh are extremely similar=2C this is most likely lack of knowled= ge on my part. Do you mind explaining further? >=20 > Line 162: > BUILD_LIST=3D"`(cat ${PATCH_FILE} | grep -o '^Index:[ ].*' | sed 's/Index= :=20 > // =3B s/Mk.*// =3B s/Tools.*// =3B s/Templates.*// =3B s/Keywords.*//' |= grep=20 > -o -e '.*\/.*\/' | sed 's/.*\/.*\/files\/$// =3B s/\/$//' | sort | awk=20 > '!a[$0]++')`" >=20 > This line is relative complicated. Is there any reason not to let svn do= =20 > the work? Like: > BUILD_LIST=3D"`${SVN} status | grep -o -e '.*\/.*\/' | awk '{ print $2 }'= `> Your way is faster (and more accurate=2C since i'm currently too short o= n=20 > time)=2C but the other way would allow applying multiple patches and=20 > manual changes without any problems. But i'm not sure if this is really=20 > needed. Using the diff file instead of svn is of course faster because there has m= uch less data to go through. I was considering adding multiple diff support= . Going to take a closer look at this. Do you think its more important to f= ocus on the diff file or the port tree for generating a build list? The mai= n reason I didn't want to use the port tree=2C at least in my case=2C is be= cause I have so many ports that are not sync'd with the current FreeBSD tre= e. The main reason that command is complicated is to strip many possible non-= port files/folders so that the list wont contain something like Mk/Uses/. T= he build list you suggested would work=2C but most of the sed command is st= ill needed to stripe non-ports. Looking at it again=2C I see where I could = make it a bit shorter and easier to read. The sort and awk command at the e= nd is just make it look nice and remove duplicates. Not really required. > Line 201: > svn revert -R would do the same=2C both of our approaches have a problem:= =20 > the ignore for example added files. Yeah=2C I agree. This is a big problem with added patchfiles. I added a "H= ard Revert" (-R) option that I was considering making make the default that= should fix this problem. Can you check and see if it does for you? I know = some people maybe weary of the rm -rf command=2C It is also why I added so = many checks on a properly set port tree. Do you think it would be better to= just do this "Hard Revert" and remove the other option? Thanks for the feedback! I'v already started working on 0.0.2! I just finis= hed adding better failed patch output. Going to also add a option to overri= de the scripts portsdir=2C and add support for multiple diff files=2C and t= ake another look at my BUILD_LIST to make it simpler. Keep the feed back co= ming please! =3D] Ultima =