working with port options from commandline

Bryan Drewery bdrewery at FreeBSD.org
Fri Apr 4 11:05:22 UTC 2014


On 4/3/2014 4:26 AM, Volodymyr Kostyrko wrote:
> Hi all.
> 
> I'm all about automation. I'd like to automate most tasks so I can
> schedule them or write a script with which everything would be done
> automatically.
> 
> I have some difficulties with current port options framework:
> 
> 1. Is there a good way to set/unset any option from command line without
> firing up dialog? Something like 'make -C port/dir -DSET=OPT1,OPT2
> -DUNSET=OPT3 updateconfig'.

This should work:
  make ... OPTIONS_SET="OPT OPT OPT" OPTIONS_UNSET="OPT OPT OPT" BATCH=1

> 
> 2. Is there a good way to query for option updates? You know when you
> are building a port the option dialog will still be shown if there are
> new options not present in current config. Can I get those options
> somehow like 'make -C port/dir changedconfig'?

The current handling uses:
  make -V NEWOPTIONS

You can also use 'make pretty-print-config' for a parseable output.

> 
> I think I need to write some scripts to handle this situations myself
> but I just want to ask whether someone had done that before or maybe
> such functionality is pending?
> 


-- 
Regards,
Bryan Drewery

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 553 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freebsd.org/pipermail/freebsd-ports/attachments/20140404/9182fbf7/attachment-0001.sig>


More information about the freebsd-ports mailing list