Removed port OPTIONS linger in /var/db/ports/.../options

Nick Withers nick at nickwithers.com
Mon Jun 22 23:16:38 UTC 2009


On Mon, 2009-06-22 at 15:37 -0700, Doug Barton wrote:
> Nick Withers wrote:
> > Hello all!
> > 
> > I was surprised to see, when trying to update lang/ruby18 today, that
> > the to-be-installed package would be named "ruby
> > +nopthreads-1.8.7.160_3,1", rather than the expected
> > "ruby-1.8.7.160_3,1".
> > 
> > Checked out the port's Makefile, and indeed this name is now set when
> > "WITHOUT_PTHREADS" is defined. Righto, no worries.
> > 
> > I hadn't defined WITHOUT_PTHREADS though... Or at least, didn't think I
> > had! "make config" for lang/ruby18 didn't even show such an option.
> > 
> > "/var/db/ports/ruby/options", however, did, left over from a while back:
> > ____
> > 
> > # This file is auto-generated by 'make config'.
> > # No user-servicable parts inside!
> > # Options for ruby-1.8.7.72_1,1
> > _OPTIONS_READ=ruby-1.8.7.72_1,1
> > WITHOUT_PTHREADS=true
> > WITHOUT_ONIGURUMA=true
> > WITHOUT_GCPATCH=true
> > WITH_IPV6=true
> > WITHOUT_RDOC=true
> > WITHOUT_DEBUG=true
> > ____
> > 
> > I must admit, I thought that when options were added or removed, the
> > OPTIONS dialogue was redisplayed automatically, but it seems this is
> > only when options are added (consistent with what seems to be implied in
> > http://www.freebsd.org/doc/en/books/porters-handbook/makefile-options.html).
> 
> If that's accurate then it's a bug, although IME the cases where an
> option is removed are few and far between.

It'd be handy if I were to file a PR, then?

This'd be the first time I've knowingly hit the problem.

> > I don't really want to clear all ports options before each
> > portmaster / portupgrade run
> 
> You don't need to clear them all with portmaster, you can use the
> --force-config option which will run 'make config' for each port but
> preserve the choices you've already made.

Good point (I'd have to make sure to select "OK" rather than "Cancel"
too, but that's pretty easy!).

I update my ports pretty regularly (daily or more frequently, often
enough) and with a thousand-odd ports on a couple of desktop machines,
--force-config (or portupgrade's -C / --config)'s gonna get old pretty
quick!

> There is also the
> --check-port-dbdir option if you want to clear out options files for
> ports you're no longer using.

That's a nifty one I wasn't aware of, cheers.

> hth,
> 
> Doug
-- 
Nick Withers
email: nick at nickwithers.com
Web: http://www.nickwithers.com
Mobile: +61 414 397 446



More information about the freebsd-ports mailing list