Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 21 Jan 2015 18:51:23 +1100
From:      Lawrence Stewart <lstewart@freebsd.org>
To:        Will Andrews <will@freebsd.org>, src-committers@freebsd.org,  svn-src-all@freebsd.org, svn-src-head@freebsd.org
Cc:        imp@freebsd.org
Subject:   Re: svn commit: r275832 - head/tools/tools/nanobsd
Message-ID:  <54BF5A7B.2080601@freebsd.org>
In-Reply-To: <201412161759.sBGHx6ZL016021@svn.freebsd.org>
References:  <201412161759.sBGHx6ZL016021@svn.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Hi Will,

On 12/17/14 04:59, Will Andrews wrote:
> Author: will
> Date: Tue Dec 16 17:59:05 2014
> New Revision: 275832
> URL: https://svnweb.freebsd.org/changeset/base/275832
> 
> Log:
>   Make NanoBSD source-able from other scripts.
>   
>   Summary:
>   This change converts NanoBSD into a two-script bundle.
>   - defaults.sh contains all non-CLI code.  Most NanoBSD code is moved into
>     this file.
>   - nanobsd.sh now consists just of a command line interface that calls into
>     functions in defaults.sh.
>   
>   Test Plan: Run NanoBSD using a previously-working configuration.
>   
>   Reviewers: imp
>   
>   Reviewed By: imp
>   
>   Differential Revision: https://reviews.freebsd.org/D1321
> 
> Added:
>   head/tools/tools/nanobsd/defaults.sh   (contents, props changed)
> Modified:
>   head/tools/tools/nanobsd/nanobsd.sh

I think this change introduced a bug - I'm seeing nanobsd error out with
the "NANO_TOOLS directory does not exist" message.

The problem is that NANO_TOOLS is initialised to "tools/tools/nanobsd",
and you changed the test in nanobsd.sh to *not* check for
"${NANO_SRC}/${NANO_TOOLS}", which errors out except if the cwd is
${NANO_SRC}.

You tweak NANO_TOOLS appropriately in set_defaults_and_export() but it's
run after the dir test. There are a couple of ways to fix but I'll leave
it to you to decide which you prefer.

Cheers,
Lawrence



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?54BF5A7B.2080601>