conf/160896: [nanobsd] [patch] use getopts, jobs option, delay -c usage improvements to nanobsd.sh

Garrett Cooper yanegomi at gmail.com
Thu Sep 22 16:15:29 UTC 2011


On Thu, Sep 22, 2011 at 1:57 AM, Warner Losh <imp at bsdimp.com> wrote:
> Rejecting parts of this patch.  Specifically, the delated -c stuff is bogusly implemented.  Before the change, you could have multiple -c options on the command line.  after this you can't.

I'm wouldn't mind doing something like this:

nano_confs
while getopts '...' optch
do
    case "$optch" in
    ...
    c)
        nano_confs="$nano_confs $OPTARG"
        ;;
...

for nano_conf in $nano_confs; do
    . $nano_confs
done

The problem I was trying to work around is that (unfortunately) some
packages code features (ipv6) into the names (take apr for instance),
which means that the logic in FreeNAS currently always says "build a
fat image" when $DEBUG == 1.

> Don't like how -j is implemented in this patch.  Need to think about this because it breaks some nanobsd config files that specify NANO_PMAKE command.

My concern was that not all of my build machines are homogeneous. I
have access to some "powerhouse" server machines and some low power
desktops. FreeNAS had -j8 coded into NANO_PMAKE, but I made it
variable ($CPUS), but I thought that was a bad idea for what should go
back into nanobsd (it didn't match the defaults and could cause other
issues) -- if the default (1) is incorrect, I'm all for bumping it up
to 3 again. I just wasn't sure why 3 was the chosen default.

> Other stuff looks good and it, or variations of it, will go in when we're out of the freeze.

Thanks for the feedback!
-Garrett


More information about the freebsd-bugs mailing list