Antti Harri [Wed, Jul 02, 2008 at 09:58:35AM +0300] wrote: > I got annoyed by having to use environment variable > for $PORTSDIR all the time so I propose this fix > that I and Johan Kiviniemi made. > > Works for me. :-) > No, sorry. I don't understand why you need this. $portsdir will use /usr/ports as a default.
Bernd > Index: infrastructure/build/out-of-date > =================================================================== > RCS file: /cvs/ports/infrastructure/build/out-of-date,v > retrieving revision 1.16 > diff -u -r1.16 out-of-date > --- infrastructure/build/out-of-date 1 Jun 2007 15:01:50 -0000 1.16 > +++ infrastructure/build/out-of-date 2 Jul 2008 06:48:49 -0000 > @@ -25,6 +25,7 @@ > use OpenBSD::PackageName; > use OpenBSD::ProgressMeter; > use File::Temp; > +use IPC::Open2; > > our $opt_q; > set_usage('out-of-date [-q]'); > @@ -221,7 +222,17 @@ > } > } > > -my $portsdir = $ENV{PORTSDIR} || "/usr/ports"; > +sub portsdir > +{ > + my $out; > + { > + open2 $out, my $in, "make", "-f", "-" or die "open2"; > + print {$in} ".include <bsd.own.mk>\nall:[EMAIL PROTECTED] '%s' > \"\${PORTSDIR}\""; > + } > + scalar <$out> > +} > + > +my $portsdir = portsdir(); > > print STDERR "Collecting installed packages\n"; > my $pkg = collect_installed(); >