On 2026/07/07 13:45, Jeremie Courreges-Anglas wrote: > On Mon, Jul 06, 2026 at 01:04:13PM +0100, Stuart Henderson wrote: > > On 2026/06/30 18:37, Jeremie Courreges-Anglas wrote: > > > On Tue, Jun 30, 2026 at 05:15:02PM +0100, Stuart Henderson wrote: > > > > On 2026/06/30 18:02, Jeremie Courreges-Anglas wrote: > > > [...] > > > > > Index: portimport > > > > > =================================================================== > > > > > RCS file: /cvs/ports/infrastructure/bin/portimport,v > > > > > diff -u -p -r1.10 portimport > > > > > --- portimport 19 Feb 2020 17:53:18 -0000 1.10 > > > > > +++ portimport 30 Jun 2026 15:26:34 -0000 > > > > > @@ -29,7 +29,7 @@ usage() { > > > > > } > > > > > > > > > > user=$(id -un) > > > > > -portsdir= > > > > > +portsdir=/usr/ports > > > > ... > > > > > -portsdir=${portsdir:-${PWD%"/$pkgpath"}} > > > > > > > > how about this? > > > > > > > > portsdir=${portsdir:-/usr/ports} > > > > > > What would be the indended difference in behavior? > > > > With the current code, a user could set portsdir in the environment and > > portimport would use it instead of trying to figure it out based on the > > current directory. > > I suspect you misread the diff, the script currently ~starts with: > > ... > user=$(id -un) > portsdir= > ... > > so the value of an environment variable named portsdir can't leak into > the script. oh, fair enough. > > that would be a smarter way to do it. > > I've thought about it some more and I'm not sure my initial diff is > the way to go anymore. Seems like zhuk@ made sure portimport and > portcheck could be used from any valid ports tree checkout, not just > whatever the user happens to be using for builds. So maybe dropping > mystuff really is the simplest approach, but ENOTIME right now. ah that makes sense...
No comments:
Post a Comment