Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 20 Nov 2015 18:11:08 -0500
From:      Ricky G <ricky1252@hotmail.com>
To:        =?iso-8859-1?B?VG9yc3RlbiBa/Ghsc2RvcmZm?= <mailinglists@toco-domains.de>
Cc:        "freebsd-testing@freebsd.org" <freebsd-testing@freebsd.org>, "freebsd-ports@freebsd.org" <freebsd-ports@freebsd.org>
Subject:   RE: Call for Help: need script for patching ports tree, building with poudriere
Message-ID:  <SNT146-W4271A2597FBC1A75A972A6A11A0@phx.gbl>
In-Reply-To: <564EDE98.9070508@toco-domains.de>
References:  <CAG=rPVcOb4g9DD08c7vAsor8UMf3GnckAJ2wkO37p8Ao3G2GwA@mail.gmail.com>, <SNT146-W8224851E20D3E1FDA17AD4A1150@phx.gbl>, <CAG=rPVfZV4kZbhG5c-%2BrjFG4vGTzMmrRasSyBQ%2BgCtY8FBEtoA@mail.gmail.com>, <SNT146-W629FAF58F79486179755FEA1100@phx.gbl>, <564EDE98.9070508@toco-domains.de>

next in thread | previous in thread | raw e-mail | index | archive | help
> 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 		 	   		  =



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?SNT146-W4271A2597FBC1A75A972A6A11A0>