tech-toolchain archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: RFC: checkflist extra prefixes and post-build hooks
On Thu, Apr 10, 2025 at 10:14:30PM +0700, Robert Elz wrote:
> Date: Thu, 10 Apr 2025 14:58:33 +0200
> From: Christoph Badura <bad%bsd.de@localhost>
> Message-ID: <20250410125833.GA24156%irregular-apocalypse.k.bsd.de@localhost>
> | build.sh has no "-e" option. At least I don't see it greping the source.
>
> Ah, apologies, I think of it like that, but what my code actually does is:
>
> if [ -e "${DEST}/dev/console" ]
> then
> set -- "$@" -V CHECKFLIST_FLAGS=-e
> fi
>
> DEST is what will be passed (via -D "${DEST}") to build.sh to become DESTDIR.
>
> So, it is a -e flag, it just is not used the way I implied, but
> the functionality is still there (I've been using this for many years).
Aha. You meant the -e flag to checkflist. But that does suppress all the
warning about the extra files. Whereas my change does not. You still get
all the warnings and the error for the unexpected extra files. Plus the
feedback of what extra files were exempted by the extra prefixes so that
you can check if that matches what you intended.
I did mention that. It's also fairly obvious from the patch.
> | That doesn't get me access to the environemnt variables set up by build.sh
> | and exported by make.
>
> I prefer to tell build.sh what they all are, rather than having it tell
> me what they should be. That is, my script does that for me, and since
> it knows what they are, it can use them again after build.sh is finished
> to go ahead and do more (and it does).
> The actual invocation of build.sh is:
>
> env -i \
> "PATH=/sbin:/bin:/usr/sbin:/usr/bin${PKGBIN}" \
> "USER=$USER" \
> "HOME=$EMPTY" \
> "LOGNAME=$LOGNAME" \
> "DISPLAY=$DISPLAY" \
> "MAKECONF=/dev/null" \
> /bin/sh build.sh $REPRO "$@" \
> -m "${ARCH}" \
> -D "${DEST}" \
> -O "${OBJD}/${REL}/${ARCH}" \
> -R "${SNAP}" \
> -T "${OBJD}/${REL}/tools" \
> -X "${R}${TARGET}/src/xsrc" \
> -u \
> "${BUILDING}"
My actual build.sh invocation is pretty similar than what you quoted. [1]
I do note that you do use options to tell build.sh to set various variables
used by the build system. Those are not available in your scripts outside
build.sh. As I mentioned that is one reason for my change. Variables like
NETBSDSRCDIR, DESTDIR, RELEASEDIR, MACHINE and MACHINE_ARCH etc.
I'm actually not clear if you are trying to discuss the change I've proposed
or how you organize your build scripts.
--chris
[1]: https://github.com/bad/netbsd-devenv-scripts
Home |
Main Index |
Thread Index |
Old Index